From 1dcd1fb3b7a4399bdfd1aeaa8d200ae899a30b27 Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Tue, 4 Feb 2020 17:53:04 -0800 Subject: [PATCH] generated: update clients --- .../versioned/typed/cr/v1/example.go | 23 +++++++------ .../typed/cr/v1/fake/fake_example.go | 6 ++-- .../v1/customresourcedefinition.go | 29 +++++++++------- .../v1/fake/fake_customresourcedefinition.go | 8 ++--- .../v1beta1/customresourcedefinition.go | 29 +++++++++------- .../fake/fake_customresourcedefinition.go | 8 ++--- .../fake/fake_mutatingwebhookconfiguration.go | 6 ++-- .../fake_validatingwebhookconfiguration.go | 6 ++-- .../v1/mutatingwebhookconfiguration.go | 23 +++++++------ .../v1/validatingwebhookconfiguration.go | 23 +++++++------ .../fake/fake_mutatingwebhookconfiguration.go | 6 ++-- .../fake_validatingwebhookconfiguration.go | 6 ++-- .../v1beta1/mutatingwebhookconfiguration.go | 23 +++++++------ .../v1beta1/validatingwebhookconfiguration.go | 23 +++++++------ .../typed/apps/v1/controllerrevision.go | 23 +++++++------ .../kubernetes/typed/apps/v1/daemonset.go | 29 +++++++++------- .../kubernetes/typed/apps/v1/deployment.go | 34 +++++++++++-------- .../apps/v1/fake/fake_controllerrevision.go | 6 ++-- .../typed/apps/v1/fake/fake_daemonset.go | 8 ++--- .../typed/apps/v1/fake/fake_deployment.go | 10 +++--- .../typed/apps/v1/fake/fake_replicaset.go | 10 +++--- .../typed/apps/v1/fake/fake_statefulset.go | 10 +++--- .../kubernetes/typed/apps/v1/replicaset.go | 34 +++++++++++-------- .../kubernetes/typed/apps/v1/statefulset.go | 34 +++++++++++-------- .../typed/apps/v1beta1/controllerrevision.go | 23 +++++++------ .../typed/apps/v1beta1/deployment.go | 29 +++++++++------- .../v1beta1/fake/fake_controllerrevision.go | 6 ++-- .../apps/v1beta1/fake/fake_deployment.go | 8 ++--- .../apps/v1beta1/fake/fake_statefulset.go | 8 ++--- .../typed/apps/v1beta1/statefulset.go | 29 +++++++++------- .../typed/apps/v1beta2/controllerrevision.go | 23 +++++++------ .../typed/apps/v1beta2/daemonset.go | 29 +++++++++------- .../typed/apps/v1beta2/deployment.go | 29 +++++++++------- .../v1beta2/fake/fake_controllerrevision.go | 6 ++-- .../typed/apps/v1beta2/fake/fake_daemonset.go | 8 ++--- .../apps/v1beta2/fake/fake_deployment.go | 8 ++--- .../apps/v1beta2/fake/fake_replicaset.go | 8 ++--- .../apps/v1beta2/fake/fake_statefulset.go | 10 +++--- .../typed/apps/v1beta2/replicaset.go | 29 +++++++++------- .../typed/apps/v1beta2/statefulset.go | 34 +++++++++++-------- .../auditregistration/v1alpha1/auditsink.go | 23 +++++++------ .../v1alpha1/fake/fake_auditsink.go | 6 ++-- .../kubernetes/typed/authentication/v1/BUILD | 1 + .../typed/authentication/v1/fake/BUILD | 1 + .../v1/fake/fake_tokenreview.go | 3 +- .../typed/authentication/v1/tokenreview.go | 7 ++-- .../typed/authentication/v1beta1/BUILD | 1 + .../typed/authentication/v1beta1/fake/BUILD | 1 + .../v1beta1/fake/fake_tokenreview.go | 3 +- .../authentication/v1beta1/tokenreview.go | 7 ++-- .../kubernetes/typed/authorization/v1/BUILD | 1 + .../typed/authorization/v1/fake/BUILD | 1 + .../v1/fake/fake_localsubjectaccessreview.go | 3 +- .../v1/fake/fake_selfsubjectaccessreview.go | 3 +- .../v1/fake/fake_selfsubjectrulesreview.go | 3 +- .../v1/fake/fake_subjectaccessreview.go | 3 +- .../v1/localsubjectaccessreview.go | 7 ++-- .../v1/selfsubjectaccessreview.go | 7 ++-- .../v1/selfsubjectrulesreview.go | 7 ++-- .../authorization/v1/subjectaccessreview.go | 7 ++-- .../typed/authorization/v1beta1/BUILD | 1 + .../typed/authorization/v1beta1/fake/BUILD | 1 + .../fake/fake_localsubjectaccessreview.go | 3 +- .../fake/fake_selfsubjectaccessreview.go | 3 +- .../fake/fake_selfsubjectrulesreview.go | 3 +- .../v1beta1/fake/fake_subjectaccessreview.go | 3 +- .../v1beta1/localsubjectaccessreview.go | 7 ++-- .../v1beta1/selfsubjectaccessreview.go | 7 ++-- .../v1beta1/selfsubjectrulesreview.go | 7 ++-- .../v1beta1/subjectaccessreview.go | 7 ++-- .../v1/fake/fake_horizontalpodautoscaler.go | 8 ++--- .../autoscaling/v1/horizontalpodautoscaler.go | 29 +++++++++------- .../fake/fake_horizontalpodautoscaler.go | 8 ++--- .../v2beta1/horizontalpodautoscaler.go | 29 +++++++++------- .../fake/fake_horizontalpodautoscaler.go | 8 ++--- .../v2beta2/horizontalpodautoscaler.go | 29 +++++++++------- .../typed/batch/v1/fake/fake_job.go | 8 ++--- .../kubernetes/typed/batch/v1/job.go | 29 +++++++++------- .../kubernetes/typed/batch/v1beta1/cronjob.go | 29 +++++++++------- .../typed/batch/v1beta1/fake/fake_cronjob.go | 8 ++--- .../typed/batch/v2alpha1/cronjob.go | 29 +++++++++------- .../typed/batch/v2alpha1/fake/fake_cronjob.go | 8 ++--- .../v1beta1/certificatesigningrequest.go | 29 +++++++++------- .../fake/fake_certificatesigningrequest.go | 8 ++--- .../typed/coordination/v1/fake/fake_lease.go | 6 ++-- .../kubernetes/typed/coordination/v1/lease.go | 23 +++++++------ .../coordination/v1beta1/fake/fake_lease.go | 6 ++-- .../typed/coordination/v1beta1/lease.go | 23 +++++++------ .../typed/core/v1/componentstatus.go | 23 +++++++------ .../kubernetes/typed/core/v1/configmap.go | 23 +++++++------ .../kubernetes/typed/core/v1/endpoints.go | 23 +++++++------ .../kubernetes/typed/core/v1/event.go | 23 +++++++------ .../core/v1/fake/fake_componentstatus.go | 6 ++-- .../typed/core/v1/fake/fake_configmap.go | 6 ++-- .../typed/core/v1/fake/fake_endpoints.go | 6 ++-- .../typed/core/v1/fake/fake_event.go | 6 ++-- .../typed/core/v1/fake/fake_limitrange.go | 6 ++-- .../typed/core/v1/fake/fake_namespace.go | 8 ++--- .../typed/core/v1/fake/fake_node.go | 8 ++--- .../core/v1/fake/fake_persistentvolume.go | 8 ++--- .../v1/fake/fake_persistentvolumeclaim.go | 8 ++--- .../kubernetes/typed/core/v1/fake/fake_pod.go | 10 +++--- .../typed/core/v1/fake/fake_podtemplate.go | 6 ++-- .../v1/fake/fake_replicationcontroller.go | 10 +++--- .../typed/core/v1/fake/fake_resourcequota.go | 8 ++--- .../typed/core/v1/fake/fake_secret.go | 6 ++-- .../typed/core/v1/fake/fake_service.go | 8 ++--- .../typed/core/v1/fake/fake_serviceaccount.go | 8 ++--- .../kubernetes/typed/core/v1/limitrange.go | 23 +++++++------ .../kubernetes/typed/core/v1/namespace.go | 27 ++++++++------- .../kubernetes/typed/core/v1/node.go | 29 +++++++++------- .../typed/core/v1/persistentvolume.go | 29 +++++++++------- .../typed/core/v1/persistentvolumeclaim.go | 29 +++++++++------- .../client-go/kubernetes/typed/core/v1/pod.go | 34 +++++++++++-------- .../kubernetes/typed/core/v1/podtemplate.go | 23 +++++++------ .../typed/core/v1/replicationcontroller.go | 34 +++++++++++-------- .../kubernetes/typed/core/v1/resourcequota.go | 29 +++++++++------- .../kubernetes/typed/core/v1/secret.go | 23 +++++++------ .../kubernetes/typed/core/v1/service.go | 27 ++++++++------- .../typed/core/v1/serviceaccount.go | 28 ++++++++------- .../typed/discovery/v1alpha1/endpointslice.go | 23 +++++++------ .../v1alpha1/fake/fake_endpointslice.go | 6 ++-- .../typed/discovery/v1beta1/endpointslice.go | 23 +++++++------ .../v1beta1/fake/fake_endpointslice.go | 6 ++-- .../kubernetes/typed/events/v1beta1/event.go | 23 +++++++------ .../typed/events/v1beta1/fake/fake_event.go | 6 ++-- .../typed/extensions/v1beta1/daemonset.go | 29 +++++++++------- .../typed/extensions/v1beta1/deployment.go | 34 +++++++++++-------- .../extensions/v1beta1/fake/fake_daemonset.go | 8 ++--- .../v1beta1/fake/fake_deployment.go | 10 +++--- .../extensions/v1beta1/fake/fake_ingress.go | 8 ++--- .../v1beta1/fake/fake_networkpolicy.go | 6 ++-- .../v1beta1/fake/fake_podsecuritypolicy.go | 6 ++-- .../v1beta1/fake/fake_replicaset.go | 10 +++--- .../typed/extensions/v1beta1/ingress.go | 29 +++++++++------- .../typed/extensions/v1beta1/networkpolicy.go | 23 +++++++------ .../extensions/v1beta1/podsecuritypolicy.go | 23 +++++++------ .../typed/extensions/v1beta1/replicaset.go | 34 +++++++++++-------- .../v1alpha1/fake/fake_flowschema.go | 8 ++--- .../fake/fake_prioritylevelconfiguration.go | 8 ++--- .../typed/flowcontrol/v1alpha1/flowschema.go | 29 +++++++++------- .../v1alpha1/prioritylevelconfiguration.go | 29 +++++++++------- .../networking/v1/fake/fake_networkpolicy.go | 6 ++-- .../typed/networking/v1/networkpolicy.go | 23 +++++++------ .../networking/v1beta1/fake/fake_ingress.go | 8 ++--- .../typed/networking/v1beta1/ingress.go | 29 +++++++++------- .../node/v1alpha1/fake/fake_runtimeclass.go | 6 ++-- .../typed/node/v1alpha1/runtimeclass.go | 23 +++++++------ .../node/v1beta1/fake/fake_runtimeclass.go | 6 ++-- .../typed/node/v1beta1/runtimeclass.go | 23 +++++++------ .../v1beta1/fake/fake_poddisruptionbudget.go | 8 ++--- .../v1beta1/fake/fake_podsecuritypolicy.go | 6 ++-- .../policy/v1beta1/poddisruptionbudget.go | 29 +++++++++------- .../typed/policy/v1beta1/podsecuritypolicy.go | 23 +++++++------ .../kubernetes/typed/rbac/v1/clusterrole.go | 23 +++++++------ .../typed/rbac/v1/clusterrolebinding.go | 23 +++++++------ .../typed/rbac/v1/fake/fake_clusterrole.go | 6 ++-- .../rbac/v1/fake/fake_clusterrolebinding.go | 6 ++-- .../typed/rbac/v1/fake/fake_role.go | 6 ++-- .../typed/rbac/v1/fake/fake_rolebinding.go | 6 ++-- .../kubernetes/typed/rbac/v1/role.go | 23 +++++++------ .../kubernetes/typed/rbac/v1/rolebinding.go | 23 +++++++------ .../typed/rbac/v1alpha1/clusterrole.go | 23 +++++++------ .../typed/rbac/v1alpha1/clusterrolebinding.go | 23 +++++++------ .../rbac/v1alpha1/fake/fake_clusterrole.go | 6 ++-- .../v1alpha1/fake/fake_clusterrolebinding.go | 6 ++-- .../typed/rbac/v1alpha1/fake/fake_role.go | 6 ++-- .../rbac/v1alpha1/fake/fake_rolebinding.go | 6 ++-- .../kubernetes/typed/rbac/v1alpha1/role.go | 23 +++++++------ .../typed/rbac/v1alpha1/rolebinding.go | 23 +++++++------ .../typed/rbac/v1beta1/clusterrole.go | 23 +++++++------ .../typed/rbac/v1beta1/clusterrolebinding.go | 23 +++++++------ .../rbac/v1beta1/fake/fake_clusterrole.go | 6 ++-- .../v1beta1/fake/fake_clusterrolebinding.go | 6 ++-- .../typed/rbac/v1beta1/fake/fake_role.go | 6 ++-- .../rbac/v1beta1/fake/fake_rolebinding.go | 6 ++-- .../kubernetes/typed/rbac/v1beta1/role.go | 23 +++++++------ .../typed/rbac/v1beta1/rolebinding.go | 23 +++++++------ .../scheduling/v1/fake/fake_priorityclass.go | 6 ++-- .../typed/scheduling/v1/priorityclass.go | 23 +++++++------ .../v1alpha1/fake/fake_priorityclass.go | 6 ++-- .../scheduling/v1alpha1/priorityclass.go | 23 +++++++------ .../v1beta1/fake/fake_priorityclass.go | 6 ++-- .../typed/scheduling/v1beta1/priorityclass.go | 23 +++++++------ .../settings/v1alpha1/fake/fake_podpreset.go | 6 ++-- .../typed/settings/v1alpha1/podpreset.go | 23 +++++++------ .../kubernetes/typed/storage/v1/csinode.go | 23 +++++++------ .../typed/storage/v1/fake/fake_csinode.go | 6 ++-- .../storage/v1/fake/fake_storageclass.go | 6 ++-- .../storage/v1/fake/fake_volumeattachment.go | 8 ++--- .../typed/storage/v1/storageclass.go | 23 +++++++------ .../typed/storage/v1/volumeattachment.go | 29 +++++++++------- .../v1alpha1/fake/fake_volumeattachment.go | 8 ++--- .../storage/v1alpha1/volumeattachment.go | 29 +++++++++------- .../typed/storage/v1beta1/csidriver.go | 23 +++++++------ .../typed/storage/v1beta1/csinode.go | 23 +++++++------ .../storage/v1beta1/fake/fake_csidriver.go | 6 ++-- .../storage/v1beta1/fake/fake_csinode.go | 6 ++-- .../storage/v1beta1/fake/fake_storageclass.go | 6 ++-- .../v1beta1/fake/fake_volumeattachment.go | 8 ++--- .../typed/storage/v1beta1/storageclass.go | 23 +++++++------ .../typed/storage/v1beta1/volumeattachment.go | 29 +++++++++------- .../typed/example/v1/clustertesttype.go | 34 +++++++++++-------- .../example/v1/fake/fake_clustertesttype.go | 10 +++--- .../typed/example/v1/fake/fake_testtype.go | 8 ++--- .../versioned/typed/example/v1/testtype.go | 29 +++++++++------- .../typed/example/v1/clustertesttype.go | 34 +++++++++++-------- .../example/v1/fake/fake_clustertesttype.go | 10 +++--- .../typed/example/v1/fake/fake_testtype.go | 8 ++--- .../versioned/typed/example/v1/testtype.go | 29 +++++++++------- .../internalversion/fake/fake_testtype.go | 8 ++--- .../typed/example/internalversion/testtype.go | 29 +++++++++------- .../internalversion/fake/fake_testtype.go | 8 ++--- .../example2/internalversion/testtype.go | 29 +++++++++------- .../internalversion/fake/fake_testtype.go | 8 ++--- .../example3.io/internalversion/testtype.go | 29 +++++++++------- .../typed/example/v1/fake/fake_testtype.go | 8 ++--- .../versioned/typed/example/v1/testtype.go | 29 +++++++++------- .../typed/example2/v1/fake/fake_testtype.go | 8 ++--- .../versioned/typed/example2/v1/testtype.go | 29 +++++++++------- .../example3.io/v1/fake/fake_testtype.go | 8 ++--- .../typed/example3.io/v1/testtype.go | 29 +++++++++------- .../typed/example/v1/clustertesttype.go | 34 +++++++++++-------- .../example/v1/fake/fake_clustertesttype.go | 10 +++--- .../typed/example/v1/fake/fake_testtype.go | 8 ++--- .../versioned/typed/example/v1/testtype.go | 29 +++++++++------- .../typed/example2/v1/fake/fake_testtype.go | 8 ++--- .../versioned/typed/example2/v1/testtype.go | 29 +++++++++------- .../typed/apiregistration/v1/apiservice.go | 29 +++++++++------- .../v1/fake/fake_apiservice.go | 8 ++--- .../apiregistration/v1beta1/apiservice.go | 29 +++++++++------- .../v1beta1/fake/fake_apiservice.go | 8 ++--- .../typed/metrics/v1alpha1/nodemetrics.go | 2 +- .../typed/metrics/v1alpha1/podmetrics.go | 2 +- .../typed/metrics/v1beta1/nodemetrics.go | 2 +- .../typed/metrics/v1beta1/podmetrics.go | 2 +- .../wardle/v1alpha1/fake/fake_fischer.go | 6 ++-- .../wardle/v1alpha1/fake/fake_flunder.go | 8 ++--- .../typed/wardle/v1alpha1/fischer.go | 23 +++++++------ .../typed/wardle/v1alpha1/flunder.go | 29 +++++++++------- .../typed/wardle/v1beta1/fake/fake_flunder.go | 8 ++--- .../versioned/typed/wardle/v1beta1/flunder.go | 29 +++++++++------- .../v1alpha1/fake/fake_foo.go | 8 ++--- .../typed/samplecontroller/v1alpha1/foo.go | 29 +++++++++------- 244 files changed, 2048 insertions(+), 1670 deletions(-) diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go index b5c028dabed..e1d26401af0 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go @@ -38,14 +38,14 @@ type ExamplesGetter interface { // ExampleInterface has methods to work with Example resources. type ExampleInterface interface { - Create(context.Context, *v1.Example) (*v1.Example, error) - Update(context.Context, *v1.Example) (*v1.Example, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Example, error) + Create(ctx context.Context, example *v1.Example, opts metav1.CreateOptions) (*v1.Example, error) + Update(ctx context.Context, example *v1.Example, opts metav1.UpdateOptions) (*v1.Example, 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.Example, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ExampleList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Example, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Example, err error) ExampleExpansion } @@ -109,11 +109,12 @@ func (c *examples) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In } // Create takes the representation of a example and creates it. Returns the server's representation of the example, and an error, if there is any. -func (c *examples) Create(ctx context.Context, example *v1.Example) (result *v1.Example, err error) { +func (c *examples) Create(ctx context.Context, example *v1.Example, opts metav1.CreateOptions) (result *v1.Example, err error) { result = &v1.Example{} err = c.client.Post(). Namespace(c.ns). Resource("examples"). + VersionedParams(&opts, scheme.ParameterCodec). Body(example). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *examples) Create(ctx context.Context, example *v1.Example) (result *v1. } // Update takes the representation of a example and updates it. Returns the server's representation of the example, and an error, if there is any. -func (c *examples) Update(ctx context.Context, example *v1.Example) (result *v1.Example, err error) { +func (c *examples) Update(ctx context.Context, example *v1.Example, opts metav1.UpdateOptions) (result *v1.Example, err error) { result = &v1.Example{} err = c.client.Put(). Namespace(c.ns). Resource("examples"). Name(example.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(example). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *examples) DeleteCollection(ctx context.Context, options *metav1.DeleteO } // Patch applies the patch and returns the patched example. -func (c *examples) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Example, err error) { +func (c *examples) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Example, err error) { result = &v1.Example{} err = c.client.Patch(pt). Namespace(c.ns). Resource("examples"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_example.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_example.go index 5d8ce1be7a4..ef48d9b1835 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_example.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_example.go @@ -81,7 +81,7 @@ func (c *FakeExamples) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a example and creates it. Returns the server's representation of the example, and an error, if there is any. -func (c *FakeExamples) Create(ctx context.Context, example *crv1.Example) (result *crv1.Example, err error) { +func (c *FakeExamples) Create(ctx context.Context, example *crv1.Example, opts v1.CreateOptions) (result *crv1.Example, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(examplesResource, c.ns, example), &crv1.Example{}) @@ -92,7 +92,7 @@ func (c *FakeExamples) Create(ctx context.Context, example *crv1.Example) (resul } // Update takes the representation of a example and updates it. Returns the server's representation of the example, and an error, if there is any. -func (c *FakeExamples) Update(ctx context.Context, example *crv1.Example) (result *crv1.Example, err error) { +func (c *FakeExamples) Update(ctx context.Context, example *crv1.Example, opts v1.UpdateOptions) (result *crv1.Example, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(examplesResource, c.ns, example), &crv1.Example{}) @@ -119,7 +119,7 @@ func (c *FakeExamples) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched example. -func (c *FakeExamples) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *crv1.Example, err error) { +func (c *FakeExamples) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *crv1.Example, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(examplesResource, c.ns, name, pt, data, subresources...), &crv1.Example{}) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go index 1ec9f44a3cc..e74d657e4fc 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go @@ -38,15 +38,15 @@ type CustomResourceDefinitionsGetter interface { // CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources. type CustomResourceDefinitionInterface interface { - Create(context.Context, *v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error) - Update(context.Context, *v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error) - UpdateStatus(context.Context, *v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.CustomResourceDefinition, error) + Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.CreateOptions) (*v1.CustomResourceDefinition, error) + Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (*v1.CustomResourceDefinition, error) + UpdateStatus(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (*v1.CustomResourceDefinition, 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.CustomResourceDefinition, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.CustomResourceDefinitionList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CustomResourceDefinition, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CustomResourceDefinition, err error) CustomResourceDefinitionExpansion } @@ -105,10 +105,11 @@ func (c *customResourceDefinitions) Watch(ctx context.Context, opts metav1.ListO } // Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.CreateOptions) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Post(). Resource("customresourcedefinitions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDe } // Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Put(). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDe // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Put(). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, option } // Patch applies the patch and returns the patched customResourceDefinition. -func (c *customResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CustomResourceDefinition, err error) { result = &v1.CustomResourceDefinition{} err = c.client.Patch(pt). Resource("customresourcedefinitions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go index f0d669b5709..4b03e2fa3cb 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go @@ -77,7 +77,7 @@ func (c *FakeCustomResourceDefinitions) Watch(ctx context.Context, opts v1.ListO } // Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (result *apiextensionsv1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition, opts v1.CreateOptions) (result *apiextensionsv1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(customresourcedefinitionsResource, customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResour } // Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (result *apiextensionsv1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition, opts v1.UpdateOptions) (result *apiextensionsv1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(customresourcedefinitionsResource, customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResour // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, error) { +func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition, opts v1.UpdateOptions) (*apiextensionsv1.CustomResourceDefinition, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(customresourcedefinitionsResource, "status", customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, op } // Patch applies the patch and returns the patched customResourceDefinition. -func (c *FakeCustomResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *apiextensionsv1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apiextensionsv1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, name, pt, data, subresources...), &apiextensionsv1.CustomResourceDefinition{}) if obj == nil { diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go index f39da7a0eed..4bf50bcfb47 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go @@ -38,15 +38,15 @@ type CustomResourceDefinitionsGetter interface { // CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources. type CustomResourceDefinitionInterface interface { - Create(context.Context, *v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) - Update(context.Context, *v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) - UpdateStatus(context.Context, *v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.CustomResourceDefinition, error) + Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.CreateOptions) (*v1beta1.CustomResourceDefinition, error) + Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error) + UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, 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.CustomResourceDefinition, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CustomResourceDefinitionList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) CustomResourceDefinitionExpansion } @@ -105,10 +105,11 @@ func (c *customResourceDefinitions) Watch(ctx context.Context, opts v1.ListOptio } // Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.CreateOptions) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Post(). Resource("customresourcedefinitions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDe } // Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Put(). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDe // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Put(). Resource("customresourcedefinitions"). Name(customResourceDefinition.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(customResourceDefinition). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, option } // Patch applies the patch and returns the patched customResourceDefinition. -func (c *customResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *customResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { result = &v1beta1.CustomResourceDefinition{} err = c.client.Patch(pt). Resource("customresourcedefinitions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go index c5f42bd29ad..a6b5e7f60a2 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go @@ -77,7 +77,7 @@ func (c *FakeCustomResourceDefinitions) Watch(ctx context.Context, opts v1.ListO } // Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.CreateOptions) (result *v1beta1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(customresourcedefinitionsResource, customResourceDefinition), &v1beta1.CustomResourceDefinition{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResour } // Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any. -func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (result *v1beta1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(customresourcedefinitionsResource, customResourceDefinition), &v1beta1.CustomResourceDefinition{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResour // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) { +func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*v1beta1.CustomResourceDefinition, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(customresourcedefinitionsResource, "status", customResourceDefinition), &v1beta1.CustomResourceDefinition{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, op } // Patch applies the patch and returns the patched customResourceDefinition. -func (c *FakeCustomResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { +func (c *FakeCustomResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, name, pt, data, subresources...), &v1beta1.CustomResourceDefinition{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go index 629ea009117..3ddf59ee8b0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingwebhookconfiguration.go @@ -77,7 +77,7 @@ func (c *FakeMutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.L } // Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration, opts v1.CreateOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &admissionregistrationv1.MutatingWebhookConfiguration{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutating } // Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &admissionregistrationv1.MutatingWebhookConfiguration{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context } // Patch applies the patch and returns the patched mutatingWebhookConfiguration. -func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &admissionregistrationv1.MutatingWebhookConfiguration{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go index dba9e0b67d8..88fddd04b4b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_validatingwebhookconfiguration.go @@ -77,7 +77,7 @@ func (c *FakeValidatingWebhookConfigurations) Watch(ctx context.Context, opts v1 } // Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistrationv1.ValidatingWebhookConfiguration{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, valida } // Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistrationv1.ValidatingWebhookConfiguration{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Conte } // Patch applies the patch and returns the patched validatingWebhookConfiguration. -func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), &admissionregistrationv1.ValidatingWebhookConfiguration{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go index be59ad6a36c..e9787bf408f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -38,14 +38,14 @@ type MutatingWebhookConfigurationsGetter interface { // MutatingWebhookConfigurationInterface has methods to work with MutatingWebhookConfiguration resources. type MutatingWebhookConfigurationInterface interface { - Create(context.Context, *v1.MutatingWebhookConfiguration) (*v1.MutatingWebhookConfiguration, error) - Update(context.Context, *v1.MutatingWebhookConfiguration) (*v1.MutatingWebhookConfiguration, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.MutatingWebhookConfiguration, error) + Create(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.CreateOptions) (*v1.MutatingWebhookConfiguration, error) + Update(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.UpdateOptions) (*v1.MutatingWebhookConfiguration, 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.MutatingWebhookConfiguration, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.MutatingWebhookConfigurationList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) MutatingWebhookConfigurationExpansion } @@ -104,10 +104,11 @@ func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts metav1.L } // Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration) (result *v1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.CreateOptions) (result *v1.MutatingWebhookConfiguration, err error) { result = &v1.MutatingWebhookConfiguration{} err = c.client.Post(). Resource("mutatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(mutatingWebhookConfiguration). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebh } // Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration) (result *v1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.UpdateOptions) (result *v1.MutatingWebhookConfiguration, err error) { result = &v1.MutatingWebhookConfiguration{} err = c.client.Put(). Resource("mutatingwebhookconfigurations"). Name(mutatingWebhookConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(mutatingWebhookConfiguration). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, op } // Patch applies the patch and returns the patched mutatingWebhookConfiguration. -func (c *mutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) { result = &v1.MutatingWebhookConfiguration{} err = c.client.Patch(pt). Resource("mutatingwebhookconfigurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go index c08d6a28f21..1a9c1b4ac60 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go @@ -38,14 +38,14 @@ type ValidatingWebhookConfigurationsGetter interface { // ValidatingWebhookConfigurationInterface has methods to work with ValidatingWebhookConfiguration resources. type ValidatingWebhookConfigurationInterface interface { - Create(context.Context, *v1.ValidatingWebhookConfiguration) (*v1.ValidatingWebhookConfiguration, error) - Update(context.Context, *v1.ValidatingWebhookConfiguration) (*v1.ValidatingWebhookConfiguration, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ValidatingWebhookConfiguration, error) + Create(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.CreateOptions) (*v1.ValidatingWebhookConfiguration, error) + Update(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.UpdateOptions) (*v1.ValidatingWebhookConfiguration, 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.ValidatingWebhookConfiguration, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingWebhookConfigurationList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) ValidatingWebhookConfigurationExpansion } @@ -104,10 +104,11 @@ func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts metav1 } // Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *validatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration) (result *v1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.CreateOptions) (result *v1.ValidatingWebhookConfiguration, err error) { result = &v1.ValidatingWebhookConfiguration{} err = c.client.Post(). Resource("validatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(validatingWebhookConfiguration). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *validatingWebhookConfigurations) Create(ctx context.Context, validating } // Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *validatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration) (result *v1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.UpdateOptions) (result *v1.ValidatingWebhookConfiguration, err error) { result = &v1.ValidatingWebhookConfiguration{} err = c.client.Put(). Resource("validatingwebhookconfigurations"). Name(validatingWebhookConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(validatingWebhookConfiguration). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, } // Patch applies the patch and returns the patched validatingWebhookConfiguration. -func (c *validatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) { result = &v1.ValidatingWebhookConfiguration{} err = c.client.Patch(pt). Resource("validatingwebhookconfigurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go index c88c6d8e220..451de685ac6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go @@ -77,7 +77,7 @@ func (c *FakeMutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.L } // Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutating } // Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context } // Patch applies the patch and returns the patched mutatingWebhookConfiguration. -func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1beta1.MutatingWebhookConfiguration{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go index 2faeacb9d4e..4bddb9ad2f1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go @@ -77,7 +77,7 @@ func (c *FakeValidatingWebhookConfigurations) Watch(ctx context.Context, opts v1 } // Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1beta1.ValidatingWebhookConfiguration{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, valida } // Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1beta1.ValidatingWebhookConfiguration{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Conte } // Patch applies the patch and returns the patched validatingWebhookConfiguration. -func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1beta1.ValidatingWebhookConfiguration{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index d9976cd0784..4643325a393 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -38,14 +38,14 @@ type MutatingWebhookConfigurationsGetter interface { // MutatingWebhookConfigurationInterface has methods to work with MutatingWebhookConfiguration resources. type MutatingWebhookConfigurationInterface interface { - Create(context.Context, *v1beta1.MutatingWebhookConfiguration) (*v1beta1.MutatingWebhookConfiguration, error) - Update(context.Context, *v1beta1.MutatingWebhookConfiguration) (*v1beta1.MutatingWebhookConfiguration, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.MutatingWebhookConfiguration, error) + Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.CreateOptions) (*v1beta1.MutatingWebhookConfiguration, error) + Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (*v1beta1.MutatingWebhookConfiguration, 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.MutatingWebhookConfiguration, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) MutatingWebhookConfigurationExpansion } @@ -104,10 +104,11 @@ func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListO } // Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Post(). Resource("mutatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(mutatingWebhookConfiguration). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebh } // Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. -func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) { result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Put(). Resource("mutatingwebhookconfigurations"). Name(mutatingWebhookConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(mutatingWebhookConfiguration). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, op } // Patch applies the patch and returns the patched mutatingWebhookConfiguration. -func (c *mutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) { +func (c *mutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) { result = &v1beta1.MutatingWebhookConfiguration{} err = c.client.Patch(pt). Resource("mutatingwebhookconfigurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 966b35d35b8..26af233d00f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -38,14 +38,14 @@ type ValidatingWebhookConfigurationsGetter interface { // ValidatingWebhookConfigurationInterface has methods to work with ValidatingWebhookConfiguration resources. type ValidatingWebhookConfigurationInterface interface { - Create(context.Context, *v1beta1.ValidatingWebhookConfiguration) (*v1beta1.ValidatingWebhookConfiguration, error) - Update(context.Context, *v1beta1.ValidatingWebhookConfiguration) (*v1beta1.ValidatingWebhookConfiguration, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.ValidatingWebhookConfiguration, error) + Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (*v1beta1.ValidatingWebhookConfiguration, error) + Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (*v1beta1.ValidatingWebhookConfiguration, 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.ValidatingWebhookConfiguration, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) ValidatingWebhookConfigurationExpansion } @@ -104,10 +104,11 @@ func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts v1.Lis } // Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *validatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Post(). Resource("validatingwebhookconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(validatingWebhookConfiguration). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *validatingWebhookConfigurations) Create(ctx context.Context, validating } // Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. -func (c *validatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) { result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Put(). Resource("validatingwebhookconfigurations"). Name(validatingWebhookConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(validatingWebhookConfiguration). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, } // Patch applies the patch and returns the patched validatingWebhookConfiguration. -func (c *validatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) { +func (c *validatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) { result = &v1beta1.ValidatingWebhookConfiguration{} err = c.client.Patch(pt). Resource("validatingwebhookconfigurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go index e7f6910be53..d3321e33aaf 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go @@ -38,14 +38,14 @@ type ControllerRevisionsGetter interface { // ControllerRevisionInterface has methods to work with ControllerRevision resources. type ControllerRevisionInterface interface { - Create(context.Context, *v1.ControllerRevision) (*v1.ControllerRevision, error) - Update(context.Context, *v1.ControllerRevision) (*v1.ControllerRevision, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ControllerRevision, error) + Create(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.CreateOptions) (*v1.ControllerRevision, error) + Update(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.UpdateOptions) (*v1.ControllerRevision, 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.ControllerRevision, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ControllerRevisionList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControllerRevision, err error) ControllerRevisionExpansion } @@ -109,11 +109,12 @@ func (c *controllerRevisions) Watch(ctx context.Context, opts metav1.ListOptions } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1.ControllerRevision) (result *v1.ControllerRevision, err error) { +func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.CreateOptions) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Post(). Namespace(c.ns). Resource("controllerrevisions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1 } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1.ControllerRevision) (result *v1.ControllerRevision, err error) { +func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.UpdateOptions) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Put(). Namespace(c.ns). Resource("controllerrevisions"). Name(controllerRevision.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *controllerRevisions) DeleteCollection(ctx context.Context, options *met } // Patch applies the patch and returns the patched controllerRevision. -func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error) { +func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Patch(pt). Namespace(c.ns). Resource("controllerrevisions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go index e2f6b7c1668..4c78281ece0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go @@ -38,15 +38,15 @@ type DaemonSetsGetter interface { // DaemonSetInterface has methods to work with DaemonSet resources. type DaemonSetInterface interface { - Create(context.Context, *v1.DaemonSet) (*v1.DaemonSet, error) - Update(context.Context, *v1.DaemonSet) (*v1.DaemonSet, error) - UpdateStatus(context.Context, *v1.DaemonSet) (*v1.DaemonSet, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.DaemonSet, error) + Create(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.CreateOptions) (*v1.DaemonSet, error) + Update(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (*v1.DaemonSet, error) + UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (*v1.DaemonSet, 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.DaemonSet, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.DaemonSetList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DaemonSet, err error) DaemonSetExpansion } @@ -110,11 +110,12 @@ func (c *daemonSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch. } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Create(ctx context.Context, daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) { +func (c *daemonSets) Create(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.CreateOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Post(). Namespace(c.ns). Resource("daemonsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *daemonSets) Create(ctx context.Context, daemonSet *v1.DaemonSet) (resul } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Update(ctx context.Context, daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) { +func (c *daemonSets) Update(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *daemonSets) Update(ctx context.Context, daemonSet *v1.DaemonSet) (resul // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) { +func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *daemonSets) DeleteCollection(ctx context.Context, options *metav1.Delet } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error) { +func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("daemonsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go index a9cf83ad093..c7c32a035b8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go @@ -39,17 +39,17 @@ type DeploymentsGetter interface { // DeploymentInterface has methods to work with Deployment resources. type DeploymentInterface interface { - Create(context.Context, *v1.Deployment) (*v1.Deployment, error) - Update(context.Context, *v1.Deployment) (*v1.Deployment, error) - UpdateStatus(context.Context, *v1.Deployment) (*v1.Deployment, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Deployment, error) + Create(ctx context.Context, deployment *v1.Deployment, opts metav1.CreateOptions) (*v1.Deployment, error) + Update(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (*v1.Deployment, error) + UpdateStatus(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (*v1.Deployment, 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.Deployment, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.DeploymentList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Deployment, err error) GetScale(ctx context.Context, deploymentName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) - UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error) + UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error) DeploymentExpansion } @@ -114,11 +114,12 @@ func (c *deployments) Watch(ctx context.Context, opts metav1.ListOptions) (watch } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Create(ctx context.Context, deployment *v1.Deployment) (result *v1.Deployment, err error) { +func (c *deployments) Create(ctx context.Context, deployment *v1.Deployment, opts metav1.CreateOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Post(). Namespace(c.ns). Resource("deployments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -126,12 +127,13 @@ func (c *deployments) Create(ctx context.Context, deployment *v1.Deployment) (re } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Update(ctx context.Context, deployment *v1.Deployment) (result *v1.Deployment, err error) { +func (c *deployments) Update(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -140,14 +142,14 @@ func (c *deployments) Update(ctx context.Context, deployment *v1.Deployment) (re // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1.Deployment) (result *v1.Deployment, err error) { +func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -182,13 +184,14 @@ func (c *deployments) DeleteCollection(ctx context.Context, options *metav1.Dele } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error) { +func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). Resource("deployments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -210,13 +213,14 @@ func (c *deployments) GetScale(ctx context.Context, deploymentName string, optio } // UpdateScale takes the top resource name and 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 *deployments) UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *deployments) UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deploymentName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go index 3f55bd768da..b1ccd180903 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go @@ -81,7 +81,7 @@ func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *appsv1.ControllerRevision, opts v1.CreateOptions) (result *appsv1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{}) @@ -92,7 +92,7 @@ func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *appsv1.ControllerRevision, opts v1.UpdateOptions) (result *appsv1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{}) @@ -119,7 +119,7 @@ func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched controllerRevision. -func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &appsv1.ControllerRevision{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go index 53c473f5b4f..fc424954590 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go @@ -81,7 +81,7 @@ func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) { +func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *appsv1.DaemonSet, opts v1.CreateOptions) (result *appsv1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{}) @@ -92,7 +92,7 @@ func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *appsv1.DaemonSet } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) { +func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *appsv1.DaemonSet, opts v1.UpdateOptions) (result *appsv1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{}) @@ -104,7 +104,7 @@ func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *appsv1.DaemonSet // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *appsv1.DaemonSet) (*appsv1.DaemonSet, error) { +func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *appsv1.DaemonSet, opts v1.UpdateOptions) (*appsv1.DaemonSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &appsv1.DaemonSet{}) @@ -131,7 +131,7 @@ func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &appsv1.DaemonSet{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go index 813ce34ba9c..6b243acfe52 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go @@ -82,7 +82,7 @@ func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Create(ctx context.Context, deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) { +func (c *FakeDeployments) Create(ctx context.Context, deployment *appsv1.Deployment, opts v1.CreateOptions) (result *appsv1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{}) @@ -93,7 +93,7 @@ func (c *FakeDeployments) Create(ctx context.Context, deployment *appsv1.Deploym } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Update(ctx context.Context, deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) { +func (c *FakeDeployments) Update(ctx context.Context, deployment *appsv1.Deployment, opts v1.UpdateOptions) (result *appsv1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{}) @@ -105,7 +105,7 @@ func (c *FakeDeployments) Update(ctx context.Context, deployment *appsv1.Deploym // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *appsv1.Deployment) (*appsv1.Deployment, error) { +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *appsv1.Deployment, opts v1.UpdateOptions) (*appsv1.Deployment, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &appsv1.Deployment{}) @@ -132,7 +132,7 @@ func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.Deployment, err error) { +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &appsv1.Deployment{}) @@ -154,7 +154,7 @@ func (c *FakeDeployments) GetScale(ctx context.Context, deploymentName string, o } // 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 *FakeDeployments) UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *FakeDeployments) UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go index 519dd2536ae..38c7400bad6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go @@ -82,7 +82,7 @@ func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *appsv1.ReplicaSet, opts v1.CreateOptions) (result *appsv1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{}) @@ -93,7 +93,7 @@ func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *appsv1.Replica } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *appsv1.ReplicaSet, opts v1.UpdateOptions) (result *appsv1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{}) @@ -105,7 +105,7 @@ func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *appsv1.Replica // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *appsv1.ReplicaSet) (*appsv1.ReplicaSet, error) { +func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *appsv1.ReplicaSet, opts v1.UpdateOptions) (*appsv1.ReplicaSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &appsv1.ReplicaSet{}) @@ -132,7 +132,7 @@ func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &appsv1.ReplicaSet{}) @@ -154,7 +154,7 @@ func (c *FakeReplicaSets) GetScale(ctx context.Context, replicaSetName string, o } // 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 *FakeReplicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *FakeReplicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go index 79b3252eea7..2accba210d0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go @@ -82,7 +82,7 @@ func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watc } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) { +func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *appsv1.StatefulSet, opts v1.CreateOptions) (result *appsv1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{}) @@ -93,7 +93,7 @@ func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *appsv1.State } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) { +func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *appsv1.StatefulSet, opts v1.UpdateOptions) (result *appsv1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{}) @@ -105,7 +105,7 @@ func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *appsv1.State // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *appsv1.StatefulSet) (*appsv1.StatefulSet, error) { +func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *appsv1.StatefulSet, opts v1.UpdateOptions) (*appsv1.StatefulSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &appsv1.StatefulSet{}) @@ -132,7 +132,7 @@ func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.Del } // Patch applies the patch and returns the patched statefulSet. -func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.StatefulSet, err error) { +func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &appsv1.StatefulSet{}) @@ -154,7 +154,7 @@ func (c *FakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, } // 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 *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go index 09e59063528..2b94003fb05 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go @@ -39,17 +39,17 @@ type ReplicaSetsGetter interface { // ReplicaSetInterface has methods to work with ReplicaSet resources. type ReplicaSetInterface interface { - Create(context.Context, *v1.ReplicaSet) (*v1.ReplicaSet, error) - Update(context.Context, *v1.ReplicaSet) (*v1.ReplicaSet, error) - UpdateStatus(context.Context, *v1.ReplicaSet) (*v1.ReplicaSet, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ReplicaSet, error) + Create(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.CreateOptions) (*v1.ReplicaSet, error) + Update(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (*v1.ReplicaSet, error) + UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (*v1.ReplicaSet, 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.ReplicaSet, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ReplicaSetList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ReplicaSet, err error) GetScale(ctx context.Context, replicaSetName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) - UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error) + UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error) ReplicaSetExpansion } @@ -114,11 +114,12 @@ func (c *replicaSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Create(ctx context.Context, replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) { +func (c *replicaSets) Create(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.CreateOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Post(). Namespace(c.ns). Resource("replicasets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). Do(ctx). Into(result) @@ -126,12 +127,13 @@ func (c *replicaSets) Create(ctx context.Context, replicaSet *v1.ReplicaSet) (re } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Update(ctx context.Context, replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) { +func (c *replicaSets) Update(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). Do(ctx). Into(result) @@ -140,14 +142,14 @@ func (c *replicaSets) Update(ctx context.Context, replicaSet *v1.ReplicaSet) (re // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) { +func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). Do(ctx). Into(result) @@ -182,13 +184,14 @@ func (c *replicaSets) DeleteCollection(ctx context.Context, options *metav1.Dele } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error) { +func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("replicasets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -210,13 +213,14 @@ func (c *replicaSets) GetScale(ctx context.Context, replicaSetName string, optio } // UpdateScale takes the top resource name and 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 *replicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *replicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSetName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go index 45196ac2291..7fd748cfe9f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go @@ -39,17 +39,17 @@ type StatefulSetsGetter interface { // StatefulSetInterface has methods to work with StatefulSet resources. type StatefulSetInterface interface { - Create(context.Context, *v1.StatefulSet) (*v1.StatefulSet, error) - Update(context.Context, *v1.StatefulSet) (*v1.StatefulSet, error) - UpdateStatus(context.Context, *v1.StatefulSet) (*v1.StatefulSet, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.StatefulSet, error) + Create(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.CreateOptions) (*v1.StatefulSet, error) + Update(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, error) + UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, 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.StatefulSet, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.StatefulSetList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StatefulSet, err error) GetScale(ctx context.Context, statefulSetName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) - UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error) + UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error) StatefulSetExpansion } @@ -114,11 +114,12 @@ func (c *statefulSets) Watch(ctx context.Context, opts metav1.ListOptions) (watc } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Create(ctx context.Context, statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) { +func (c *statefulSets) Create(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.CreateOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Post(). Namespace(c.ns). Resource("statefulsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). Do(ctx). Into(result) @@ -126,12 +127,13 @@ func (c *statefulSets) Create(ctx context.Context, statefulSet *v1.StatefulSet) } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Update(ctx context.Context, statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) { +func (c *statefulSets) Update(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). Do(ctx). Into(result) @@ -140,14 +142,14 @@ func (c *statefulSets) Update(ctx context.Context, statefulSet *v1.StatefulSet) // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) { +func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). Do(ctx). Into(result) @@ -182,13 +184,14 @@ func (c *statefulSets) DeleteCollection(ctx context.Context, options *metav1.Del } // Patch applies the patch and returns the patched statefulSet. -func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error) { +func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("statefulsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -210,13 +213,14 @@ func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, opt } // UpdateScale takes the top resource name and 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 *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSetName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go index 9712b60f97c..d1833d03000 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go @@ -38,14 +38,14 @@ type ControllerRevisionsGetter interface { // ControllerRevisionInterface has methods to work with ControllerRevision resources. type ControllerRevisionInterface interface { - Create(context.Context, *v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error) - Update(context.Context, *v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.ControllerRevision, error) + Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.CreateOptions) (*v1beta1.ControllerRevision, error) + Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.UpdateOptions) (*v1beta1.ControllerRevision, 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.ControllerRevision, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ControllerRevisionList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControllerRevision, err error) ControllerRevisionExpansion } @@ -109,11 +109,12 @@ func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) { +func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.CreateOptions) (result *v1beta1.ControllerRevision, err error) { result = &v1beta1.ControllerRevision{} err = c.client.Post(). Namespace(c.ns). Resource("controllerrevisions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1 } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) { +func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.UpdateOptions) (result *v1beta1.ControllerRevision, err error) { result = &v1beta1.ControllerRevision{} err = c.client.Put(). Namespace(c.ns). Resource("controllerrevisions"). Name(controllerRevision.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *controllerRevisions) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched controllerRevision. -func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) { +func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControllerRevision, err error) { result = &v1beta1.ControllerRevision{} err = c.client.Patch(pt). Namespace(c.ns). Resource("controllerrevisions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go index 1701f19a4b3..64480f32e1f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go @@ -38,15 +38,15 @@ type DeploymentsGetter interface { // DeploymentInterface has methods to work with Deployment resources. type DeploymentInterface interface { - Create(context.Context, *v1beta1.Deployment) (*v1beta1.Deployment, error) - Update(context.Context, *v1beta1.Deployment) (*v1beta1.Deployment, error) - UpdateStatus(context.Context, *v1beta1.Deployment) (*v1beta1.Deployment, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.Deployment, error) + Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (*v1beta1.Deployment, error) + Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) + UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, 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.Deployment, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DeploymentList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) DeploymentExpansion } @@ -110,11 +110,12 @@ func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Post(). Namespace(c.ns). Resource("deployments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *deployments) DeleteCollection(ctx context.Context, options *v1.DeleteOp } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). Resource("deployments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go index 3d4e2908345..f005c6a7560 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go @@ -81,7 +81,7 @@ func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.CreateOptions) (result *v1beta1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta1.ControllerRevision{}) @@ -92,7 +92,7 @@ func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.UpdateOptions) (result *v1beta1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta1.ControllerRevision{}) @@ -119,7 +119,7 @@ func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched controllerRevision. -func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &v1beta1.ControllerRevision{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go index 322a6e28f06..1e76cde0780 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go @@ -81,7 +81,7 @@ func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) @@ -92,7 +92,7 @@ func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deploy } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) @@ -104,7 +104,7 @@ func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deploy // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) { +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{}) @@ -131,7 +131,7 @@ func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta1.Deployment{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go index cb2114b6fc6..6c443aedf35 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go @@ -81,7 +81,7 @@ func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watc } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { +func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.CreateOptions) (result *v1beta1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1beta1.StatefulSet{}) @@ -92,7 +92,7 @@ func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta1.Stat } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { +func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (result *v1beta1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1beta1.StatefulSet{}) @@ -104,7 +104,7 @@ func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta1.Stat // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) { +func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1beta1.StatefulSet{}) @@ -131,7 +131,7 @@ func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.Del } // Patch applies the patch and returns the patched statefulSet. -func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { +func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1beta1.StatefulSet{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go index 55cd0588a3e..2b941a5feec 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go @@ -38,15 +38,15 @@ type StatefulSetsGetter interface { // StatefulSetInterface has methods to work with StatefulSet resources. type StatefulSetInterface interface { - Create(context.Context, *v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) - Update(context.Context, *v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) - UpdateStatus(context.Context, *v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.StatefulSet, error) + Create(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.CreateOptions) (*v1beta1.StatefulSet, error) + Update(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error) + UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, 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.StatefulSet, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.StatefulSetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StatefulSet, err error) StatefulSetExpansion } @@ -110,11 +110,12 @@ func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.CreateOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Post(). Namespace(c.ns). Resource("statefulsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta1.Stateful } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta1.Stateful // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *statefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched statefulSet. -func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("statefulsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go index e5473d356a7..f16e9883823 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go @@ -38,14 +38,14 @@ type ControllerRevisionsGetter interface { // ControllerRevisionInterface has methods to work with ControllerRevision resources. type ControllerRevisionInterface interface { - Create(context.Context, *v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error) - Update(context.Context, *v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta2.ControllerRevision, error) + Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.CreateOptions) (*v1beta2.ControllerRevision, error) + Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.UpdateOptions) (*v1beta2.ControllerRevision, 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) (*v1beta2.ControllerRevision, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ControllerRevisionList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ControllerRevision, err error) ControllerRevisionExpansion } @@ -109,11 +109,12 @@ func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) { +func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.CreateOptions) (result *v1beta2.ControllerRevision, err error) { result = &v1beta2.ControllerRevision{} err = c.client.Post(). Namespace(c.ns). Resource("controllerrevisions"). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1 } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) { +func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.UpdateOptions) (result *v1beta2.ControllerRevision, err error) { result = &v1beta2.ControllerRevision{} err = c.client.Put(). Namespace(c.ns). Resource("controllerrevisions"). Name(controllerRevision.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(controllerRevision). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *controllerRevisions) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched controllerRevision. -func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) { +func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ControllerRevision, err error) { result = &v1beta2.ControllerRevision{} err = c.client.Patch(pt). Namespace(c.ns). Resource("controllerrevisions"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go index b0fc1408581..6cfedf19fb0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go @@ -38,15 +38,15 @@ type DaemonSetsGetter interface { // DaemonSetInterface has methods to work with DaemonSet resources. type DaemonSetInterface interface { - Create(context.Context, *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) - Update(context.Context, *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) - UpdateStatus(context.Context, *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta2.DaemonSet, error) + Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.CreateOptions) (*v1beta2.DaemonSet, error) + Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error) + UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, 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) (*v1beta2.DaemonSet, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DaemonSetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.DaemonSet, err error) DaemonSetExpansion } @@ -110,11 +110,12 @@ func (c *daemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) { +func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.CreateOptions) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Post(). Namespace(c.ns). Resource("daemonsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet) ( } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) { +func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet) ( // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) { +func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *daemonSets) DeleteCollection(ctx context.Context, options *v1.DeleteOpt } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error) { +func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.DaemonSet, err error) { result = &v1beta2.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("daemonsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go index 199b7e386b8..abb09d2ab2e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go @@ -38,15 +38,15 @@ type DeploymentsGetter interface { // DeploymentInterface has methods to work with Deployment resources. type DeploymentInterface interface { - Create(context.Context, *v1beta2.Deployment) (*v1beta2.Deployment, error) - Update(context.Context, *v1beta2.Deployment) (*v1beta2.Deployment, error) - UpdateStatus(context.Context, *v1beta2.Deployment) (*v1beta2.Deployment, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta2.Deployment, error) + Create(ctx context.Context, deployment *v1beta2.Deployment, opts v1.CreateOptions) (*v1beta2.Deployment, error) + Update(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error) + UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, 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) (*v1beta2.Deployment, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DeploymentList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.Deployment, err error) DeploymentExpansion } @@ -110,11 +110,12 @@ func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Create(ctx context.Context, deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) { +func (c *deployments) Create(ctx context.Context, deployment *v1beta2.Deployment, opts v1.CreateOptions) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Post(). Namespace(c.ns). Resource("deployments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *deployments) Create(ctx context.Context, deployment *v1beta2.Deployment } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Update(ctx context.Context, deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) { +func (c *deployments) Update(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *deployments) Update(ctx context.Context, deployment *v1beta2.Deployment // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) { +func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *deployments) DeleteCollection(ctx context.Context, options *v1.DeleteOp } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error) { +func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.Deployment, err error) { result = &v1beta2.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). Resource("deployments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go index a5997ff3757..a6d041f0f96 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go @@ -81,7 +81,7 @@ func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.CreateOptions) (result *v1beta2.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{}) @@ -92,7 +92,7 @@ func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.UpdateOptions) (result *v1beta2.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{}) @@ -119,7 +119,7 @@ func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched controllerRevision. -func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ControllerRevision, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &v1beta2.ControllerRevision{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go index ef31c2ece7c..80b09794f9b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go @@ -81,7 +81,7 @@ func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) { +func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.CreateOptions) (result *v1beta2.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta2.DaemonSet{}) @@ -92,7 +92,7 @@ func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSe } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) { +func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (result *v1beta2.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1beta2.DaemonSet{}) @@ -104,7 +104,7 @@ func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSe // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) { +func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1beta2.DaemonSet{}) @@ -131,7 +131,7 @@ func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &v1beta2.DaemonSet{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go index 53423db6690..26cc4a4b6ac 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go @@ -81,7 +81,7 @@ func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) { +func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta2.Deployment, opts v1.CreateOptions) (result *v1beta2.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta2.Deployment{}) @@ -92,7 +92,7 @@ func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta2.Deploy } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) { +func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (result *v1beta2.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta2.Deployment{}) @@ -104,7 +104,7 @@ func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta2.Deploy // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment) (*v1beta2.Deployment, error) { +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta2.Deployment{}) @@ -131,7 +131,7 @@ func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error) { +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta2.Deployment{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go index f1637e89b97..618c4ef74c8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go @@ -81,7 +81,7 @@ func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) { +func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.CreateOptions) (result *v1beta2.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1beta2.ReplicaSet{}) @@ -92,7 +92,7 @@ func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta2.Replic } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) { +func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (result *v1beta2.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta2.ReplicaSet{}) @@ -104,7 +104,7 @@ func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta2.Replic // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) { +func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta2.ReplicaSet{}) @@ -131,7 +131,7 @@ func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &v1beta2.ReplicaSet{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go index e27dfbcf1f2..ad6b736d687 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go @@ -81,7 +81,7 @@ func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watc } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) { +func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.CreateOptions) (result *v1beta2.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1beta2.StatefulSet{}) @@ -92,7 +92,7 @@ func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta2.Stat } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) { +func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (result *v1beta2.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1beta2.StatefulSet{}) @@ -104,7 +104,7 @@ func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta2.Stat // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) { +func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1beta2.StatefulSet{}) @@ -131,7 +131,7 @@ func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.Del } // Patch applies the patch and returns the patched statefulSet. -func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error) { +func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1beta2.StatefulSet{}) @@ -153,7 +153,7 @@ func (c *FakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, } // 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 *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale) (result *v1beta2.Scale, err error) { +func (c *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale, opts v1.UpdateOptions) (result *v1beta2.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &v1beta2.Scale{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go index a95a19cccc6..84b7d16ae00 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go @@ -38,15 +38,15 @@ type ReplicaSetsGetter interface { // ReplicaSetInterface has methods to work with ReplicaSet resources. type ReplicaSetInterface interface { - Create(context.Context, *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) - Update(context.Context, *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) - UpdateStatus(context.Context, *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta2.ReplicaSet, error) + Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.CreateOptions) (*v1beta2.ReplicaSet, error) + Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error) + UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, 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) (*v1beta2.ReplicaSet, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ReplicaSetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ReplicaSet, err error) ReplicaSetExpansion } @@ -110,11 +110,12 @@ func (c *replicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) { +func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.CreateOptions) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Post(). Namespace(c.ns). Resource("replicasets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) { +func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) { +func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *replicaSets) DeleteCollection(ctx context.Context, options *v1.DeleteOp } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error) { +func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ReplicaSet, err error) { result = &v1beta2.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("replicasets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go index 4e402232377..ed6393043f7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go @@ -38,17 +38,17 @@ type StatefulSetsGetter interface { // StatefulSetInterface has methods to work with StatefulSet resources. type StatefulSetInterface interface { - Create(context.Context, *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) - Update(context.Context, *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) - UpdateStatus(context.Context, *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta2.StatefulSet, error) + Create(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.CreateOptions) (*v1beta2.StatefulSet, error) + Update(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error) + UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, 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) (*v1beta2.StatefulSet, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.StatefulSetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.StatefulSet, err error) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (*v1beta2.Scale, error) - UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale) (*v1beta2.Scale, error) + UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale, opts v1.UpdateOptions) (*v1beta2.Scale, error) StatefulSetExpansion } @@ -113,11 +113,12 @@ func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) { +func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.CreateOptions) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Post(). Namespace(c.ns). Resource("statefulsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). Do(ctx). Into(result) @@ -125,12 +126,13 @@ func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta2.Stateful } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) { +func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). Do(ctx). Into(result) @@ -139,14 +141,14 @@ func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta2.Stateful // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) { +func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(statefulSet). Do(ctx). Into(result) @@ -181,13 +183,14 @@ func (c *statefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched statefulSet. -func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error) { +func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.StatefulSet, err error) { result = &v1beta2.StatefulSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("statefulsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -209,13 +212,14 @@ func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, opt } // UpdateScale takes the top resource name and 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 *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale) (result *v1beta2.Scale, err error) { +func (c *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale, opts v1.UpdateOptions) (result *v1beta2.Scale, err error) { result = &v1beta2.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("statefulsets"). Name(statefulSetName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go b/staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go index 1ddbc702e08..68446e2176d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go @@ -38,14 +38,14 @@ type AuditSinksGetter interface { // AuditSinkInterface has methods to work with AuditSink resources. type AuditSinkInterface interface { - Create(context.Context, *v1alpha1.AuditSink) (*v1alpha1.AuditSink, error) - Update(context.Context, *v1alpha1.AuditSink) (*v1alpha1.AuditSink, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.AuditSink, error) + Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (*v1alpha1.AuditSink, error) + Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (*v1alpha1.AuditSink, 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.AuditSink, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AuditSinkList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AuditSink, err error) AuditSinkExpansion } @@ -104,10 +104,11 @@ func (c *auditSinks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } // Create takes the representation of a auditSink and creates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *auditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) { +func (c *auditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (result *v1alpha1.AuditSink, err error) { result = &v1alpha1.AuditSink{} err = c.client.Post(). Resource("auditsinks"). + VersionedParams(&opts, scheme.ParameterCodec). Body(auditSink). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *auditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink) } // Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *auditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) { +func (c *auditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (result *v1alpha1.AuditSink, err error) { result = &v1alpha1.AuditSink{} err = c.client.Put(). Resource("auditsinks"). Name(auditSink.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(auditSink). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *auditSinks) DeleteCollection(ctx context.Context, options *v1.DeleteOpt } // Patch applies the patch and returns the patched auditSink. -func (c *auditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error) { +func (c *auditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AuditSink, err error) { result = &v1alpha1.AuditSink{} err = c.client.Patch(pt). Resource("auditsinks"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go b/staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go index 2db9a387217..bd0c95be21f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go @@ -77,7 +77,7 @@ func (c *FakeAuditSinks) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a auditSink and creates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *FakeAuditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) { +func (c *FakeAuditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (result *v1alpha1.AuditSink, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(auditsinksResource, auditSink), &v1alpha1.AuditSink{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeAuditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSi } // Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *FakeAuditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) { +func (c *FakeAuditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (result *v1alpha1.AuditSink, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(auditsinksResource, auditSink), &v1alpha1.AuditSink{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeAuditSinks) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched auditSink. -func (c *FakeAuditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error) { +func (c *FakeAuditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AuditSink, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(auditsinksResource, name, pt, data, subresources...), &v1alpha1.AuditSink{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/BUILD index 7ddf71975c5..9acc4a0a335 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/BUILD @@ -18,6 +18,7 @@ go_library( importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1", deps = [ "//staging/src/k8s.io/api/authentication/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", ], diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/BUILD index dfa5cfa9e98..429e39473fd 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/BUILD @@ -17,6 +17,7 @@ go_library( importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1/fake", deps = [ "//staging/src/k8s.io/api/authentication/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go index d3cf33d547b..b85fcfbb87d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go @@ -22,6 +22,7 @@ import ( "context" v1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" ) @@ -36,7 +37,7 @@ var tokenreviewsResource = schema.GroupVersionResource{Group: "authentication.k8 var tokenreviewsKind = schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1", Kind: "TokenReview"} // Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any. -func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview) (result *v1.TokenReview, err error) { +func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview, opts metav1.CreateOptions) (result *v1.TokenReview, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1.TokenReview{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go index 5f5a91fc9f1..ca7cd47d26b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go @@ -22,6 +22,8 @@ import ( "context" v1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -33,7 +35,7 @@ type TokenReviewsGetter interface { // TokenReviewInterface has methods to work with TokenReview resources. type TokenReviewInterface interface { - Create(context.Context, *v1.TokenReview) (*v1.TokenReview, error) + Create(ctx context.Context, tokenReview *v1.TokenReview, opts metav1.CreateOptions) (*v1.TokenReview, error) TokenReviewExpansion } @@ -50,10 +52,11 @@ func newTokenReviews(c *AuthenticationV1Client) *tokenReviews { } // Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any. -func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview) (result *v1.TokenReview, err error) { +func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview, opts metav1.CreateOptions) (result *v1.TokenReview, err error) { result = &v1.TokenReview{} err = c.client.Post(). Resource("tokenreviews"). + VersionedParams(&opts, scheme.ParameterCodec). Body(tokenReview). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/BUILD index 6e4ee1bdd4d..174bc453257 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/BUILD @@ -18,6 +18,7 @@ go_library( importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1beta1", deps = [ "//staging/src/k8s.io/api/authentication/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", ], diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/BUILD index 4b7ee4d1d38..103e38e2056 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/BUILD @@ -17,6 +17,7 @@ go_library( importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake", deps = [ "//staging/src/k8s.io/api/authentication/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go index 83aff9e18b7..0da3ec6f437 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go @@ -22,6 +22,7 @@ import ( "context" v1beta1 "k8s.io/api/authentication/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" ) @@ -36,7 +37,7 @@ var tokenreviewsResource = schema.GroupVersionResource{Group: "authentication.k8 var tokenreviewsKind = schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1beta1", Kind: "TokenReview"} // Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any. -func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview) (result *v1beta1.TokenReview, err error) { +func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview, opts v1.CreateOptions) (result *v1beta1.TokenReview, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1beta1.TokenReview{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go index c54d59ff840..5da12243373 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go @@ -22,6 +22,8 @@ import ( "context" v1beta1 "k8s.io/api/authentication/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -33,7 +35,7 @@ type TokenReviewsGetter interface { // TokenReviewInterface has methods to work with TokenReview resources. type TokenReviewInterface interface { - Create(context.Context, *v1beta1.TokenReview) (*v1beta1.TokenReview, error) + Create(ctx context.Context, tokenReview *v1beta1.TokenReview, opts v1.CreateOptions) (*v1beta1.TokenReview, error) TokenReviewExpansion } @@ -50,10 +52,11 @@ func newTokenReviews(c *AuthenticationV1beta1Client) *tokenReviews { } // Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any. -func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview) (result *v1beta1.TokenReview, err error) { +func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview, opts v1.CreateOptions) (result *v1beta1.TokenReview, err error) { result = &v1beta1.TokenReview{} err = c.client.Post(). Resource("tokenreviews"). + VersionedParams(&opts, scheme.ParameterCodec). Body(tokenReview). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/BUILD index fcc864f2241..f6a071181d0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/BUILD @@ -24,6 +24,7 @@ go_library( importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1", deps = [ "//staging/src/k8s.io/api/authorization/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", ], diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/BUILD index 0f51b7fa6a7..969cea275cc 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/BUILD @@ -23,6 +23,7 @@ go_library( importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1/fake", deps = [ "//staging/src/k8s.io/api/authorization/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go index 4bf694956cb..d74ae0a474d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go @@ -22,6 +22,7 @@ import ( "context" v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" ) @@ -37,7 +38,7 @@ var localsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "auth var localsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "LocalSubjectAccessReview"} // Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any. -func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview) (result *v1.LocalSubjectAccessReview, err error) { +func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (result *v1.LocalSubjectAccessReview, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1.LocalSubjectAccessReview{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go index ee02428dead..80ebbbd45f3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go @@ -22,6 +22,7 @@ import ( "context" v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" ) @@ -36,7 +37,7 @@ var selfsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "autho var selfsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SelfSubjectAccessReview"} // Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. -func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview) (result *v1.SelfSubjectAccessReview, err error) { +func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.CreateOptions) (result *v1.SelfSubjectAccessReview, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1.SelfSubjectAccessReview{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go index 7a93225e948..dd70908ad31 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go @@ -22,6 +22,7 @@ import ( "context" v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" ) @@ -36,7 +37,7 @@ var selfsubjectrulesreviewsResource = schema.GroupVersionResource{Group: "author var selfsubjectrulesreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "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) (result *v1.SelfSubjectRulesReview, err error) { +func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (result *v1.SelfSubjectRulesReview, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1.SelfSubjectRulesReview{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go index 058f1923979..b480b2b4187 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go @@ -22,6 +22,7 @@ import ( "context" v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" ) @@ -36,7 +37,7 @@ var subjectaccessreviewsResource = schema.GroupVersionResource{Group: "authoriza var subjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SubjectAccessReview"} // Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. -func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview) (result *v1.SubjectAccessReview, err error) { +func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReview, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1.SubjectAccessReview{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go index b2553069190..84b2efe166f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go @@ -22,6 +22,8 @@ import ( "context" v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -33,7 +35,7 @@ type LocalSubjectAccessReviewsGetter interface { // LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources. type LocalSubjectAccessReviewInterface interface { - Create(context.Context, *v1.LocalSubjectAccessReview) (*v1.LocalSubjectAccessReview, error) + Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (*v1.LocalSubjectAccessReview, error) LocalSubjectAccessReviewExpansion } @@ -52,11 +54,12 @@ func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *l } // Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any. -func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview) (result *v1.LocalSubjectAccessReview, err error) { +func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (result *v1.LocalSubjectAccessReview, err error) { result = &v1.LocalSubjectAccessReview{} err = c.client.Post(). Namespace(c.ns). Resource("localsubjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). Body(localSubjectAccessReview). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go index f5c3f4156e7..2006196c11c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go @@ -22,6 +22,8 @@ import ( "context" v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -33,7 +35,7 @@ type SelfSubjectAccessReviewsGetter interface { // SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources. type SelfSubjectAccessReviewInterface interface { - Create(context.Context, *v1.SelfSubjectAccessReview) (*v1.SelfSubjectAccessReview, error) + Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.CreateOptions) (*v1.SelfSubjectAccessReview, error) SelfSubjectAccessReviewExpansion } @@ -50,10 +52,11 @@ func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessRev } // Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. -func (c *selfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview) (result *v1.SelfSubjectAccessReview, err error) { +func (c *selfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.CreateOptions) (result *v1.SelfSubjectAccessReview, err error) { result = &v1.SelfSubjectAccessReview{} err = c.client.Post(). Resource("selfsubjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). Body(selfSubjectAccessReview). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go index 5b02fcd9379..25d99f7b525 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go @@ -22,6 +22,8 @@ import ( "context" v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -33,7 +35,7 @@ type SelfSubjectRulesReviewsGetter interface { // SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources. type SelfSubjectRulesReviewInterface interface { - Create(context.Context, *v1.SelfSubjectRulesReview) (*v1.SelfSubjectRulesReview, error) + Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (*v1.SelfSubjectRulesReview, error) SelfSubjectRulesReviewExpansion } @@ -50,10 +52,11 @@ func newSelfSubjectRulesReviews(c *AuthorizationV1Client) *selfSubjectRulesRevie } // 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 *selfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview) (result *v1.SelfSubjectRulesReview, err error) { +func (c *selfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (result *v1.SelfSubjectRulesReview, err error) { result = &v1.SelfSubjectRulesReview{} err = c.client.Post(). Resource("selfsubjectrulesreviews"). + VersionedParams(&opts, scheme.ParameterCodec). Body(selfSubjectRulesReview). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go index aaeb7a1207c..8ac0566a2e6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go @@ -22,6 +22,8 @@ import ( "context" v1 "k8s.io/api/authorization/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -33,7 +35,7 @@ type SubjectAccessReviewsGetter interface { // SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources. type SubjectAccessReviewInterface interface { - Create(context.Context, *v1.SubjectAccessReview) (*v1.SubjectAccessReview, error) + Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (*v1.SubjectAccessReview, error) SubjectAccessReviewExpansion } @@ -50,10 +52,11 @@ func newSubjectAccessReviews(c *AuthorizationV1Client) *subjectAccessReviews { } // Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. -func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview) (result *v1.SubjectAccessReview, err error) { +func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReview, err error) { result = &v1.SubjectAccessReview{} err = c.client.Post(). Resource("subjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). Body(subjectAccessReview). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/BUILD index c830646718f..29a7979f604 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/BUILD @@ -24,6 +24,7 @@ go_library( importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1beta1", deps = [ "//staging/src/k8s.io/api/authorization/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", ], diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/BUILD b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/BUILD index 00d72bc3a5c..fc61d77816a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/BUILD +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/BUILD @@ -24,6 +24,7 @@ go_library( importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake", deps = [ "//staging/src/k8s.io/api/authorization/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go index e8471a579c0..2d3ba446283 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go @@ -22,6 +22,7 @@ import ( "context" v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" ) @@ -37,7 +38,7 @@ var localsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "auth var localsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "LocalSubjectAccessReview"} // Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any. -func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview) (result *v1beta1.LocalSubjectAccessReview, err error) { +func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.LocalSubjectAccessReview, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1beta1.LocalSubjectAccessReview{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go index 41f321cceb6..febe90c77a0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go @@ -22,6 +22,7 @@ import ( "context" v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" ) @@ -36,7 +37,7 @@ var selfsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "autho var selfsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SelfSubjectAccessReview"} // Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. -func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview) (result *v1beta1.SelfSubjectAccessReview, err error) { +func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectAccessReview, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1beta1.SelfSubjectAccessReview{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go index 61ad5c8ced3..02df06012a7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go @@ -22,6 +22,7 @@ import ( "context" v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" ) @@ -36,7 +37,7 @@ var selfsubjectrulesreviewsResource = schema.GroupVersionResource{Group: "author var selfsubjectrulesreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "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 *v1beta1.SelfSubjectRulesReview) (result *v1beta1.SelfSubjectRulesReview, err error) { +func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectRulesReview, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1beta1.SelfSubjectRulesReview{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go index 0fcd59c5468..b5be913c4bb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go @@ -22,6 +22,7 @@ import ( "context" v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" ) @@ -36,7 +37,7 @@ var subjectaccessreviewsResource = schema.GroupVersionResource{Group: "authoriza var subjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SubjectAccessReview"} // Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. -func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview) (result *v1beta1.SubjectAccessReview, err error) { +func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SubjectAccessReview, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1beta1.SubjectAccessReview{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go index d51a03aabb1..78584ba9458 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go @@ -22,6 +22,8 @@ import ( "context" v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -33,7 +35,7 @@ type LocalSubjectAccessReviewsGetter interface { // LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources. type LocalSubjectAccessReviewInterface interface { - Create(context.Context, *v1beta1.LocalSubjectAccessReview) (*v1beta1.LocalSubjectAccessReview, error) + Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview, opts v1.CreateOptions) (*v1beta1.LocalSubjectAccessReview, error) LocalSubjectAccessReviewExpansion } @@ -52,11 +54,12 @@ func newLocalSubjectAccessReviews(c *AuthorizationV1beta1Client, namespace strin } // Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any. -func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview) (result *v1beta1.LocalSubjectAccessReview, err error) { +func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.LocalSubjectAccessReview, err error) { result = &v1beta1.LocalSubjectAccessReview{} err = c.client.Post(). Namespace(c.ns). Resource("localsubjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). Body(localSubjectAccessReview). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go index bf9fe0b1843..0286c93fe6a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go @@ -22,6 +22,8 @@ import ( "context" v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -33,7 +35,7 @@ type SelfSubjectAccessReviewsGetter interface { // SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources. type SelfSubjectAccessReviewInterface interface { - Create(context.Context, *v1beta1.SelfSubjectAccessReview) (*v1beta1.SelfSubjectAccessReview, error) + Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview, opts v1.CreateOptions) (*v1beta1.SelfSubjectAccessReview, error) SelfSubjectAccessReviewExpansion } @@ -50,10 +52,11 @@ func newSelfSubjectAccessReviews(c *AuthorizationV1beta1Client) *selfSubjectAcce } // Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any. -func (c *selfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview) (result *v1beta1.SelfSubjectAccessReview, err error) { +func (c *selfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectAccessReview, err error) { result = &v1beta1.SelfSubjectAccessReview{} err = c.client.Post(). Resource("selfsubjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). Body(selfSubjectAccessReview). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go index 874e9db91f4..d772973ec6e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go @@ -22,6 +22,8 @@ import ( "context" v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -33,7 +35,7 @@ type SelfSubjectRulesReviewsGetter interface { // SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources. type SelfSubjectRulesReviewInterface interface { - Create(context.Context, *v1beta1.SelfSubjectRulesReview) (*v1beta1.SelfSubjectRulesReview, error) + Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview, opts v1.CreateOptions) (*v1beta1.SelfSubjectRulesReview, error) SelfSubjectRulesReviewExpansion } @@ -50,10 +52,11 @@ func newSelfSubjectRulesReviews(c *AuthorizationV1beta1Client) *selfSubjectRules } // 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 *selfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview) (result *v1beta1.SelfSubjectRulesReview, err error) { +func (c *selfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectRulesReview, err error) { result = &v1beta1.SelfSubjectRulesReview{} err = c.client.Post(). Resource("selfsubjectrulesreviews"). + VersionedParams(&opts, scheme.ParameterCodec). Body(selfSubjectRulesReview). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go index 3445f5a9180..aebe8398c0f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go @@ -22,6 +22,8 @@ import ( "context" v1beta1 "k8s.io/api/authorization/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) @@ -33,7 +35,7 @@ type SubjectAccessReviewsGetter interface { // SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources. type SubjectAccessReviewInterface interface { - Create(context.Context, *v1beta1.SubjectAccessReview) (*v1beta1.SubjectAccessReview, error) + Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview, opts v1.CreateOptions) (*v1beta1.SubjectAccessReview, error) SubjectAccessReviewExpansion } @@ -50,10 +52,11 @@ func newSubjectAccessReviews(c *AuthorizationV1beta1Client) *subjectAccessReview } // Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any. -func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview) (result *v1beta1.SubjectAccessReview, err error) { +func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SubjectAccessReview, err error) { result = &v1beta1.SubjectAccessReview{} err = c.client.Post(). Resource("subjectaccessreviews"). + VersionedParams(&opts, scheme.ParameterCodec). Body(subjectAccessReview). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go index 1c42305dd3d..22fe6d45739 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go @@ -81,7 +81,7 @@ func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOp } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) @@ -92,7 +92,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPod } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) @@ -104,7 +104,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPod // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (*autoscalingv1.HorizontalPodAutoscaler, error) { +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*autoscalingv1.HorizontalPodAutoscaler, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) @@ -131,7 +131,7 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opt } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &autoscalingv1.HorizontalPodAutoscaler{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go index 840b1aafc4d..1228ce73135 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -38,15 +38,15 @@ type HorizontalPodAutoscalersGetter interface { // HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. type HorizontalPodAutoscalerInterface interface { - Create(context.Context, *v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) - Update(context.Context, *v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) - UpdateStatus(context.Context, *v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.HorizontalPodAutoscaler, error) + Create(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.CreateOptions) (*v1.HorizontalPodAutoscaler, error) + Update(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (*v1.HorizontalPodAutoscaler, error) + UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (*v1.HorizontalPodAutoscaler, 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.HorizontalPodAutoscaler, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } @@ -110,11 +110,12 @@ func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts metav1.ListOp } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.CreateOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Post(). Namespace(c.ns). Resource("horizontalpodautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAuto } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAuto // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Patch(pt). Namespace(c.ns). Resource("horizontalpodautoscalers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go index 78c381b4d8c..de28395fa67 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go @@ -81,7 +81,7 @@ func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOp } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{}) @@ -92,7 +92,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPod } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{}) @@ -104,7 +104,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPod // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error) { +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{}) @@ -131,7 +131,7 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opt } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2beta1.HorizontalPodAutoscaler{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go index 071d49b761b..a5b564d042a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -38,15 +38,15 @@ type HorizontalPodAutoscalersGetter interface { // HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. type HorizontalPodAutoscalerInterface interface { - Create(context.Context, *v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error) - Update(context.Context, *v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error) - UpdateStatus(context.Context, *v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v2beta1.HorizontalPodAutoscaler, error) + Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.CreateOptions) (*v2beta1.HorizontalPodAutoscaler, error) + Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error) + UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, 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) (*v2beta1.HorizontalPodAutoscaler, error) List(ctx context.Context, opts v1.ListOptions) (*v2beta1.HorizontalPodAutoscalerList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } @@ -110,11 +110,12 @@ func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOption } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Post(). Namespace(c.ns). Resource("horizontalpodautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAuto } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAuto // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) { result = &v2beta1.HorizontalPodAutoscaler{} err = c.client.Patch(pt). Namespace(c.ns). Resource("horizontalpodautoscalers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go index 6ece0b0e0c2..18ea026c164 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go @@ -81,7 +81,7 @@ func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOp } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{}) @@ -92,7 +92,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPod } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{}) @@ -104,7 +104,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPod // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) { +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{}) @@ -131,7 +131,7 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opt } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2beta2.HorizontalPodAutoscaler{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go index 2ac92e7d6a3..168137d72bb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -38,15 +38,15 @@ type HorizontalPodAutoscalersGetter interface { // HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. type HorizontalPodAutoscalerInterface interface { - Create(context.Context, *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) - Update(context.Context, *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) - UpdateStatus(context.Context, *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error) + Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.CreateOptions) (*v2beta2.HorizontalPodAutoscaler, error) + Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error) + UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, 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) (*v2beta2.HorizontalPodAutoscaler, error) List(ctx context.Context, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } @@ -110,11 +110,12 @@ func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOption } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Post(). Namespace(c.ns). Resource("horizontalpodautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAuto } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAuto // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Put(). Namespace(c.ns). Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(horizontalPodAutoscaler). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) { result = &v2beta2.HorizontalPodAutoscaler{} err = c.client.Patch(pt). Namespace(c.ns). Resource("horizontalpodautoscalers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go index 4b06092d51b..b09872952c8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go @@ -81,7 +81,7 @@ func (c *FakeJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } // Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any. -func (c *FakeJobs) Create(ctx context.Context, job *batchv1.Job) (result *batchv1.Job, err error) { +func (c *FakeJobs) Create(ctx context.Context, job *batchv1.Job, opts v1.CreateOptions) (result *batchv1.Job, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &batchv1.Job{}) @@ -92,7 +92,7 @@ func (c *FakeJobs) Create(ctx context.Context, job *batchv1.Job) (result *batchv } // Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any. -func (c *FakeJobs) Update(ctx context.Context, job *batchv1.Job) (result *batchv1.Job, err error) { +func (c *FakeJobs) Update(ctx context.Context, job *batchv1.Job, opts v1.UpdateOptions) (result *batchv1.Job, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &batchv1.Job{}) @@ -104,7 +104,7 @@ func (c *FakeJobs) Update(ctx context.Context, job *batchv1.Job) (result *batchv // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeJobs) UpdateStatus(ctx context.Context, job *batchv1.Job) (*batchv1.Job, error) { +func (c *FakeJobs) UpdateStatus(ctx context.Context, job *batchv1.Job, opts v1.UpdateOptions) (*batchv1.Job, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &batchv1.Job{}) @@ -131,7 +131,7 @@ func (c *FakeJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptio } // Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *batchv1.Job, err error) { +func (c *FakeJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *batchv1.Job, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, pt, data, subresources...), &batchv1.Job{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go index d50f680b365..1ad12320cbd 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go @@ -38,15 +38,15 @@ type JobsGetter interface { // JobInterface has methods to work with Job resources. type JobInterface interface { - Create(context.Context, *v1.Job) (*v1.Job, error) - Update(context.Context, *v1.Job) (*v1.Job, error) - UpdateStatus(context.Context, *v1.Job) (*v1.Job, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Job, error) + Create(ctx context.Context, job *v1.Job, opts metav1.CreateOptions) (*v1.Job, error) + Update(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (*v1.Job, error) + UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (*v1.Job, 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.Job, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.JobList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Job, err error) JobExpansion } @@ -110,11 +110,12 @@ func (c *jobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interf } // Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any. -func (c *jobs) Create(ctx context.Context, job *v1.Job) (result *v1.Job, err error) { +func (c *jobs) Create(ctx context.Context, job *v1.Job, opts metav1.CreateOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Post(). Namespace(c.ns). Resource("jobs"). + VersionedParams(&opts, scheme.ParameterCodec). Body(job). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *jobs) Create(ctx context.Context, job *v1.Job) (result *v1.Job, err err } // Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any. -func (c *jobs) Update(ctx context.Context, job *v1.Job) (result *v1.Job, err error) { +func (c *jobs) Update(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Put(). Namespace(c.ns). Resource("jobs"). Name(job.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(job). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *jobs) Update(ctx context.Context, job *v1.Job) (result *v1.Job, err 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 *jobs) UpdateStatus(ctx context.Context, job *v1.Job) (result *v1.Job, err error) { +func (c *jobs) UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Put(). Namespace(c.ns). Resource("jobs"). Name(job.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(job). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *jobs) DeleteCollection(ctx context.Context, options *metav1.DeleteOptio } // Patch applies the patch and returns the patched job. -func (c *jobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { +func (c *jobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Patch(pt). Namespace(c.ns). Resource("jobs"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go index 4fa41a571fb..743360e9934 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go @@ -38,15 +38,15 @@ type CronJobsGetter interface { // CronJobInterface has methods to work with CronJob resources. type CronJobInterface interface { - Create(context.Context, *v1beta1.CronJob) (*v1beta1.CronJob, error) - Update(context.Context, *v1beta1.CronJob) (*v1beta1.CronJob, error) - UpdateStatus(context.Context, *v1beta1.CronJob) (*v1beta1.CronJob, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.CronJob, error) + Create(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.CreateOptions) (*v1beta1.CronJob, error) + Update(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, error) + UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, 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.CronJob, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CronJobList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CronJob, err error) CronJobExpansion } @@ -110,11 +110,12 @@ func (c *cronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } // Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *cronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) { +func (c *cronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.CreateOptions) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Post(). Namespace(c.ns). Resource("cronjobs"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *cronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob) (result } // Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *cronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) { +func (c *cronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Put(). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *cronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob) (result // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) { +func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Put(). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *cronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptio } // Patch applies the patch and returns the patched cronJob. -func (c *cronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) { +func (c *cronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CronJob, err error) { result = &v1beta1.CronJob{} err = c.client.Patch(pt). Namespace(c.ns). Resource("cronjobs"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go index 411c4d8600e..3cc605dff5b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go @@ -81,7 +81,7 @@ func (c *FakeCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) { +func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.CreateOptions) (result *v1beta1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &v1beta1.CronJob{}) @@ -92,7 +92,7 @@ func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob) (re } // Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) { +func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (result *v1beta1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &v1beta1.CronJob{}) @@ -104,7 +104,7 @@ func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob) (re // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob) (*v1beta1.CronJob, error) { +func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob, opts v1.UpdateOptions) (*v1beta1.CronJob, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &v1beta1.CronJob{}) @@ -131,7 +131,7 @@ func (c *FakeCronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched cronJob. -func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) { +func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), &v1beta1.CronJob{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go index d8bf0b500b7..ea3cfefc93b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go @@ -38,15 +38,15 @@ type CronJobsGetter interface { // CronJobInterface has methods to work with CronJob resources. type CronJobInterface interface { - Create(context.Context, *v2alpha1.CronJob) (*v2alpha1.CronJob, error) - Update(context.Context, *v2alpha1.CronJob) (*v2alpha1.CronJob, error) - UpdateStatus(context.Context, *v2alpha1.CronJob) (*v2alpha1.CronJob, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v2alpha1.CronJob, error) + Create(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.CreateOptions) (*v2alpha1.CronJob, error) + Update(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error) + UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, 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) (*v2alpha1.CronJob, error) List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CronJobList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CronJob, err error) CronJobExpansion } @@ -110,11 +110,12 @@ func (c *cronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } // Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *cronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.CreateOptions) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Post(). Namespace(c.ns). Resource("cronjobs"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *cronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob) (resul } // Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *cronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Put(). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *cronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob) (resul // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Put(). Namespace(c.ns). Resource("cronjobs"). Name(cronJob.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cronJob). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *cronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptio } // Patch applies the patch and returns the patched cronJob. -func (c *cronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Patch(pt). Namespace(c.ns). Resource("cronjobs"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go index 2987aa2c7a7..f004d6793aa 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go @@ -81,7 +81,7 @@ func (c *FakeCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { +func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.CreateOptions) (result *v2alpha1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &v2alpha1.CronJob{}) @@ -92,7 +92,7 @@ func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob) (r } // Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any. -func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) { +func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (result *v2alpha1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &v2alpha1.CronJob{}) @@ -104,7 +104,7 @@ func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob) (r // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob) (*v2alpha1.CronJob, error) { +func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &v2alpha1.CronJob{}) @@ -131,7 +131,7 @@ func (c *FakeCronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched cronJob. -func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { +func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), &v2alpha1.CronJob{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go index 8582e07763c..a53b7e7477e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go @@ -38,15 +38,15 @@ type CertificateSigningRequestsGetter interface { // CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources. type CertificateSigningRequestInterface interface { - Create(context.Context, *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) - Update(context.Context, *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) - UpdateStatus(context.Context, *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.CertificateSigningRequest, error) + Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.CreateOptions) (*v1beta1.CertificateSigningRequest, error) + Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, error) + UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, 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.CertificateSigningRequest, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) CertificateSigningRequestExpansion } @@ -105,10 +105,11 @@ func (c *certificateSigningRequests) Watch(ctx context.Context, opts v1.ListOpti } // Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *certificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.CreateOptions) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Post(). Resource("certificatesigningrequests"). + VersionedParams(&opts, scheme.ParameterCodec). Body(certificateSigningRequest). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *certificateSigningRequests) Create(ctx context.Context, certificateSign } // Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *certificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(certificateSigningRequest). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *certificateSigningRequests) Update(ctx context.Context, certificateSign // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *certificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *certificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(certificateSigningRequest). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *certificateSigningRequests) DeleteCollection(ctx context.Context, optio } // Patch applies the patch and returns the patched certificateSigningRequest. -func (c *certificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *certificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { result = &v1beta1.CertificateSigningRequest{} err = c.client.Patch(pt). Resource("certificatesigningrequests"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go index d811dd25210..53b73318096 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go @@ -77,7 +77,7 @@ func (c *FakeCertificateSigningRequests) Watch(ctx context.Context, opts v1.List } // Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *FakeCertificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.CreateOptions) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeCertificateSigningRequests) Create(ctx context.Context, certificate } // Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *FakeCertificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeCertificateSigningRequests) Update(ctx context.Context, certificate // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCertificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) { +func (c *FakeCertificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest, opts v1.UpdateOptions) (*v1beta1.CertificateSigningRequest, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakeCertificateSigningRequests) DeleteCollection(ctx context.Context, o } // Patch applies the patch and returns the patched certificateSigningRequest. -func (c *FakeCertificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, pt, data, subresources...), &v1beta1.CertificateSigningRequest{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go index 74dffb17b05..ba65f6205e3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/fake/fake_lease.go @@ -81,7 +81,7 @@ func (c *FakeLeases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } // Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *FakeLeases) Create(ctx context.Context, lease *coordinationv1.Lease) (result *coordinationv1.Lease, err error) { +func (c *FakeLeases) Create(ctx context.Context, lease *coordinationv1.Lease, opts v1.CreateOptions) (result *coordinationv1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(leasesResource, c.ns, lease), &coordinationv1.Lease{}) @@ -92,7 +92,7 @@ func (c *FakeLeases) Create(ctx context.Context, lease *coordinationv1.Lease) (r } // Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *FakeLeases) Update(ctx context.Context, lease *coordinationv1.Lease) (result *coordinationv1.Lease, err error) { +func (c *FakeLeases) Update(ctx context.Context, lease *coordinationv1.Lease, opts v1.UpdateOptions) (result *coordinationv1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(leasesResource, c.ns, lease), &coordinationv1.Lease{}) @@ -119,7 +119,7 @@ func (c *FakeLeases) DeleteCollection(ctx context.Context, options *v1.DeleteOpt } // Patch applies the patch and returns the patched lease. -func (c *FakeLeases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *coordinationv1.Lease, err error) { +func (c *FakeLeases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *coordinationv1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, name, pt, data, subresources...), &coordinationv1.Lease{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go index ea006236c00..5077779b0be 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go @@ -38,14 +38,14 @@ type LeasesGetter interface { // LeaseInterface has methods to work with Lease resources. type LeaseInterface interface { - Create(context.Context, *v1.Lease) (*v1.Lease, error) - Update(context.Context, *v1.Lease) (*v1.Lease, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Lease, error) + Create(ctx context.Context, lease *v1.Lease, opts metav1.CreateOptions) (*v1.Lease, error) + Update(ctx context.Context, lease *v1.Lease, opts metav1.UpdateOptions) (*v1.Lease, 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.Lease, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.LeaseList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Lease, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Lease, err error) LeaseExpansion } @@ -109,11 +109,12 @@ func (c *leases) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inte } // Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *leases) Create(ctx context.Context, lease *v1.Lease) (result *v1.Lease, err error) { +func (c *leases) Create(ctx context.Context, lease *v1.Lease, opts metav1.CreateOptions) (result *v1.Lease, err error) { result = &v1.Lease{} err = c.client.Post(). Namespace(c.ns). Resource("leases"). + VersionedParams(&opts, scheme.ParameterCodec). Body(lease). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *leases) Create(ctx context.Context, lease *v1.Lease) (result *v1.Lease, } // Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *leases) Update(ctx context.Context, lease *v1.Lease) (result *v1.Lease, err error) { +func (c *leases) Update(ctx context.Context, lease *v1.Lease, opts metav1.UpdateOptions) (result *v1.Lease, err error) { result = &v1.Lease{} err = c.client.Put(). Namespace(c.ns). Resource("leases"). Name(lease.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(lease). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *leases) DeleteCollection(ctx context.Context, options *metav1.DeleteOpt } // Patch applies the patch and returns the patched lease. -func (c *leases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Lease, err error) { +func (c *leases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Lease, err error) { result = &v1.Lease{} err = c.client.Patch(pt). Namespace(c.ns). Resource("leases"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go index c3ebc52d0ac..53fc60bafff 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go @@ -81,7 +81,7 @@ func (c *FakeLeases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } // Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *FakeLeases) Create(ctx context.Context, lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { +func (c *FakeLeases) Create(ctx context.Context, lease *v1beta1.Lease, opts v1.CreateOptions) (result *v1beta1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(leasesResource, c.ns, lease), &v1beta1.Lease{}) @@ -92,7 +92,7 @@ func (c *FakeLeases) Create(ctx context.Context, lease *v1beta1.Lease) (result * } // Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *FakeLeases) Update(ctx context.Context, lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { +func (c *FakeLeases) Update(ctx context.Context, lease *v1beta1.Lease, opts v1.UpdateOptions) (result *v1beta1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(leasesResource, c.ns, lease), &v1beta1.Lease{}) @@ -119,7 +119,7 @@ func (c *FakeLeases) DeleteCollection(ctx context.Context, options *v1.DeleteOpt } // Patch applies the patch and returns the patched lease. -func (c *FakeLeases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) { +func (c *FakeLeases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Lease, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, name, pt, data, subresources...), &v1beta1.Lease{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go index d8db71e3e97..ca65b57fa73 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go @@ -38,14 +38,14 @@ type LeasesGetter interface { // LeaseInterface has methods to work with Lease resources. type LeaseInterface interface { - Create(context.Context, *v1beta1.Lease) (*v1beta1.Lease, error) - Update(context.Context, *v1beta1.Lease) (*v1beta1.Lease, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.Lease, error) + Create(ctx context.Context, lease *v1beta1.Lease, opts v1.CreateOptions) (*v1beta1.Lease, error) + Update(ctx context.Context, lease *v1beta1.Lease, opts v1.UpdateOptions) (*v1beta1.Lease, 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.Lease, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.LeaseList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Lease, err error) LeaseExpansion } @@ -109,11 +109,12 @@ func (c *leases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interfac } // Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *leases) Create(ctx context.Context, lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { +func (c *leases) Create(ctx context.Context, lease *v1beta1.Lease, opts v1.CreateOptions) (result *v1beta1.Lease, err error) { result = &v1beta1.Lease{} err = c.client.Post(). Namespace(c.ns). Resource("leases"). + VersionedParams(&opts, scheme.ParameterCodec). Body(lease). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *leases) Create(ctx context.Context, lease *v1beta1.Lease) (result *v1be } // Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. -func (c *leases) Update(ctx context.Context, lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { +func (c *leases) Update(ctx context.Context, lease *v1beta1.Lease, opts v1.UpdateOptions) (result *v1beta1.Lease, err error) { result = &v1beta1.Lease{} err = c.client.Put(). Namespace(c.ns). Resource("leases"). Name(lease.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(lease). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *leases) DeleteCollection(ctx context.Context, options *v1.DeleteOptions } // Patch applies the patch and returns the patched lease. -func (c *leases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) { +func (c *leases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Lease, err error) { result = &v1beta1.Lease{} err = c.client.Patch(pt). Namespace(c.ns). Resource("leases"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go index 54ddedee249..230ea29c5f5 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go @@ -38,14 +38,14 @@ type ComponentStatusesGetter interface { // ComponentStatusInterface has methods to work with ComponentStatus resources. type ComponentStatusInterface interface { - Create(context.Context, *v1.ComponentStatus) (*v1.ComponentStatus, error) - Update(context.Context, *v1.ComponentStatus) (*v1.ComponentStatus, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ComponentStatus, error) + Create(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.CreateOptions) (*v1.ComponentStatus, error) + Update(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.UpdateOptions) (*v1.ComponentStatus, 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.ComponentStatus, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ComponentStatusList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ComponentStatus, err error) ComponentStatusExpansion } @@ -104,10 +104,11 @@ func (c *componentStatuses) Watch(ctx context.Context, opts metav1.ListOptions) } // Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *componentStatuses) Create(ctx context.Context, componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Create(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.CreateOptions) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Post(). Resource("componentstatuses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(componentStatus). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *componentStatuses) Create(ctx context.Context, componentStatus *v1.Comp } // Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *componentStatuses) Update(ctx context.Context, componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Update(ctx context.Context, componentStatus *v1.ComponentStatus, opts metav1.UpdateOptions) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Put(). Resource("componentstatuses"). Name(componentStatus.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(componentStatus). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *componentStatuses) DeleteCollection(ctx context.Context, options *metav } // Patch applies the patch and returns the patched componentStatus. -func (c *componentStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Patch(pt). Resource("componentstatuses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go index dc5947cb053..c4f70908135 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go @@ -38,14 +38,14 @@ type ConfigMapsGetter interface { // ConfigMapInterface has methods to work with ConfigMap resources. type ConfigMapInterface interface { - Create(context.Context, *v1.ConfigMap) (*v1.ConfigMap, error) - Update(context.Context, *v1.ConfigMap) (*v1.ConfigMap, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ConfigMap, error) + Create(ctx context.Context, configMap *v1.ConfigMap, opts metav1.CreateOptions) (*v1.ConfigMap, error) + Update(ctx context.Context, configMap *v1.ConfigMap, opts metav1.UpdateOptions) (*v1.ConfigMap, 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.ConfigMap, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ConfigMapList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConfigMap, err error) ConfigMapExpansion } @@ -109,11 +109,12 @@ func (c *configMaps) Watch(ctx context.Context, opts metav1.ListOptions) (watch. } // Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *configMaps) Create(ctx context.Context, configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) { +func (c *configMaps) Create(ctx context.Context, configMap *v1.ConfigMap, opts metav1.CreateOptions) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Post(). Namespace(c.ns). Resource("configmaps"). + VersionedParams(&opts, scheme.ParameterCodec). Body(configMap). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *configMaps) Create(ctx context.Context, configMap *v1.ConfigMap) (resul } // Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *configMaps) Update(ctx context.Context, configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) { +func (c *configMaps) Update(ctx context.Context, configMap *v1.ConfigMap, opts metav1.UpdateOptions) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Put(). Namespace(c.ns). Resource("configmaps"). Name(configMap.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(configMap). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *configMaps) DeleteCollection(ctx context.Context, options *metav1.Delet } // Patch applies the patch and returns the patched configMap. -func (c *configMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { +func (c *configMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Patch(pt). Namespace(c.ns). Resource("configmaps"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go index 325489d23ab..925b9e94cb6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go @@ -38,14 +38,14 @@ type EndpointsGetter interface { // EndpointsInterface has methods to work with Endpoints resources. type EndpointsInterface interface { - Create(context.Context, *v1.Endpoints) (*v1.Endpoints, error) - Update(context.Context, *v1.Endpoints) (*v1.Endpoints, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Endpoints, error) + Create(ctx context.Context, endpoints *v1.Endpoints, opts metav1.CreateOptions) (*v1.Endpoints, error) + Update(ctx context.Context, endpoints *v1.Endpoints, opts metav1.UpdateOptions) (*v1.Endpoints, 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.Endpoints, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.EndpointsList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Endpoints, err error) EndpointsExpansion } @@ -109,11 +109,12 @@ func (c *endpoints) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } // Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *endpoints) Create(ctx context.Context, endpoints *v1.Endpoints) (result *v1.Endpoints, err error) { +func (c *endpoints) Create(ctx context.Context, endpoints *v1.Endpoints, opts metav1.CreateOptions) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Post(). Namespace(c.ns). Resource("endpoints"). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpoints). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *endpoints) Create(ctx context.Context, endpoints *v1.Endpoints) (result } // Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *endpoints) Update(ctx context.Context, endpoints *v1.Endpoints) (result *v1.Endpoints, err error) { +func (c *endpoints) Update(ctx context.Context, endpoints *v1.Endpoints, opts metav1.UpdateOptions) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Put(). Namespace(c.ns). Resource("endpoints"). Name(endpoints.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpoints). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *endpoints) DeleteCollection(ctx context.Context, options *metav1.Delete } // Patch applies the patch and returns the patched endpoints. -func (c *endpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { +func (c *endpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Patch(pt). Namespace(c.ns). Resource("endpoints"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go index a2aa7236bc8..1073effcc6d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go @@ -38,14 +38,14 @@ type EventsGetter interface { // EventInterface has methods to work with Event resources. type EventInterface interface { - Create(context.Context, *v1.Event) (*v1.Event, error) - Update(context.Context, *v1.Event) (*v1.Event, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Event, error) + Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (*v1.Event, error) + Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (*v1.Event, 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.Event, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.EventList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error) EventExpansion } @@ -109,11 +109,12 @@ func (c *events) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inte } // Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. -func (c *events) Create(ctx context.Context, event *v1.Event) (result *v1.Event, err error) { +func (c *events) Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Post(). Namespace(c.ns). Resource("events"). + VersionedParams(&opts, scheme.ParameterCodec). Body(event). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *events) Create(ctx context.Context, event *v1.Event) (result *v1.Event, } // Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. -func (c *events) Update(ctx context.Context, event *v1.Event) (result *v1.Event, err error) { +func (c *events) Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Put(). Namespace(c.ns). Resource("events"). Name(event.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(event). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *events) DeleteCollection(ctx context.Context, options *metav1.DeleteOpt } // Patch applies the patch and returns the patched event. -func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { +func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Patch(pt). Namespace(c.ns). Resource("events"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go index 87a9dffe904..967b9f7c6a2 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go @@ -77,7 +77,7 @@ func (c *FakeComponentStatuses) Watch(ctx context.Context, opts v1.ListOptions) } // Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *FakeComponentStatuses) Create(ctx context.Context, componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Create(ctx context.Context, componentStatus *corev1.ComponentStatus, opts v1.CreateOptions) (result *corev1.ComponentStatus, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeComponentStatuses) Create(ctx context.Context, componentStatus *cor } // Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *FakeComponentStatuses) Update(ctx context.Context, componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Update(ctx context.Context, componentStatus *corev1.ComponentStatus, opts v1.UpdateOptions) (result *corev1.ComponentStatus, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeComponentStatuses) DeleteCollection(ctx context.Context, options *v } // Patch applies the patch and returns the patched componentStatus. -func (c *FakeComponentStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ComponentStatus, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, name, pt, data, subresources...), &corev1.ComponentStatus{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go index e5cf689f9f5..299306064d8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go @@ -81,7 +81,7 @@ func (c *FakeConfigMaps) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *FakeConfigMaps) Create(ctx context.Context, configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) { +func (c *FakeConfigMaps) Create(ctx context.Context, configMap *corev1.ConfigMap, opts v1.CreateOptions) (result *corev1.ConfigMap, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{}) @@ -92,7 +92,7 @@ func (c *FakeConfigMaps) Create(ctx context.Context, configMap *corev1.ConfigMap } // Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *FakeConfigMaps) Update(ctx context.Context, configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) { +func (c *FakeConfigMaps) Update(ctx context.Context, configMap *corev1.ConfigMap, opts v1.UpdateOptions) (result *corev1.ConfigMap, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{}) @@ -119,7 +119,7 @@ func (c *FakeConfigMaps) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched configMap. -func (c *FakeConfigMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ConfigMap, err error) { +func (c *FakeConfigMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ConfigMap, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, name, pt, data, subresources...), &corev1.ConfigMap{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go index 2a7888afd9e..4c898728b86 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go @@ -81,7 +81,7 @@ func (c *FakeEndpoints) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *FakeEndpoints) Create(ctx context.Context, endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) { +func (c *FakeEndpoints) Create(ctx context.Context, endpoints *corev1.Endpoints, opts v1.CreateOptions) (result *corev1.Endpoints, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{}) @@ -92,7 +92,7 @@ func (c *FakeEndpoints) Create(ctx context.Context, endpoints *corev1.Endpoints) } // Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *FakeEndpoints) Update(ctx context.Context, endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) { +func (c *FakeEndpoints) Update(ctx context.Context, endpoints *corev1.Endpoints, opts v1.UpdateOptions) (result *corev1.Endpoints, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{}) @@ -119,7 +119,7 @@ func (c *FakeEndpoints) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched endpoints. -func (c *FakeEndpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Endpoints, err error) { +func (c *FakeEndpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Endpoints, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, pt, data, subresources...), &corev1.Endpoints{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go index e5d1d5e2086..ca531f5c889 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go @@ -81,7 +81,7 @@ func (c *FakeEvents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } // Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Create(ctx context.Context, event *corev1.Event) (result *corev1.Event, err error) { +func (c *FakeEvents) Create(ctx context.Context, event *corev1.Event, opts v1.CreateOptions) (result *corev1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &corev1.Event{}) @@ -92,7 +92,7 @@ func (c *FakeEvents) Create(ctx context.Context, event *corev1.Event) (result *c } // Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Update(ctx context.Context, event *corev1.Event) (result *corev1.Event, err error) { +func (c *FakeEvents) Update(ctx context.Context, event *corev1.Event, opts v1.UpdateOptions) (result *corev1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &corev1.Event{}) @@ -119,7 +119,7 @@ func (c *FakeEvents) DeleteCollection(ctx context.Context, options *v1.DeleteOpt } // Patch applies the patch and returns the patched event. -func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Event, err error) { +func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, pt, data, subresources...), &corev1.Event{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go index 53e3b79ea64..52e473b1eb7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go @@ -81,7 +81,7 @@ func (c *FakeLimitRanges) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *FakeLimitRanges) Create(ctx context.Context, limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) { +func (c *FakeLimitRanges) Create(ctx context.Context, limitRange *corev1.LimitRange, opts v1.CreateOptions) (result *corev1.LimitRange, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{}) @@ -92,7 +92,7 @@ func (c *FakeLimitRanges) Create(ctx context.Context, limitRange *corev1.LimitRa } // Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *FakeLimitRanges) Update(ctx context.Context, limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) { +func (c *FakeLimitRanges) Update(ctx context.Context, limitRange *corev1.LimitRange, opts v1.UpdateOptions) (result *corev1.LimitRange, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{}) @@ -119,7 +119,7 @@ func (c *FakeLimitRanges) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched limitRange. -func (c *FakeLimitRanges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.LimitRange, err error) { +func (c *FakeLimitRanges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.LimitRange, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, name, pt, data, subresources...), &corev1.LimitRange{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go index b4ee29d29b1..12b68516870 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go @@ -77,7 +77,7 @@ func (c *FakeNamespaces) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *FakeNamespaces) Create(ctx context.Context, namespace *corev1.Namespace) (result *corev1.Namespace, err error) { +func (c *FakeNamespaces) Create(ctx context.Context, namespace *corev1.Namespace, opts v1.CreateOptions) (result *corev1.Namespace, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(namespacesResource, namespace), &corev1.Namespace{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeNamespaces) Create(ctx context.Context, namespace *corev1.Namespace } // Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *FakeNamespaces) Update(ctx context.Context, namespace *corev1.Namespace) (result *corev1.Namespace, err error) { +func (c *FakeNamespaces) Update(ctx context.Context, namespace *corev1.Namespace, opts v1.UpdateOptions) (result *corev1.Namespace, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &corev1.Namespace{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeNamespaces) Update(ctx context.Context, namespace *corev1.Namespace // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNamespaces) UpdateStatus(ctx context.Context, namespace *corev1.Namespace) (*corev1.Namespace, error) { +func (c *FakeNamespaces) UpdateStatus(ctx context.Context, namespace *corev1.Namespace, opts v1.UpdateOptions) (*corev1.Namespace, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &corev1.Namespace{}) if obj == nil { @@ -115,7 +115,7 @@ func (c *FakeNamespaces) Delete(ctx context.Context, name string, options *v1.De } // Patch applies the patch and returns the patched namespace. -func (c *FakeNamespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Namespace, err error) { +func (c *FakeNamespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Namespace, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, pt, data, subresources...), &corev1.Namespace{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go index 524c5766bd1..0d9f566b12a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go @@ -77,7 +77,7 @@ func (c *FakeNodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } // 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 *corev1.Node) (result *corev1.Node, err error) { +func (c *FakeNodes) Create(ctx context.Context, node *corev1.Node, opts v1.CreateOptions) (result *corev1.Node, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(nodesResource, node), &corev1.Node{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeNodes) Create(ctx context.Context, node *corev1.Node) (result *core } // 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 *corev1.Node) (result *corev1.Node, err error) { +func (c *FakeNodes) Update(ctx context.Context, node *corev1.Node, opts v1.UpdateOptions) (result *corev1.Node, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(nodesResource, node), &corev1.Node{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeNodes) Update(ctx context.Context, node *corev1.Node) (result *core // 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 *corev1.Node) (*corev1.Node, error) { +func (c *FakeNodes) UpdateStatus(ctx context.Context, node *corev1.Node, opts v1.UpdateOptions) (*corev1.Node, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(nodesResource, "status", node), &corev1.Node{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakeNodes) DeleteCollection(ctx context.Context, options *v1.DeleteOpti } // Patch applies the patch and returns the patched node. -func (c *FakeNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Node, err error) { +func (c *FakeNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Node, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, pt, data, subresources...), &corev1.Node{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go index fb138b63bdf..f5c9f158345 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go @@ -77,7 +77,7 @@ func (c *FakePersistentVolumes) Watch(ctx context.Context, opts v1.ListOptions) } // Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *FakePersistentVolumes) Create(ctx context.Context, persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Create(ctx context.Context, persistentVolume *corev1.PersistentVolume, opts v1.CreateOptions) (result *corev1.PersistentVolume, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakePersistentVolumes) Create(ctx context.Context, persistentVolume *co } // Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *FakePersistentVolumes) Update(ctx context.Context, persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Update(ctx context.Context, persistentVolume *corev1.PersistentVolume, opts v1.UpdateOptions) (result *corev1.PersistentVolume, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakePersistentVolumes) Update(ctx context.Context, persistentVolume *co // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePersistentVolumes) UpdateStatus(ctx context.Context, persistentVolume *corev1.PersistentVolume) (*corev1.PersistentVolume, error) { +func (c *FakePersistentVolumes) UpdateStatus(ctx context.Context, persistentVolume *corev1.PersistentVolume, opts v1.UpdateOptions) (*corev1.PersistentVolume, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &corev1.PersistentVolume{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakePersistentVolumes) DeleteCollection(ctx context.Context, options *v } // Patch applies the patch and returns the patched persistentVolume. -func (c *FakePersistentVolumes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.PersistentVolume, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, name, pt, data, subresources...), &corev1.PersistentVolume{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go index 22050361b5c..de0dd1c1a5d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go @@ -81,7 +81,7 @@ func (c *FakePersistentVolumeClaims) Watch(ctx context.Context, opts v1.ListOpti } // Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *FakePersistentVolumeClaims) Create(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Create(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, opts v1.CreateOptions) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) @@ -92,7 +92,7 @@ func (c *FakePersistentVolumeClaims) Create(ctx context.Context, persistentVolum } // Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *FakePersistentVolumeClaims) Update(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Update(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, opts v1.UpdateOptions) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) @@ -104,7 +104,7 @@ func (c *FakePersistentVolumeClaims) Update(ctx context.Context, persistentVolum // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePersistentVolumeClaims) UpdateStatus(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) { +func (c *FakePersistentVolumeClaims) UpdateStatus(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, opts v1.UpdateOptions) (*corev1.PersistentVolumeClaim, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) @@ -131,7 +131,7 @@ func (c *FakePersistentVolumeClaims) DeleteCollection(ctx context.Context, optio } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *FakePersistentVolumeClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, pt, data, subresources...), &corev1.PersistentVolumeClaim{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go index 6a737e477a1..e408fd0af5c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go @@ -81,7 +81,7 @@ func (c *FakePods) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } // Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *FakePods) Create(ctx context.Context, pod *corev1.Pod) (result *corev1.Pod, err error) { +func (c *FakePods) Create(ctx context.Context, pod *corev1.Pod, opts v1.CreateOptions) (result *corev1.Pod, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(podsResource, c.ns, pod), &corev1.Pod{}) @@ -92,7 +92,7 @@ func (c *FakePods) Create(ctx context.Context, pod *corev1.Pod) (result *corev1. } // Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *FakePods) Update(ctx context.Context, pod *corev1.Pod) (result *corev1.Pod, err error) { +func (c *FakePods) Update(ctx context.Context, pod *corev1.Pod, opts v1.UpdateOptions) (result *corev1.Pod, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(podsResource, c.ns, pod), &corev1.Pod{}) @@ -104,7 +104,7 @@ func (c *FakePods) Update(ctx context.Context, pod *corev1.Pod) (result *corev1. // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePods) UpdateStatus(ctx context.Context, pod *corev1.Pod) (*corev1.Pod, error) { +func (c *FakePods) UpdateStatus(ctx context.Context, pod *corev1.Pod, opts v1.UpdateOptions) (*corev1.Pod, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &corev1.Pod{}) @@ -131,7 +131,7 @@ func (c *FakePods) DeleteCollection(ctx context.Context, options *v1.DeleteOptio } // Patch applies the patch and returns the patched pod. -func (c *FakePods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Pod, err error) { +func (c *FakePods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Pod, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, pt, data, subresources...), &corev1.Pod{}) @@ -153,7 +153,7 @@ func (c *FakePods) GetEphemeralContainers(ctx context.Context, podName string, o } // UpdateEphemeralContainers takes the representation of a ephemeralContainers and updates it. Returns the server's representation of the ephemeralContainers, and an error, if there is any. -func (c *FakePods) UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *corev1.EphemeralContainers) (result *corev1.EphemeralContainers, err error) { +func (c *FakePods) UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *corev1.EphemeralContainers, opts v1.UpdateOptions) (result *corev1.EphemeralContainers, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(podsResource, "ephemeralcontainers", c.ns, ephemeralContainers), &corev1.EphemeralContainers{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go index 57e45b75494..905cafeae4b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go @@ -81,7 +81,7 @@ func (c *FakePodTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watc } // Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *FakePodTemplates) Create(ctx context.Context, podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) { +func (c *FakePodTemplates) Create(ctx context.Context, podTemplate *corev1.PodTemplate, opts v1.CreateOptions) (result *corev1.PodTemplate, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{}) @@ -92,7 +92,7 @@ func (c *FakePodTemplates) Create(ctx context.Context, podTemplate *corev1.PodTe } // Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *FakePodTemplates) Update(ctx context.Context, podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) { +func (c *FakePodTemplates) Update(ctx context.Context, podTemplate *corev1.PodTemplate, opts v1.UpdateOptions) (result *corev1.PodTemplate, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{}) @@ -119,7 +119,7 @@ func (c *FakePodTemplates) DeleteCollection(ctx context.Context, options *v1.Del } // Patch applies the patch and returns the patched podTemplate. -func (c *FakePodTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PodTemplate, err error) { +func (c *FakePodTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.PodTemplate, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, pt, data, subresources...), &corev1.PodTemplate{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go index 0a6c8b6f6fe..12d5d9423a8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go @@ -82,7 +82,7 @@ func (c *FakeReplicationControllers) Watch(ctx context.Context, opts v1.ListOpti } // Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *FakeReplicationControllers) Create(ctx context.Context, replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Create(ctx context.Context, replicationController *corev1.ReplicationController, opts v1.CreateOptions) (result *corev1.ReplicationController, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{}) @@ -93,7 +93,7 @@ func (c *FakeReplicationControllers) Create(ctx context.Context, replicationCont } // Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *FakeReplicationControllers) Update(ctx context.Context, replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Update(ctx context.Context, replicationController *corev1.ReplicationController, opts v1.UpdateOptions) (result *corev1.ReplicationController, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{}) @@ -105,7 +105,7 @@ func (c *FakeReplicationControllers) Update(ctx context.Context, replicationCont // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicationControllers) UpdateStatus(ctx context.Context, replicationController *corev1.ReplicationController) (*corev1.ReplicationController, error) { +func (c *FakeReplicationControllers) UpdateStatus(ctx context.Context, replicationController *corev1.ReplicationController, opts v1.UpdateOptions) (*corev1.ReplicationController, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &corev1.ReplicationController{}) @@ -132,7 +132,7 @@ func (c *FakeReplicationControllers) DeleteCollection(ctx context.Context, optio } // Patch applies the patch and returns the patched replicationController. -func (c *FakeReplicationControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ReplicationController, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, pt, data, subresources...), &corev1.ReplicationController{}) @@ -154,7 +154,7 @@ func (c *FakeReplicationControllers) GetScale(ctx context.Context, replicationCo } // 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 *FakeReplicationControllers) UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *FakeReplicationControllers) UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go index 83ff3258961..c867270c0b5 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go @@ -81,7 +81,7 @@ func (c *FakeResourceQuotas) Watch(ctx context.Context, opts v1.ListOptions) (wa } // Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *FakeResourceQuotas) Create(ctx context.Context, resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Create(ctx context.Context, resourceQuota *corev1.ResourceQuota, opts v1.CreateOptions) (result *corev1.ResourceQuota, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{}) @@ -92,7 +92,7 @@ func (c *FakeResourceQuotas) Create(ctx context.Context, resourceQuota *corev1.R } // Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *FakeResourceQuotas) Update(ctx context.Context, resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Update(ctx context.Context, resourceQuota *corev1.ResourceQuota, opts v1.UpdateOptions) (result *corev1.ResourceQuota, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{}) @@ -104,7 +104,7 @@ func (c *FakeResourceQuotas) Update(ctx context.Context, resourceQuota *corev1.R // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeResourceQuotas) UpdateStatus(ctx context.Context, resourceQuota *corev1.ResourceQuota) (*corev1.ResourceQuota, error) { +func (c *FakeResourceQuotas) UpdateStatus(ctx context.Context, resourceQuota *corev1.ResourceQuota, opts v1.UpdateOptions) (*corev1.ResourceQuota, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &corev1.ResourceQuota{}) @@ -131,7 +131,7 @@ func (c *FakeResourceQuotas) DeleteCollection(ctx context.Context, options *v1.D } // Patch applies the patch and returns the patched resourceQuota. -func (c *FakeResourceQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ResourceQuota, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, pt, data, subresources...), &corev1.ResourceQuota{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go index b45c05b4a0a..38703f14682 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go @@ -81,7 +81,7 @@ func (c *FakeSecrets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } // Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *FakeSecrets) Create(ctx context.Context, secret *corev1.Secret) (result *corev1.Secret, err error) { +func (c *FakeSecrets) Create(ctx context.Context, secret *corev1.Secret, opts v1.CreateOptions) (result *corev1.Secret, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(secretsResource, c.ns, secret), &corev1.Secret{}) @@ -92,7 +92,7 @@ func (c *FakeSecrets) Create(ctx context.Context, secret *corev1.Secret) (result } // Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *FakeSecrets) Update(ctx context.Context, secret *corev1.Secret) (result *corev1.Secret, err error) { +func (c *FakeSecrets) Update(ctx context.Context, secret *corev1.Secret, opts v1.UpdateOptions) (result *corev1.Secret, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &corev1.Secret{}) @@ -119,7 +119,7 @@ func (c *FakeSecrets) DeleteCollection(ctx context.Context, options *v1.DeleteOp } // Patch applies the patch and returns the patched secret. -func (c *FakeSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Secret, err error) { +func (c *FakeSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Secret, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, pt, data, subresources...), &corev1.Secret{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go index 138626e2d6b..dd47bee64e0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go @@ -81,7 +81,7 @@ func (c *FakeServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. -func (c *FakeServices) Create(ctx context.Context, service *corev1.Service) (result *corev1.Service, err error) { +func (c *FakeServices) Create(ctx context.Context, service *corev1.Service, opts v1.CreateOptions) (result *corev1.Service, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(servicesResource, c.ns, service), &corev1.Service{}) @@ -92,7 +92,7 @@ func (c *FakeServices) Create(ctx context.Context, service *corev1.Service) (res } // Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any. -func (c *FakeServices) Update(ctx context.Context, service *corev1.Service) (result *corev1.Service, err error) { +func (c *FakeServices) Update(ctx context.Context, service *corev1.Service, opts v1.UpdateOptions) (result *corev1.Service, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(servicesResource, c.ns, service), &corev1.Service{}) @@ -104,7 +104,7 @@ func (c *FakeServices) Update(ctx context.Context, service *corev1.Service) (res // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServices) UpdateStatus(ctx context.Context, service *corev1.Service) (*corev1.Service, error) { +func (c *FakeServices) UpdateStatus(ctx context.Context, service *corev1.Service, opts v1.UpdateOptions) (*corev1.Service, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &corev1.Service{}) @@ -123,7 +123,7 @@ func (c *FakeServices) Delete(ctx context.Context, name string, options *v1.Dele } // Patch applies the patch and returns the patched service. -func (c *FakeServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Service, err error) { +func (c *FakeServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Service, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, pt, data, subresources...), &corev1.Service{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go index cc48d6148f0..78556d147d0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go @@ -82,7 +82,7 @@ func (c *FakeServiceAccounts) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *FakeServiceAccounts) Create(ctx context.Context, serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Create(ctx context.Context, serviceAccount *corev1.ServiceAccount, opts v1.CreateOptions) (result *corev1.ServiceAccount, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{}) @@ -93,7 +93,7 @@ func (c *FakeServiceAccounts) Create(ctx context.Context, serviceAccount *corev1 } // Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *FakeServiceAccounts) Update(ctx context.Context, serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Update(ctx context.Context, serviceAccount *corev1.ServiceAccount, opts v1.UpdateOptions) (result *corev1.ServiceAccount, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{}) @@ -120,7 +120,7 @@ func (c *FakeServiceAccounts) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched serviceAccount. -func (c *FakeServiceAccounts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.ServiceAccount, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, pt, data, subresources...), &corev1.ServiceAccount{}) @@ -131,7 +131,7 @@ func (c *FakeServiceAccounts) Patch(ctx context.Context, name string, pt types.P } // CreateToken takes the representation of a tokenRequest and creates it. Returns the server's representation of the tokenRequest, and an error, if there is any. -func (c *FakeServiceAccounts) CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest) (result *authenticationv1.TokenRequest, err error) { +func (c *FakeServiceAccounts) CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest, opts v1.CreateOptions) (result *authenticationv1.TokenRequest, err error) { obj, err := c.Fake. Invokes(testing.NewCreateSubresourceAction(serviceaccountsResource, serviceAccountName, "token", c.ns, tokenRequest), &authenticationv1.TokenRequest{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go index f4832928352..c6ecda1f0d3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go @@ -38,14 +38,14 @@ type LimitRangesGetter interface { // LimitRangeInterface has methods to work with LimitRange resources. type LimitRangeInterface interface { - Create(context.Context, *v1.LimitRange) (*v1.LimitRange, error) - Update(context.Context, *v1.LimitRange) (*v1.LimitRange, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.LimitRange, error) + Create(ctx context.Context, limitRange *v1.LimitRange, opts metav1.CreateOptions) (*v1.LimitRange, error) + Update(ctx context.Context, limitRange *v1.LimitRange, opts metav1.UpdateOptions) (*v1.LimitRange, 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.LimitRange, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.LimitRangeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LimitRange, err error) LimitRangeExpansion } @@ -109,11 +109,12 @@ func (c *limitRanges) Watch(ctx context.Context, opts metav1.ListOptions) (watch } // Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *limitRanges) Create(ctx context.Context, limitRange *v1.LimitRange) (result *v1.LimitRange, err error) { +func (c *limitRanges) Create(ctx context.Context, limitRange *v1.LimitRange, opts metav1.CreateOptions) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Post(). Namespace(c.ns). Resource("limitranges"). + VersionedParams(&opts, scheme.ParameterCodec). Body(limitRange). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *limitRanges) Create(ctx context.Context, limitRange *v1.LimitRange) (re } // Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *limitRanges) Update(ctx context.Context, limitRange *v1.LimitRange) (result *v1.LimitRange, err error) { +func (c *limitRanges) Update(ctx context.Context, limitRange *v1.LimitRange, opts metav1.UpdateOptions) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Put(). Namespace(c.ns). Resource("limitranges"). Name(limitRange.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(limitRange). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *limitRanges) DeleteCollection(ctx context.Context, options *metav1.Dele } // Patch applies the patch and returns the patched limitRange. -func (c *limitRanges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { +func (c *limitRanges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Patch(pt). Namespace(c.ns). Resource("limitranges"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go index b6dac34b073..afd4237bfc8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go @@ -38,14 +38,14 @@ type NamespacesGetter interface { // NamespaceInterface has methods to work with Namespace resources. type NamespaceInterface interface { - Create(context.Context, *v1.Namespace) (*v1.Namespace, error) - Update(context.Context, *v1.Namespace) (*v1.Namespace, error) - UpdateStatus(context.Context, *v1.Namespace) (*v1.Namespace, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Namespace, error) + Create(ctx context.Context, namespace *v1.Namespace, opts metav1.CreateOptions) (*v1.Namespace, error) + Update(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) + UpdateStatus(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) + Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Namespace, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.NamespaceList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Namespace, err error) NamespaceExpansion } @@ -104,10 +104,11 @@ func (c *namespaces) Watch(ctx context.Context, opts metav1.ListOptions) (watch. } // Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *namespaces) Create(ctx context.Context, namespace *v1.Namespace) (result *v1.Namespace, err error) { +func (c *namespaces) Create(ctx context.Context, namespace *v1.Namespace, opts metav1.CreateOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Post(). Resource("namespaces"). + VersionedParams(&opts, scheme.ParameterCodec). Body(namespace). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *namespaces) Create(ctx context.Context, namespace *v1.Namespace) (resul } // Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *namespaces) Update(ctx context.Context, namespace *v1.Namespace) (result *v1.Namespace, err error) { +func (c *namespaces) Update(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Put(). Resource("namespaces"). Name(namespace.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(namespace). Do(ctx). Into(result) @@ -128,13 +130,13 @@ func (c *namespaces) Update(ctx context.Context, namespace *v1.Namespace) (resul // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *namespaces) UpdateStatus(ctx context.Context, namespace *v1.Namespace) (result *v1.Namespace, err error) { +func (c *namespaces) UpdateStatus(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Put(). Resource("namespaces"). Name(namespace.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(namespace). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *namespaces) Delete(ctx context.Context, name string, options *metav1.De } // Patch applies the patch and returns the patched namespace. -func (c *namespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { +func (c *namespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Patch(pt). Resource("namespaces"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go index 44dadcbd048..f90657fd180 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go @@ -38,15 +38,15 @@ type NodesGetter interface { // NodeInterface has methods to work with Node resources. type NodeInterface interface { - Create(context.Context, *v1.Node) (*v1.Node, error) - Update(context.Context, *v1.Node) (*v1.Node, error) - UpdateStatus(context.Context, *v1.Node) (*v1.Node, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Node, error) + 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) + UpdateStatus(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (*v1.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) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Node, err error) NodeExpansion } @@ -105,10 +105,11 @@ func (c *nodes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inter } // Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any. -func (c *nodes) Create(ctx context.Context, node *v1.Node) (result *v1.Node, err error) { +func (c *nodes) Create(ctx context.Context, node *v1.Node, opts metav1.CreateOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Post(). Resource("nodes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(node). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *nodes) Create(ctx context.Context, node *v1.Node) (result *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 *nodes) Update(ctx context.Context, node *v1.Node) (result *v1.Node, err error) { +func (c *nodes) Update(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Put(). Resource("nodes"). Name(node.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(node). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *nodes) Update(ctx context.Context, node *v1.Node) (result *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 *nodes) UpdateStatus(ctx context.Context, node *v1.Node) (result *v1.Node, err error) { +func (c *nodes) UpdateStatus(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Put(). Resource("nodes"). Name(node.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(node). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *nodes) DeleteCollection(ctx context.Context, options *metav1.DeleteOpti } // Patch applies the patch and returns the patched node. -func (c *nodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { +func (c *nodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Patch(pt). Resource("nodes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go index a593a56aeec..9392aa0e744 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go @@ -38,15 +38,15 @@ type PersistentVolumesGetter interface { // PersistentVolumeInterface has methods to work with PersistentVolume resources. type PersistentVolumeInterface interface { - Create(context.Context, *v1.PersistentVolume) (*v1.PersistentVolume, error) - Update(context.Context, *v1.PersistentVolume) (*v1.PersistentVolume, error) - UpdateStatus(context.Context, *v1.PersistentVolume) (*v1.PersistentVolume, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.PersistentVolume, error) + Create(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.CreateOptions) (*v1.PersistentVolume, error) + Update(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.UpdateOptions) (*v1.PersistentVolume, error) + UpdateStatus(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.UpdateOptions) (*v1.PersistentVolume, 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.PersistentVolume, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.PersistentVolumeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PersistentVolume, err error) PersistentVolumeExpansion } @@ -105,10 +105,11 @@ func (c *persistentVolumes) Watch(ctx context.Context, opts metav1.ListOptions) } // Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *persistentVolumes) Create(ctx context.Context, persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Create(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.CreateOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Post(). Resource("persistentvolumes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolume). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *persistentVolumes) Create(ctx context.Context, persistentVolume *v1.Per } // Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *persistentVolumes) Update(ctx context.Context, persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Update(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.UpdateOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Put(). Resource("persistentvolumes"). Name(persistentVolume.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolume). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *persistentVolumes) Update(ctx context.Context, persistentVolume *v1.Per // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *persistentVolumes) UpdateStatus(ctx context.Context, persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) UpdateStatus(ctx context.Context, persistentVolume *v1.PersistentVolume, opts metav1.UpdateOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Put(). Resource("persistentvolumes"). Name(persistentVolume.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolume). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *persistentVolumes) DeleteCollection(ctx context.Context, options *metav } // Patch applies the patch and returns the patched persistentVolume. -func (c *persistentVolumes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Patch(pt). Resource("persistentvolumes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go index 7da6de09a6f..f91db21e823 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go @@ -38,15 +38,15 @@ type PersistentVolumeClaimsGetter interface { // PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources. type PersistentVolumeClaimInterface interface { - Create(context.Context, *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) - Update(context.Context, *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) - UpdateStatus(context.Context, *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.PersistentVolumeClaim, error) + Create(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.CreateOptions) (*v1.PersistentVolumeClaim, error) + Update(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (*v1.PersistentVolumeClaim, error) + UpdateStatus(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (*v1.PersistentVolumeClaim, 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.PersistentVolumeClaim, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PersistentVolumeClaim, err error) PersistentVolumeClaimExpansion } @@ -110,11 +110,12 @@ func (c *persistentVolumeClaims) Watch(ctx context.Context, opts metav1.ListOpti } // Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *persistentVolumeClaims) Create(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Create(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.CreateOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Post(). Namespace(c.ns). Resource("persistentvolumeclaims"). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolumeClaim). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *persistentVolumeClaims) Create(ctx context.Context, persistentVolumeCla } // Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *persistentVolumeClaims) Update(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Update(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Put(). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(persistentVolumeClaim.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolumeClaim). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *persistentVolumeClaims) Update(ctx context.Context, persistentVolumeCla // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *persistentVolumeClaims) UpdateStatus(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) UpdateStatus(ctx context.Context, persistentVolumeClaim *v1.PersistentVolumeClaim, opts metav1.UpdateOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Put(). Namespace(c.ns). Resource("persistentvolumeclaims"). Name(persistentVolumeClaim.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(persistentVolumeClaim). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *persistentVolumeClaims) DeleteCollection(ctx context.Context, options * } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *persistentVolumeClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Patch(pt). Namespace(c.ns). Resource("persistentvolumeclaims"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go index 3a0fbbdb718..cc143a38a30 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go @@ -38,17 +38,17 @@ type PodsGetter interface { // PodInterface has methods to work with Pod resources. type PodInterface interface { - Create(context.Context, *v1.Pod) (*v1.Pod, error) - Update(context.Context, *v1.Pod) (*v1.Pod, error) - UpdateStatus(context.Context, *v1.Pod) (*v1.Pod, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Pod, error) + Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (*v1.Pod, error) + Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) + UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, 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.Pod, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.PodList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) GetEphemeralContainers(ctx context.Context, podName string, options metav1.GetOptions) (*v1.EphemeralContainers, error) - UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *v1.EphemeralContainers) (*v1.EphemeralContainers, error) + UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *v1.EphemeralContainers, opts metav1.UpdateOptions) (*v1.EphemeralContainers, error) PodExpansion } @@ -113,11 +113,12 @@ func (c *pods) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interf } // Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *pods) Create(ctx context.Context, pod *v1.Pod) (result *v1.Pod, err error) { +func (c *pods) Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Post(). Namespace(c.ns). Resource("pods"). + VersionedParams(&opts, scheme.ParameterCodec). Body(pod). Do(ctx). Into(result) @@ -125,12 +126,13 @@ func (c *pods) Create(ctx context.Context, pod *v1.Pod) (result *v1.Pod, err err } // Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *pods) Update(ctx context.Context, pod *v1.Pod) (result *v1.Pod, err error) { +func (c *pods) Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Put(). Namespace(c.ns). Resource("pods"). Name(pod.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(pod). Do(ctx). Into(result) @@ -139,14 +141,14 @@ func (c *pods) Update(ctx context.Context, pod *v1.Pod) (result *v1.Pod, err 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 *pods) UpdateStatus(ctx context.Context, pod *v1.Pod) (result *v1.Pod, err error) { +func (c *pods) UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Put(). Namespace(c.ns). Resource("pods"). Name(pod.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(pod). Do(ctx). Into(result) @@ -181,13 +183,14 @@ func (c *pods) DeleteCollection(ctx context.Context, options *metav1.DeleteOptio } // Patch applies the patch and returns the patched pod. -func (c *pods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { +func (c *pods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Patch(pt). Namespace(c.ns). Resource("pods"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -209,13 +212,14 @@ func (c *pods) GetEphemeralContainers(ctx context.Context, podName string, optio } // UpdateEphemeralContainers takes the top resource name and the representation of a ephemeralContainers and updates it. Returns the server's representation of the ephemeralContainers, and an error, if there is any. -func (c *pods) UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *v1.EphemeralContainers) (result *v1.EphemeralContainers, err error) { +func (c *pods) UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *v1.EphemeralContainers, opts metav1.UpdateOptions) (result *v1.EphemeralContainers, err error) { result = &v1.EphemeralContainers{} err = c.client.Put(). Namespace(c.ns). Resource("pods"). Name(podName). SubResource("ephemeralcontainers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(ephemeralContainers). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go index a1114403e21..22b427232e4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go @@ -38,14 +38,14 @@ type PodTemplatesGetter interface { // PodTemplateInterface has methods to work with PodTemplate resources. type PodTemplateInterface interface { - Create(context.Context, *v1.PodTemplate) (*v1.PodTemplate, error) - Update(context.Context, *v1.PodTemplate) (*v1.PodTemplate, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.PodTemplate, error) + Create(ctx context.Context, podTemplate *v1.PodTemplate, opts metav1.CreateOptions) (*v1.PodTemplate, error) + Update(ctx context.Context, podTemplate *v1.PodTemplate, opts metav1.UpdateOptions) (*v1.PodTemplate, 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.PodTemplate, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.PodTemplateList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PodTemplate, err error) PodTemplateExpansion } @@ -109,11 +109,12 @@ func (c *podTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watc } // Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *podTemplates) Create(ctx context.Context, podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Create(ctx context.Context, podTemplate *v1.PodTemplate, opts metav1.CreateOptions) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Post(). Namespace(c.ns). Resource("podtemplates"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podTemplate). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *podTemplates) Create(ctx context.Context, podTemplate *v1.PodTemplate) } // Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *podTemplates) Update(ctx context.Context, podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Update(ctx context.Context, podTemplate *v1.PodTemplate, opts metav1.UpdateOptions) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Put(). Namespace(c.ns). Resource("podtemplates"). Name(podTemplate.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(podTemplate). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *podTemplates) DeleteCollection(ctx context.Context, options *metav1.Del } // Patch applies the patch and returns the patched podTemplate. -func (c *podTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Patch(pt). Namespace(c.ns). Resource("podtemplates"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go index 7b4bbc94429..1ecbdaf775a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go @@ -39,17 +39,17 @@ type ReplicationControllersGetter interface { // ReplicationControllerInterface has methods to work with ReplicationController resources. type ReplicationControllerInterface interface { - Create(context.Context, *v1.ReplicationController) (*v1.ReplicationController, error) - Update(context.Context, *v1.ReplicationController) (*v1.ReplicationController, error) - UpdateStatus(context.Context, *v1.ReplicationController) (*v1.ReplicationController, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ReplicationController, error) + Create(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.CreateOptions) (*v1.ReplicationController, error) + Update(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.UpdateOptions) (*v1.ReplicationController, error) + UpdateStatus(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.UpdateOptions) (*v1.ReplicationController, 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.ReplicationController, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ReplicationControllerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ReplicationController, err error) GetScale(ctx context.Context, replicationControllerName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) - UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error) + UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error) ReplicationControllerExpansion } @@ -114,11 +114,12 @@ func (c *replicationControllers) Watch(ctx context.Context, opts metav1.ListOpti } // Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *replicationControllers) Create(ctx context.Context, replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Create(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.CreateOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Post(). Namespace(c.ns). Resource("replicationcontrollers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicationController). Do(ctx). Into(result) @@ -126,12 +127,13 @@ func (c *replicationControllers) Create(ctx context.Context, replicationControll } // Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *replicationControllers) Update(ctx context.Context, replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Update(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.UpdateOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Put(). Namespace(c.ns). Resource("replicationcontrollers"). Name(replicationController.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicationController). Do(ctx). Into(result) @@ -140,14 +142,14 @@ func (c *replicationControllers) Update(ctx context.Context, replicationControll // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *replicationControllers) UpdateStatus(ctx context.Context, replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) UpdateStatus(ctx context.Context, replicationController *v1.ReplicationController, opts metav1.UpdateOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Put(). Namespace(c.ns). Resource("replicationcontrollers"). Name(replicationController.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicationController). Do(ctx). Into(result) @@ -182,13 +184,14 @@ func (c *replicationControllers) DeleteCollection(ctx context.Context, options * } // Patch applies the patch and returns the patched replicationController. -func (c *replicationControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Patch(pt). Namespace(c.ns). Resource("replicationcontrollers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -210,13 +213,14 @@ func (c *replicationControllers) GetScale(ctx context.Context, replicationContro } // UpdateScale takes the top resource name and 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 *replicationControllers) UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) { +func (c *replicationControllers) UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) { result = &autoscalingv1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("replicationcontrollers"). Name(replicationControllerName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go index 982a94ad1d8..12dc525eeb3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go @@ -38,15 +38,15 @@ type ResourceQuotasGetter interface { // ResourceQuotaInterface has methods to work with ResourceQuota resources. type ResourceQuotaInterface interface { - Create(context.Context, *v1.ResourceQuota) (*v1.ResourceQuota, error) - Update(context.Context, *v1.ResourceQuota) (*v1.ResourceQuota, error) - UpdateStatus(context.Context, *v1.ResourceQuota) (*v1.ResourceQuota, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ResourceQuota, error) + Create(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.CreateOptions) (*v1.ResourceQuota, error) + Update(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.UpdateOptions) (*v1.ResourceQuota, error) + UpdateStatus(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.UpdateOptions) (*v1.ResourceQuota, 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.ResourceQuota, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ResourceQuotaList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ResourceQuota, err error) ResourceQuotaExpansion } @@ -110,11 +110,12 @@ func (c *resourceQuotas) Watch(ctx context.Context, opts metav1.ListOptions) (wa } // Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *resourceQuotas) Create(ctx context.Context, resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Create(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.CreateOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Post(). Namespace(c.ns). Resource("resourcequotas"). + VersionedParams(&opts, scheme.ParameterCodec). Body(resourceQuota). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *resourceQuotas) Create(ctx context.Context, resourceQuota *v1.ResourceQ } // Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *resourceQuotas) Update(ctx context.Context, resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Update(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.UpdateOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Put(). Namespace(c.ns). Resource("resourcequotas"). Name(resourceQuota.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(resourceQuota). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *resourceQuotas) Update(ctx context.Context, resourceQuota *v1.ResourceQ // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *resourceQuotas) UpdateStatus(ctx context.Context, resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) UpdateStatus(ctx context.Context, resourceQuota *v1.ResourceQuota, opts metav1.UpdateOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Put(). Namespace(c.ns). Resource("resourcequotas"). Name(resourceQuota.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(resourceQuota). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *resourceQuotas) DeleteCollection(ctx context.Context, options *metav1.D } // Patch applies the patch and returns the patched resourceQuota. -func (c *resourceQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Patch(pt). Namespace(c.ns). Resource("resourcequotas"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go index 9168e598087..fb9ff7fb328 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go @@ -38,14 +38,14 @@ type SecretsGetter interface { // SecretInterface has methods to work with Secret resources. type SecretInterface interface { - Create(context.Context, *v1.Secret) (*v1.Secret, error) - Update(context.Context, *v1.Secret) (*v1.Secret, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Secret, error) + Create(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) (*v1.Secret, error) + Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) (*v1.Secret, 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.Secret, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.SecretList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Secret, err error) SecretExpansion } @@ -109,11 +109,12 @@ func (c *secrets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Int } // Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *secrets) Create(ctx context.Context, secret *v1.Secret) (result *v1.Secret, err error) { +func (c *secrets) Create(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Post(). Namespace(c.ns). Resource("secrets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(secret). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *secrets) Create(ctx context.Context, secret *v1.Secret) (result *v1.Sec } // Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *secrets) Update(ctx context.Context, secret *v1.Secret) (result *v1.Secret, err error) { +func (c *secrets) Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Put(). Namespace(c.ns). Resource("secrets"). Name(secret.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(secret). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *secrets) DeleteCollection(ctx context.Context, options *metav1.DeleteOp } // Patch applies the patch and returns the patched secret. -func (c *secrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { +func (c *secrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Patch(pt). Namespace(c.ns). Resource("secrets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go index bd8431212ee..56630c7cdf3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go @@ -38,14 +38,14 @@ type ServicesGetter interface { // ServiceInterface has methods to work with Service resources. type ServiceInterface interface { - Create(context.Context, *v1.Service) (*v1.Service, error) - Update(context.Context, *v1.Service) (*v1.Service, error) - UpdateStatus(context.Context, *v1.Service) (*v1.Service, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Service, error) + Create(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (*v1.Service, error) + Update(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) + UpdateStatus(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) + Delete(ctx context.Context, name string, opts *metav1.DeleteOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Service, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Service, err error) ServiceExpansion } @@ -109,11 +109,12 @@ func (c *services) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In } // Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Create(ctx context.Context, service *v1.Service) (result *v1.Service, err error) { +func (c *services) Create(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Post(). Namespace(c.ns). Resource("services"). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *services) Create(ctx context.Context, service *v1.Service) (result *v1. } // Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any. -func (c *services) Update(ctx context.Context, service *v1.Service) (result *v1.Service, err error) { +func (c *services) Update(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Put(). Namespace(c.ns). Resource("services"). Name(service.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). Do(ctx). Into(result) @@ -135,14 +137,14 @@ func (c *services) Update(ctx context.Context, service *v1.Service) (result *v1. // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *services) UpdateStatus(ctx context.Context, service *v1.Service) (result *v1.Service, err error) { +func (c *services) UpdateStatus(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Put(). Namespace(c.ns). Resource("services"). Name(service.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(service). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *services) Delete(ctx context.Context, name string, options *metav1.Dele } // Patch applies the patch and returns the patched service. -func (c *services) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { +func (c *services) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Patch(pt). Namespace(c.ns). Resource("services"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go index 2f101c1e7e7..671c3726f49 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go @@ -39,15 +39,15 @@ type ServiceAccountsGetter interface { // ServiceAccountInterface has methods to work with ServiceAccount resources. type ServiceAccountInterface interface { - Create(context.Context, *v1.ServiceAccount) (*v1.ServiceAccount, error) - Update(context.Context, *v1.ServiceAccount) (*v1.ServiceAccount, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ServiceAccount, error) + Create(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.CreateOptions) (*v1.ServiceAccount, error) + Update(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.UpdateOptions) (*v1.ServiceAccount, 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.ServiceAccount, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceAccountList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) - CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest) (*authenticationv1.TokenRequest, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceAccount, err error) + CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest, opts metav1.CreateOptions) (*authenticationv1.TokenRequest, error) ServiceAccountExpansion } @@ -112,11 +112,12 @@ func (c *serviceAccounts) Watch(ctx context.Context, opts metav1.ListOptions) (w } // Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *serviceAccounts) Create(ctx context.Context, serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Create(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.CreateOptions) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Post(). Namespace(c.ns). Resource("serviceaccounts"). + VersionedParams(&opts, scheme.ParameterCodec). Body(serviceAccount). Do(ctx). Into(result) @@ -124,12 +125,13 @@ func (c *serviceAccounts) Create(ctx context.Context, serviceAccount *v1.Service } // Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *serviceAccounts) Update(ctx context.Context, serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Update(ctx context.Context, serviceAccount *v1.ServiceAccount, opts metav1.UpdateOptions) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Put(). Namespace(c.ns). Resource("serviceaccounts"). Name(serviceAccount.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(serviceAccount). Do(ctx). Into(result) @@ -164,13 +166,14 @@ func (c *serviceAccounts) DeleteCollection(ctx context.Context, options *metav1. } // Patch applies the patch and returns the patched serviceAccount. -func (c *serviceAccounts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Patch(pt). Namespace(c.ns). Resource("serviceaccounts"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -178,13 +181,14 @@ func (c *serviceAccounts) Patch(ctx context.Context, name string, pt types.Patch } // CreateToken takes the representation of a tokenRequest and creates it. Returns the server's representation of the tokenRequest, and an error, if there is any. -func (c *serviceAccounts) CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest) (result *authenticationv1.TokenRequest, err error) { +func (c *serviceAccounts) CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest, opts metav1.CreateOptions) (result *authenticationv1.TokenRequest, err error) { result = &authenticationv1.TokenRequest{} err = c.client.Post(). Namespace(c.ns). Resource("serviceaccounts"). Name(serviceAccountName). SubResource("token"). + VersionedParams(&opts, scheme.ParameterCodec). Body(tokenRequest). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go index 9691684c84c..6f39aa71413 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go @@ -38,14 +38,14 @@ type EndpointSlicesGetter interface { // EndpointSliceInterface has methods to work with EndpointSlice resources. type EndpointSliceInterface interface { - Create(context.Context, *v1alpha1.EndpointSlice) (*v1alpha1.EndpointSlice, error) - Update(context.Context, *v1alpha1.EndpointSlice) (*v1alpha1.EndpointSlice, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.EndpointSlice, error) + Create(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.CreateOptions) (*v1alpha1.EndpointSlice, error) + Update(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.UpdateOptions) (*v1alpha1.EndpointSlice, 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.EndpointSlice, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.EndpointSliceList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.EndpointSlice, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EndpointSlice, err error) EndpointSliceExpansion } @@ -109,11 +109,12 @@ func (c *endpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice) (result *v1alpha1.EndpointSlice, err error) { +func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.CreateOptions) (result *v1alpha1.EndpointSlice, err error) { result = &v1alpha1.EndpointSlice{} err = c.client.Post(). Namespace(c.ns). Resource("endpointslices"). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpointSlice). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1alpha1.End } // Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice) (result *v1alpha1.EndpointSlice, err error) { +func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.UpdateOptions) (result *v1alpha1.EndpointSlice, err error) { result = &v1alpha1.EndpointSlice{} err = c.client.Put(). Namespace(c.ns). Resource("endpointslices"). Name(endpointSlice.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpointSlice). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *endpointSlices) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched endpointSlice. -func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.EndpointSlice, err error) { +func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EndpointSlice, err error) { result = &v1alpha1.EndpointSlice{} err = c.client.Patch(pt). Namespace(c.ns). Resource("endpointslices"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake/fake_endpointslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake/fake_endpointslice.go index 2eaceb3a36d..61d6a5873fc 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake/fake_endpointslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake/fake_endpointslice.go @@ -81,7 +81,7 @@ func (c *FakeEndpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (wa } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice) (result *v1alpha1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.CreateOptions) (result *v1alpha1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(endpointslicesResource, c.ns, endpointSlice), &v1alpha1.EndpointSlice{}) @@ -92,7 +92,7 @@ func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1alpha1 } // Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice) (result *v1alpha1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *v1alpha1.EndpointSlice, opts v1.UpdateOptions) (result *v1alpha1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(endpointslicesResource, c.ns, endpointSlice), &v1alpha1.EndpointSlice{}) @@ -119,7 +119,7 @@ func (c *FakeEndpointSlices) DeleteCollection(ctx context.Context, options *v1.D } // Patch applies the patch and returns the patched endpointSlice. -func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, name, pt, data, subresources...), &v1alpha1.EndpointSlice{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go index 4829f1dc169..2989fc953bf 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go @@ -38,14 +38,14 @@ type EndpointSlicesGetter interface { // EndpointSliceInterface has methods to work with EndpointSlice resources. type EndpointSliceInterface interface { - Create(context.Context, *v1beta1.EndpointSlice) (*v1beta1.EndpointSlice, error) - Update(context.Context, *v1beta1.EndpointSlice) (*v1beta1.EndpointSlice, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.EndpointSlice, error) + Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (*v1beta1.EndpointSlice, error) + Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (*v1beta1.EndpointSlice, 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.EndpointSlice, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.EndpointSliceList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.EndpointSlice, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) EndpointSliceExpansion } @@ -109,11 +109,12 @@ func (c *endpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice) (result *v1beta1.EndpointSlice, err error) { +func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (result *v1beta1.EndpointSlice, err error) { result = &v1beta1.EndpointSlice{} err = c.client.Post(). Namespace(c.ns). Resource("endpointslices"). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpointSlice). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *endpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.Endp } // Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice) (result *v1beta1.EndpointSlice, err error) { +func (c *endpointSlices) Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (result *v1beta1.EndpointSlice, err error) { result = &v1beta1.EndpointSlice{} err = c.client.Put(). Namespace(c.ns). Resource("endpointslices"). Name(endpointSlice.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(endpointSlice). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *endpointSlices) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched endpointSlice. -func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.EndpointSlice, err error) { +func (c *endpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) { result = &v1beta1.EndpointSlice{} err = c.client.Patch(pt). Namespace(c.ns). Resource("endpointslices"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go index 9e2f06833f7..c67678331e6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake/fake_endpointslice.go @@ -81,7 +81,7 @@ func (c *FakeEndpointSlices) Watch(ctx context.Context, opts v1.ListOptions) (wa } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice) (result *v1beta1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (result *v1beta1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(endpointslicesResource, c.ns, endpointSlice), &v1beta1.EndpointSlice{}) @@ -92,7 +92,7 @@ func (c *FakeEndpointSlices) Create(ctx context.Context, endpointSlice *v1beta1. } // Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. -func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice) (result *v1beta1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (result *v1beta1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(endpointslicesResource, c.ns, endpointSlice), &v1beta1.EndpointSlice{}) @@ -119,7 +119,7 @@ func (c *FakeEndpointSlices) DeleteCollection(ctx context.Context, options *v1.D } // Patch applies the patch and returns the patched endpointSlice. -func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.EndpointSlice, err error) { +func (c *FakeEndpointSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(endpointslicesResource, c.ns, name, pt, data, subresources...), &v1beta1.EndpointSlice{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go index 38b46fd17a7..22eed88007f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go @@ -38,14 +38,14 @@ type EventsGetter interface { // EventInterface has methods to work with Event resources. type EventInterface interface { - Create(context.Context, *v1beta1.Event) (*v1beta1.Event, error) - Update(context.Context, *v1beta1.Event) (*v1beta1.Event, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.Event, error) + Create(ctx context.Context, event *v1beta1.Event, opts v1.CreateOptions) (*v1beta1.Event, error) + Update(ctx context.Context, event *v1beta1.Event, opts v1.UpdateOptions) (*v1beta1.Event, 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.Event, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.EventList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Event, err error) EventExpansion } @@ -109,11 +109,12 @@ func (c *events) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interfac } // Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. -func (c *events) Create(ctx context.Context, event *v1beta1.Event) (result *v1beta1.Event, err error) { +func (c *events) Create(ctx context.Context, event *v1beta1.Event, opts v1.CreateOptions) (result *v1beta1.Event, err error) { result = &v1beta1.Event{} err = c.client.Post(). Namespace(c.ns). Resource("events"). + VersionedParams(&opts, scheme.ParameterCodec). Body(event). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *events) Create(ctx context.Context, event *v1beta1.Event) (result *v1be } // Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. -func (c *events) Update(ctx context.Context, event *v1beta1.Event) (result *v1beta1.Event, err error) { +func (c *events) Update(ctx context.Context, event *v1beta1.Event, opts v1.UpdateOptions) (result *v1beta1.Event, err error) { result = &v1beta1.Event{} err = c.client.Put(). Namespace(c.ns). Resource("events"). Name(event.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(event). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *events) DeleteCollection(ctx context.Context, options *v1.DeleteOptions } // Patch applies the patch and returns the patched event. -func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error) { +func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Event, err error) { result = &v1beta1.Event{} err = c.client.Patch(pt). Namespace(c.ns). Resource("events"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go index 2ce93d7a6a8..41c6865abeb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go @@ -81,7 +81,7 @@ func (c *FakeEvents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } // Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Create(ctx context.Context, event *v1beta1.Event) (result *v1beta1.Event, err error) { +func (c *FakeEvents) Create(ctx context.Context, event *v1beta1.Event, opts v1.CreateOptions) (result *v1beta1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &v1beta1.Event{}) @@ -92,7 +92,7 @@ func (c *FakeEvents) Create(ctx context.Context, event *v1beta1.Event) (result * } // Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Update(ctx context.Context, event *v1beta1.Event) (result *v1beta1.Event, err error) { +func (c *FakeEvents) Update(ctx context.Context, event *v1beta1.Event, opts v1.UpdateOptions) (result *v1beta1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &v1beta1.Event{}) @@ -119,7 +119,7 @@ func (c *FakeEvents) DeleteCollection(ctx context.Context, options *v1.DeleteOpt } // Patch applies the patch and returns the patched event. -func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Event, err error) { +func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, pt, data, subresources...), &v1beta1.Event{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go index 2b1440fda62..d1aa54c989e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go @@ -38,15 +38,15 @@ type DaemonSetsGetter interface { // DaemonSetInterface has methods to work with DaemonSet resources. type DaemonSetInterface interface { - Create(context.Context, *v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) - Update(context.Context, *v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) - UpdateStatus(context.Context, *v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.DaemonSet, error) + Create(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.CreateOptions) (*v1beta1.DaemonSet, error) + Update(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (*v1beta1.DaemonSet, error) + UpdateStatus(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (*v1beta1.DaemonSet, 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.DaemonSet, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DaemonSetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DaemonSet, err error) DaemonSetExpansion } @@ -110,11 +110,12 @@ func (c *daemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.CreateOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Post(). Namespace(c.ns). Resource("daemonsets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta1.DaemonSet) ( } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta1.DaemonSet) ( // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Put(). Namespace(c.ns). Resource("daemonsets"). Name(daemonSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(daemonSet). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *daemonSets) DeleteCollection(ctx context.Context, options *v1.DeleteOpt } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("daemonsets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go index 28479029e19..70c07fa9649 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go @@ -38,17 +38,17 @@ type DeploymentsGetter interface { // DeploymentInterface has methods to work with Deployment resources. type DeploymentInterface interface { - Create(context.Context, *v1beta1.Deployment) (*v1beta1.Deployment, error) - Update(context.Context, *v1beta1.Deployment) (*v1beta1.Deployment, error) - UpdateStatus(context.Context, *v1beta1.Deployment) (*v1beta1.Deployment, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.Deployment, error) + Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (*v1beta1.Deployment, error) + Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) + UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, 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.Deployment, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DeploymentList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) GetScale(ctx context.Context, deploymentName string, options v1.GetOptions) (*v1beta1.Scale, error) - UpdateScale(ctx context.Context, deploymentName string, scale *v1beta1.Scale) (*v1beta1.Scale, error) + UpdateScale(ctx context.Context, deploymentName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (*v1beta1.Scale, error) DeploymentExpansion } @@ -113,11 +113,12 @@ func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Post(). Namespace(c.ns). Resource("deployments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -125,12 +126,13 @@ func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -139,14 +141,14 @@ func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deployment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(deployment). Do(ctx). Into(result) @@ -181,13 +183,14 @@ func (c *deployments) DeleteCollection(ctx context.Context, options *v1.DeleteOp } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). Resource("deployments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -209,13 +212,14 @@ func (c *deployments) GetScale(ctx context.Context, deploymentName string, optio } // UpdateScale takes the top resource name and 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 *deployments) UpdateScale(ctx context.Context, deploymentName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) { +func (c *deployments) UpdateScale(ctx context.Context, deploymentName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { result = &v1beta1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("deployments"). Name(deploymentName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go index 44f3a5e9290..dfce4a041da 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go @@ -81,7 +81,7 @@ func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.CreateOptions) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{}) @@ -92,7 +92,7 @@ func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta1.DaemonSe } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{}) @@ -104,7 +104,7 @@ func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta1.DaemonSe // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) { +func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta1.DaemonSet, opts v1.UpdateOptions) (*v1beta1.DaemonSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1beta1.DaemonSet{}) @@ -131,7 +131,7 @@ func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &v1beta1.DaemonSet{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go index 2c7004db865..737f690e7d0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go @@ -81,7 +81,7 @@ func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) @@ -92,7 +92,7 @@ func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deploy } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{}) @@ -104,7 +104,7 @@ func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deploy // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) { +func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{}) @@ -131,7 +131,7 @@ func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta1.Deployment{}) @@ -153,7 +153,7 @@ func (c *FakeDeployments) GetScale(ctx context.Context, deploymentName string, o } // 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 *FakeDeployments) UpdateScale(ctx context.Context, deploymentName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) { +func (c *FakeDeployments) UpdateScale(ctx context.Context, deploymentName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "scale", c.ns, scale), &v1beta1.Scale{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go index 119f6f3263f..4dc0f1694e1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go @@ -81,7 +81,7 @@ func (c *FakeIngresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // 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 *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) @@ -92,7 +92,7 @@ func (c *FakeIngresses) Create(ctx context.Context, ingress *v1beta1.Ingress) (r } // 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 *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) @@ -104,7 +104,7 @@ func (c *FakeIngresses) Update(ctx context.Context, ingress *v1beta1.Ingress) (r // 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 *v1beta1.Ingress) (*v1beta1.Ingress, error) { +func (c *FakeIngresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &v1beta1.Ingress{}) @@ -131,7 +131,7 @@ func (c *FakeIngresses) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched ingress. -func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, pt, data, subresources...), &v1beta1.Ingress{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go index 403f44756ed..5997132d620 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go @@ -81,7 +81,7 @@ func (c *FakeNetworkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy) (result *v1beta1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (result *v1beta1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &v1beta1.NetworkPolicy{}) @@ -92,7 +92,7 @@ func (c *FakeNetworkPolicies) Create(ctx context.Context, networkPolicy *v1beta1 } // Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy) (result *v1beta1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &v1beta1.NetworkPolicy{}) @@ -119,7 +119,7 @@ func (c *FakeNetworkPolicies) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched networkPolicy. -func (c *FakeNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, pt, data, subresources...), &v1beta1.NetworkPolicy{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go index a659e8c836f..5ade0028ab6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go @@ -77,7 +77,7 @@ func (c *FakePodSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions } // Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *FakePodSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakePodSecurityPolicies) Create(ctx context.Context, podSecurityPolicy } // Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *FakePodSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakePodSecurityPolicies) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *FakePodSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, pt, data, subresources...), &v1beta1.PodSecurityPolicy{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go index 62293014ba1..48e1f629074 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go @@ -81,7 +81,7 @@ func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.CreateOptions) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{}) @@ -92,7 +92,7 @@ func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta1.Replic } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{}) @@ -104,7 +104,7 @@ func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta1.Replic // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) { +func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (*v1beta1.ReplicaSet, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta1.ReplicaSet{}) @@ -131,7 +131,7 @@ func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &v1beta1.ReplicaSet{}) @@ -153,7 +153,7 @@ func (c *FakeReplicaSets) GetScale(ctx context.Context, replicaSetName string, o } // 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 *FakeReplicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) { +func (c *FakeReplicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "scale", c.ns, scale), &v1beta1.Scale{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go index cf5b88c6904..7c162c67c0e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go @@ -38,15 +38,15 @@ type IngressesGetter interface { // IngressInterface has methods to work with Ingress resources. type IngressInterface interface { - Create(context.Context, *v1beta1.Ingress) (*v1beta1.Ingress, error) - Update(context.Context, *v1beta1.Ingress) (*v1beta1.Ingress, error) - UpdateStatus(context.Context, *v1beta1.Ingress) (*v1beta1.Ingress, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.Ingress, error) + Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (*v1beta1.Ingress, error) + Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) + UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, 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.Ingress, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.IngressList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) IngressExpansion } @@ -110,11 +110,12 @@ func (c *ingresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } // Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Post(). Namespace(c.ns). Resource("ingresses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress) (resul } // Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress) (resul // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *ingresses) DeleteCollection(ctx context.Context, options *v1.DeleteOpti } // Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Patch(pt). Namespace(c.ns). Resource("ingresses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go index ab5ef66dd89..92ff833105e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go @@ -38,14 +38,14 @@ type NetworkPoliciesGetter interface { // NetworkPolicyInterface has methods to work with NetworkPolicy resources. type NetworkPolicyInterface interface { - Create(context.Context, *v1beta1.NetworkPolicy) (*v1beta1.NetworkPolicy, error) - Update(context.Context, *v1beta1.NetworkPolicy) (*v1beta1.NetworkPolicy, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.NetworkPolicy, error) + Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (*v1beta1.NetworkPolicy, error) + Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, 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.NetworkPolicy, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.NetworkPolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.NetworkPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error) NetworkPolicyExpansion } @@ -109,11 +109,12 @@ func (c *networkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy) (result *v1beta1.NetworkPolicy, err error) { +func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (result *v1beta1.NetworkPolicy, err error) { result = &v1beta1.NetworkPolicy{} err = c.client.Post(). Namespace(c.ns). Resource("networkpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). Body(networkPolicy). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1beta1.Net } // Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy) (result *v1beta1.NetworkPolicy, err error) { +func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkPolicy, err error) { result = &v1beta1.NetworkPolicy{} err = c.client.Put(). Namespace(c.ns). Resource("networkpolicies"). Name(networkPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(networkPolicy). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *networkPolicies) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched networkPolicy. -func (c *networkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.NetworkPolicy, err error) { +func (c *networkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error) { result = &v1beta1.NetworkPolicy{} err = c.client.Patch(pt). Namespace(c.ns). Resource("networkpolicies"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go index 7e1da69c0df..e57b8de71a6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go @@ -38,14 +38,14 @@ type PodSecurityPoliciesGetter interface { // PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources. type PodSecurityPolicyInterface interface { - Create(context.Context, *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) - Update(context.Context, *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) + Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (*v1beta1.PodSecurityPolicy, error) + Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (*v1beta1.PodSecurityPolicy, 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.PodSecurityPolicy, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) PodSecurityPolicyExpansion } @@ -104,10 +104,11 @@ func (c *podSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Post(). Resource("podsecuritypolicies"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podSecurityPolicy). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1b } // Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Put(). Resource("podsecuritypolicies"). Name(podSecurityPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(podSecurityPolicy). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *podSecurityPolicies) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *podSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Patch(pt). Resource("podsecuritypolicies"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go index 6fb352ef0be..9db0cbfdba7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go @@ -38,17 +38,17 @@ type ReplicaSetsGetter interface { // ReplicaSetInterface has methods to work with ReplicaSet resources. type ReplicaSetInterface interface { - Create(context.Context, *v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) - Update(context.Context, *v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) - UpdateStatus(context.Context, *v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.ReplicaSet, error) + Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.CreateOptions) (*v1beta1.ReplicaSet, error) + Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (*v1beta1.ReplicaSet, error) + UpdateStatus(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (*v1beta1.ReplicaSet, 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.ReplicaSet, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ReplicaSetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ReplicaSet, err error) GetScale(ctx context.Context, replicaSetName string, options v1.GetOptions) (*v1beta1.Scale, error) - UpdateScale(ctx context.Context, replicaSetName string, scale *v1beta1.Scale) (*v1beta1.Scale, error) + UpdateScale(ctx context.Context, replicaSetName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (*v1beta1.Scale, error) ReplicaSetExpansion } @@ -113,11 +113,12 @@ func (c *replicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.CreateOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Post(). Namespace(c.ns). Resource("replicasets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). Do(ctx). Into(result) @@ -125,12 +126,13 @@ func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta1.ReplicaSet } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). Do(ctx). Into(result) @@ -139,14 +141,14 @@ func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta1.ReplicaSet // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta1.ReplicaSet, opts v1.UpdateOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSet.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(replicaSet). Do(ctx). Into(result) @@ -181,13 +183,14 @@ func (c *replicaSets) DeleteCollection(ctx context.Context, options *v1.DeleteOp } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). Resource("replicasets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -209,13 +212,14 @@ func (c *replicaSets) GetScale(ctx context.Context, replicaSetName string, optio } // UpdateScale takes the top resource name and 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 *replicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) { +func (c *replicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *v1beta1.Scale, opts v1.UpdateOptions) (result *v1beta1.Scale, err error) { result = &v1beta1.Scale{} err = c.client.Put(). Namespace(c.ns). Resource("replicasets"). Name(replicaSetName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go index a0a7572fceb..f3dd97f195c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_flowschema.go @@ -77,7 +77,7 @@ func (c *FakeFlowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any. -func (c *FakeFlowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema) (result *v1alpha1.FlowSchema, err error) { +func (c *FakeFlowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (result *v1alpha1.FlowSchema, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(flowschemasResource, flowSchema), &v1alpha1.FlowSchema{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeFlowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowS } // Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any. -func (c *FakeFlowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema) (result *v1alpha1.FlowSchema, err error) { +func (c *FakeFlowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(flowschemasResource, flowSchema), &v1alpha1.FlowSchema{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeFlowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowS // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeFlowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema) (*v1alpha1.FlowSchema, error) { +func (c *FakeFlowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(flowschemasResource, "status", flowSchema), &v1alpha1.FlowSchema{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakeFlowSchemas) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched flowSchema. -func (c *FakeFlowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.FlowSchema, err error) { +func (c *FakeFlowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FlowSchema, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, name, pt, data, subresources...), &v1alpha1.FlowSchema{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go index 6f8503d4720..d5b4e7998bd 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake/fake_prioritylevelconfiguration.go @@ -77,7 +77,7 @@ func (c *FakePriorityLevelConfigurations) Watch(ctx context.Context, opts v1.Lis } // Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. -func (c *FakePriorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *FakePriorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakePriorityLevelConfigurations) Create(ctx context.Context, priorityLe } // Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. -func (c *FakePriorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *FakePriorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakePriorityLevelConfigurations) Update(ctx context.Context, priorityLe // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePriorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (*v1alpha1.PriorityLevelConfiguration, error) { +func (c *FakePriorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(prioritylevelconfigurationsResource, "status", priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakePriorityLevelConfigurations) DeleteCollection(ctx context.Context, } // Patch applies the patch and returns the patched priorityLevelConfiguration. -func (c *FakePriorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *FakePriorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, name, pt, data, subresources...), &v1alpha1.PriorityLevelConfiguration{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go index cb4768136d1..ca209f0979e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go @@ -38,15 +38,15 @@ type FlowSchemasGetter interface { // FlowSchemaInterface has methods to work with FlowSchema resources. type FlowSchemaInterface interface { - Create(context.Context, *v1alpha1.FlowSchema) (*v1alpha1.FlowSchema, error) - Update(context.Context, *v1alpha1.FlowSchema) (*v1alpha1.FlowSchema, error) - UpdateStatus(context.Context, *v1alpha1.FlowSchema) (*v1alpha1.FlowSchema, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.FlowSchema, error) + Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (*v1alpha1.FlowSchema, error) + Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, error) + UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, 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.FlowSchema, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FlowSchemaList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.FlowSchema, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FlowSchema, err error) FlowSchemaExpansion } @@ -105,10 +105,11 @@ func (c *flowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } // Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any. -func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema) (result *v1alpha1.FlowSchema, err error) { +func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Post(). Resource("flowschemas"). + VersionedParams(&opts, scheme.ParameterCodec). Body(flowSchema). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchem } // Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any. -func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema) (result *v1alpha1.FlowSchema, err error) { +func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Put(). Resource("flowschemas"). Name(flowSchema.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(flowSchema). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchem // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema) (result *v1alpha1.FlowSchema, err error) { +func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Put(). Resource("flowschemas"). Name(flowSchema.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(flowSchema). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *flowSchemas) DeleteCollection(ctx context.Context, options *v1.DeleteOp } // Patch applies the patch and returns the patched flowSchema. -func (c *flowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.FlowSchema, err error) { +func (c *flowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FlowSchema, err error) { result = &v1alpha1.FlowSchema{} err = c.client.Patch(pt). Resource("flowschemas"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go index 3ccb0c596a1..413fea4bc0e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -38,15 +38,15 @@ type PriorityLevelConfigurationsGetter interface { // PriorityLevelConfigurationInterface has methods to work with PriorityLevelConfiguration resources. type PriorityLevelConfigurationInterface interface { - Create(context.Context, *v1alpha1.PriorityLevelConfiguration) (*v1alpha1.PriorityLevelConfiguration, error) - Update(context.Context, *v1alpha1.PriorityLevelConfiguration) (*v1alpha1.PriorityLevelConfiguration, error) - UpdateStatus(context.Context, *v1alpha1.PriorityLevelConfiguration) (*v1alpha1.PriorityLevelConfiguration, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.PriorityLevelConfiguration, error) + Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (*v1alpha1.PriorityLevelConfiguration, error) + Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, error) + UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, 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.PriorityLevelConfiguration, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PriorityLevelConfigurationList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) PriorityLevelConfigurationExpansion } @@ -105,10 +105,11 @@ func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOpt } // Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. -func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Post(). Resource("prioritylevelconfigurations"). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityLevelConfiguration). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelC } // Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. -func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Put(). Resource("prioritylevelconfigurations"). Name(priorityLevelConfiguration.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityLevelConfiguration). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelC // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Put(). Resource("prioritylevelconfigurations"). Name(priorityLevelConfiguration.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityLevelConfiguration). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opti } // Patch applies the patch and returns the patched priorityLevelConfiguration. -func (c *priorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) { +func (c *priorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) { result = &v1alpha1.PriorityLevelConfiguration{} err = c.client.Patch(pt). Resource("prioritylevelconfigurations"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go index 56d28d07092..c251b667516 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go @@ -81,7 +81,7 @@ func (c *FakeNetworkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Create(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy) (result *networkingv1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Create(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, opts v1.CreateOptions) (result *networkingv1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &networkingv1.NetworkPolicy{}) @@ -92,7 +92,7 @@ func (c *FakeNetworkPolicies) Create(ctx context.Context, networkPolicy *network } // Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy) (result *networkingv1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, opts v1.UpdateOptions) (result *networkingv1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &networkingv1.NetworkPolicy{}) @@ -119,7 +119,7 @@ func (c *FakeNetworkPolicies) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched networkPolicy. -func (c *FakeNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *networkingv1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *networkingv1.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, pt, data, subresources...), &networkingv1.NetworkPolicy{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go index 690ba435591..4fa19860387 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go @@ -38,14 +38,14 @@ type NetworkPoliciesGetter interface { // NetworkPolicyInterface has methods to work with NetworkPolicy resources. type NetworkPolicyInterface interface { - Create(context.Context, *v1.NetworkPolicy) (*v1.NetworkPolicy, error) - Update(context.Context, *v1.NetworkPolicy) (*v1.NetworkPolicy, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.NetworkPolicy, error) + Create(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (*v1.NetworkPolicy, error) + Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, 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.NetworkPolicy, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.NetworkPolicyList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error) NetworkPolicyExpansion } @@ -109,11 +109,12 @@ func (c *networkPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (w } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) { +func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Post(). Namespace(c.ns). Resource("networkpolicies"). + VersionedParams(&opts, scheme.ParameterCodec). Body(networkPolicy). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1.NetworkP } // Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) { +func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Put(). Namespace(c.ns). Resource("networkpolicies"). Name(networkPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(networkPolicy). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *networkPolicies) DeleteCollection(ctx context.Context, options *metav1. } // Patch applies the patch and returns the patched networkPolicy. -func (c *networkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error) { +func (c *networkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Patch(pt). Namespace(c.ns). Resource("networkpolicies"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go index 3def9951fd3..130d037d569 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake/fake_ingress.go @@ -81,7 +81,7 @@ func (c *FakeIngresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // 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 *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) @@ -92,7 +92,7 @@ func (c *FakeIngresses) Create(ctx context.Context, ingress *v1beta1.Ingress) (r } // 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 *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{}) @@ -104,7 +104,7 @@ func (c *FakeIngresses) Update(ctx context.Context, ingress *v1beta1.Ingress) (r // 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 *v1beta1.Ingress) (*v1beta1.Ingress, error) { +func (c *FakeIngresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &v1beta1.Ingress{}) @@ -131,7 +131,7 @@ func (c *FakeIngresses) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched ingress. -func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, pt, data, subresources...), &v1beta1.Ingress{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go index 4de1206cf72..b8420c0dc77 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go @@ -38,15 +38,15 @@ type IngressesGetter interface { // IngressInterface has methods to work with Ingress resources. type IngressInterface interface { - Create(context.Context, *v1beta1.Ingress) (*v1beta1.Ingress, error) - Update(context.Context, *v1beta1.Ingress) (*v1beta1.Ingress, error) - UpdateStatus(context.Context, *v1beta1.Ingress) (*v1beta1.Ingress, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.Ingress, error) + Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (*v1beta1.Ingress, error) + Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, error) + UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (*v1beta1.Ingress, 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.Ingress, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.IngressList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) IngressExpansion } @@ -110,11 +110,12 @@ func (c *ingresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } // Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress, opts v1.CreateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Post(). Namespace(c.ns). Resource("ingresses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *ingresses) Create(ctx context.Context, ingress *v1beta1.Ingress) (resul } // Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *ingresses) Update(ctx context.Context, ingress *v1beta1.Ingress) (resul // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) { +func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1beta1.Ingress, opts v1.UpdateOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Put(). Namespace(c.ns). Resource("ingresses"). Name(ingress.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(ingress). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *ingresses) DeleteCollection(ctx context.Context, options *v1.DeleteOpti } // Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Patch(pt). Namespace(c.ns). Resource("ingresses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go index 920df4f77a3..1495ba72a9d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go @@ -77,7 +77,7 @@ func (c *FakeRuntimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (wa } // Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *FakeRuntimeClasses) Create(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Create(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.CreateOptions) (result *v1alpha1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(runtimeclassesResource, runtimeClass), &v1alpha1.RuntimeClass{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeRuntimeClasses) Create(ctx context.Context, runtimeClass *v1alpha1. } // Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *FakeRuntimeClasses) Update(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Update(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.UpdateOptions) (result *v1alpha1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(runtimeclassesResource, runtimeClass), &v1alpha1.RuntimeClass{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeRuntimeClasses) DeleteCollection(ctx context.Context, options *v1.D } // Patch applies the patch and returns the patched runtimeClass. -func (c *FakeRuntimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, name, pt, data, subresources...), &v1alpha1.RuntimeClass{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go index c4a1af5f23f..c60f24211a8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go @@ -38,14 +38,14 @@ type RuntimeClassesGetter interface { // RuntimeClassInterface has methods to work with RuntimeClass resources. type RuntimeClassInterface interface { - Create(context.Context, *v1alpha1.RuntimeClass) (*v1alpha1.RuntimeClass, error) - Update(context.Context, *v1alpha1.RuntimeClass) (*v1alpha1.RuntimeClass, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.RuntimeClass, error) + Create(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.CreateOptions) (*v1alpha1.RuntimeClass, error) + Update(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.UpdateOptions) (*v1alpha1.RuntimeClass, 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.RuntimeClass, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RuntimeClassList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RuntimeClass, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RuntimeClass, err error) RuntimeClassExpansion } @@ -104,10 +104,11 @@ func (c *runtimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) { +func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.CreateOptions) (result *v1alpha1.RuntimeClass, err error) { result = &v1alpha1.RuntimeClass{} err = c.client.Post(). Resource("runtimeclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(runtimeClass). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1alpha1.Runt } // Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) { +func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.UpdateOptions) (result *v1alpha1.RuntimeClass, err error) { result = &v1alpha1.RuntimeClass{} err = c.client.Put(). Resource("runtimeclasses"). Name(runtimeClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(runtimeClass). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *runtimeClasses) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched runtimeClass. -func (c *runtimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RuntimeClass, err error) { +func (c *runtimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RuntimeClass, err error) { result = &v1alpha1.RuntimeClass{} err = c.client.Patch(pt). Resource("runtimeclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go index 40fd252a33d..1eef57f96eb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go @@ -77,7 +77,7 @@ func (c *FakeRuntimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (wa } // Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *FakeRuntimeClasses) Create(ctx context.Context, runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Create(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.CreateOptions) (result *v1beta1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(runtimeclassesResource, runtimeClass), &v1beta1.RuntimeClass{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeRuntimeClasses) Create(ctx context.Context, runtimeClass *v1beta1.R } // Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *FakeRuntimeClasses) Update(ctx context.Context, runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Update(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.UpdateOptions) (result *v1beta1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(runtimeclassesResource, runtimeClass), &v1beta1.RuntimeClass{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeRuntimeClasses) DeleteCollection(ctx context.Context, options *v1.D } // Patch applies the patch and returns the patched runtimeClass. -func (c *FakeRuntimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RuntimeClass, err error) { +func (c *FakeRuntimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RuntimeClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, name, pt, data, subresources...), &v1beta1.RuntimeClass{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go index b38ea56afe2..7cdd58f2927 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go @@ -38,14 +38,14 @@ type RuntimeClassesGetter interface { // RuntimeClassInterface has methods to work with RuntimeClass resources. type RuntimeClassInterface interface { - Create(context.Context, *v1beta1.RuntimeClass) (*v1beta1.RuntimeClass, error) - Update(context.Context, *v1beta1.RuntimeClass) (*v1beta1.RuntimeClass, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.RuntimeClass, error) + Create(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.CreateOptions) (*v1beta1.RuntimeClass, error) + Update(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.UpdateOptions) (*v1beta1.RuntimeClass, 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.RuntimeClass, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.RuntimeClassList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RuntimeClass, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RuntimeClass, err error) RuntimeClassExpansion } @@ -104,10 +104,11 @@ func (c *runtimeClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) { +func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.CreateOptions) (result *v1beta1.RuntimeClass, err error) { result = &v1beta1.RuntimeClass{} err = c.client.Post(). Resource("runtimeclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(runtimeClass). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *runtimeClasses) Create(ctx context.Context, runtimeClass *v1beta1.Runti } // Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any. -func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) { +func (c *runtimeClasses) Update(ctx context.Context, runtimeClass *v1beta1.RuntimeClass, opts v1.UpdateOptions) (result *v1beta1.RuntimeClass, err error) { result = &v1beta1.RuntimeClass{} err = c.client.Put(). Resource("runtimeclasses"). Name(runtimeClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(runtimeClass). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *runtimeClasses) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched runtimeClass. -func (c *runtimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RuntimeClass, err error) { +func (c *runtimeClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RuntimeClass, err error) { result = &v1beta1.RuntimeClass{} err = c.client.Patch(pt). Resource("runtimeclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go index 8246c902359..bd7a82819c9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go @@ -81,7 +81,7 @@ func (c *FakePodDisruptionBudgets) Watch(ctx context.Context, opts v1.ListOption } // Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *FakePodDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *FakePodDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.CreateOptions) (result *v1beta1.PodDisruptionBudget, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1beta1.PodDisruptionBudget{}) @@ -92,7 +92,7 @@ func (c *FakePodDisruptionBudgets) Create(ctx context.Context, podDisruptionBudg } // Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *FakePodDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *FakePodDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (result *v1beta1.PodDisruptionBudget, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1beta1.PodDisruptionBudget{}) @@ -104,7 +104,7 @@ func (c *FakePodDisruptionBudgets) Update(ctx context.Context, podDisruptionBudg // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePodDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) { +func (c *FakePodDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (*v1beta1.PodDisruptionBudget, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &v1beta1.PodDisruptionBudget{}) @@ -131,7 +131,7 @@ func (c *FakePodDisruptionBudgets) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched podDisruptionBudget. -func (c *FakePodDisruptionBudgets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *FakePodDisruptionBudgets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, pt, data, subresources...), &v1beta1.PodDisruptionBudget{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go index b60d2a2a598..a1f850d2be6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go @@ -77,7 +77,7 @@ func (c *FakePodSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions } // Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *FakePodSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakePodSecurityPolicies) Create(ctx context.Context, podSecurityPolicy } // Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *FakePodSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakePodSecurityPolicies) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *FakePodSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, pt, data, subresources...), &v1beta1.PodSecurityPolicy{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go index 9fed91bf7db..e82a6d20e58 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go @@ -38,15 +38,15 @@ type PodDisruptionBudgetsGetter interface { // PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources. type PodDisruptionBudgetInterface interface { - Create(context.Context, *v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) - Update(context.Context, *v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) - UpdateStatus(context.Context, *v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.PodDisruptionBudget, error) + Create(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.CreateOptions) (*v1beta1.PodDisruptionBudget, error) + Update(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (*v1beta1.PodDisruptionBudget, error) + UpdateStatus(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (*v1beta1.PodDisruptionBudget, 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.PodDisruptionBudget, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PodDisruptionBudgetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) PodDisruptionBudgetExpansion } @@ -110,11 +110,12 @@ func (c *podDisruptionBudgets) Watch(ctx context.Context, opts v1.ListOptions) ( } // Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.CreateOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Post(). Namespace(c.ns). Resource("poddisruptionbudgets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podDisruptionBudget). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *podDisruptionBudgets) Create(ctx context.Context, podDisruptionBudget * } // Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Put(). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(podDisruptionBudget.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(podDisruptionBudget). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *podDisruptionBudgets) Update(ctx context.Context, podDisruptionBudget * // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *podDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) UpdateStatus(ctx context.Context, podDisruptionBudget *v1beta1.PodDisruptionBudget, opts v1.UpdateOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Put(). Namespace(c.ns). Resource("poddisruptionbudgets"). Name(podDisruptionBudget.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podDisruptionBudget). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *podDisruptionBudgets) DeleteCollection(ctx context.Context, options *v1 } // Patch applies the patch and returns the patched podDisruptionBudget. -func (c *podDisruptionBudgets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Patch(pt). Namespace(c.ns). Resource("poddisruptionbudgets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go index 2add7c59008..7cadf263517 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go @@ -38,14 +38,14 @@ type PodSecurityPoliciesGetter interface { // PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources. type PodSecurityPolicyInterface interface { - Create(context.Context, *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) - Update(context.Context, *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) + Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (*v1beta1.PodSecurityPolicy, error) + Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (*v1beta1.PodSecurityPolicy, 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.PodSecurityPolicy, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) PodSecurityPolicyExpansion } @@ -104,10 +104,11 @@ func (c *podSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Post(). Resource("podsecuritypolicies"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podSecurityPolicy). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1b } // Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. -func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Put(). Resource("podsecuritypolicies"). Name(podSecurityPolicy.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(podSecurityPolicy). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *podSecurityPolicies) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *podSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Patch(pt). Resource("podsecuritypolicies"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go index 9fc2968c8d2..467c6ddb029 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go @@ -38,14 +38,14 @@ type ClusterRolesGetter interface { // ClusterRoleInterface has methods to work with ClusterRole resources. type ClusterRoleInterface interface { - Create(context.Context, *v1.ClusterRole) (*v1.ClusterRole, error) - Update(context.Context, *v1.ClusterRole) (*v1.ClusterRole, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ClusterRole, error) + 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) + 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) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRole, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRole, err error) ClusterRoleExpansion } @@ -104,10 +104,11 @@ func (c *clusterRoles) Watch(ctx context.Context, opts metav1.ListOptions) (watc } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1.ClusterRole) (result *v1.ClusterRole, err error) { +func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.CreateOptions) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Post(). Resource("clusterroles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1.ClusterRole) } // Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1.ClusterRole) (result *v1.ClusterRole, err error) { +func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.UpdateOptions) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Put(). Resource("clusterroles"). Name(clusterRole.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *clusterRoles) DeleteCollection(ctx context.Context, options *metav1.Del } // Patch applies the patch and returns the patched clusterRole. -func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRole, err error) { +func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Patch(pt). Resource("clusterroles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go index a0d282b05ba..19ace55f513 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go @@ -38,14 +38,14 @@ type ClusterRoleBindingsGetter interface { // ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources. type ClusterRoleBindingInterface interface { - Create(context.Context, *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) - Update(context.Context, *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ClusterRoleBinding, error) + 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) + 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) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRoleBinding, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } @@ -104,10 +104,11 @@ func (c *clusterRoleBindings) Watch(ctx context.Context, opts metav1.ListOptions } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding) (result *v1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.CreateOptions) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Post(). Resource("clusterrolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1 } // Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding) (result *v1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.UpdateOptions) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Put(). Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, options *met } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Patch(pt). Resource("clusterrolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go index 947552751f9..2eec9defdaa 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go @@ -77,7 +77,7 @@ func (c *FakeClusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watc } // 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 *rbacv1.ClusterRole) (result *rbacv1.ClusterRole, err error) { +func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *rbacv1.ClusterRole, opts v1.CreateOptions) (result *rbacv1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &rbacv1.ClusterRole{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *rbacv1.Clust } // 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 *rbacv1.ClusterRole) (result *rbacv1.ClusterRole, err error) { +func (c *FakeClusterRoles) Update(ctx context.Context, clusterRole *rbacv1.ClusterRole, opts v1.UpdateOptions) (result *rbacv1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &rbacv1.ClusterRole{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeClusterRoles) DeleteCollection(ctx context.Context, options *v1.Del } // Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.ClusterRole, err error) { +func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, pt, data, subresources...), &rbacv1.ClusterRole{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go index 7bc37a62791..c7943659f66 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go @@ -77,7 +77,7 @@ func (c *FakeClusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions } // 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 *rbacv1.ClusterRoleBinding) (result *rbacv1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *rbacv1.ClusterRoleBinding, opts v1.CreateOptions) (result *rbacv1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &rbacv1.ClusterRoleBinding{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding } // 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 *rbacv1.ClusterRoleBinding) (result *rbacv1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *rbacv1.ClusterRoleBinding, opts v1.UpdateOptions) (result *rbacv1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &rbacv1.ClusterRoleBinding{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeClusterRoleBindings) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, pt, data, subresources...), &rbacv1.ClusterRoleBinding{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go index eee46d44dce..1d3cee64ed8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go @@ -81,7 +81,7 @@ func (c *FakeRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } // 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 *rbacv1.Role) (result *rbacv1.Role, err error) { +func (c *FakeRoles) Create(ctx context.Context, role *rbacv1.Role, opts v1.CreateOptions) (result *rbacv1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &rbacv1.Role{}) @@ -92,7 +92,7 @@ func (c *FakeRoles) Create(ctx context.Context, role *rbacv1.Role) (result *rbac } // 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 *rbacv1.Role) (result *rbacv1.Role, err error) { +func (c *FakeRoles) Update(ctx context.Context, role *rbacv1.Role, opts v1.UpdateOptions) (result *rbacv1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &rbacv1.Role{}) @@ -119,7 +119,7 @@ func (c *FakeRoles) DeleteCollection(ctx context.Context, options *v1.DeleteOpti } // Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.Role, err error) { +func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, pt, data, subresources...), &rbacv1.Role{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go index 18412907833..dcdc0897512 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go @@ -81,7 +81,7 @@ func (c *FakeRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watc } // 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 *rbacv1.RoleBinding) (result *rbacv1.RoleBinding, err error) { +func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *rbacv1.RoleBinding, opts v1.CreateOptions) (result *rbacv1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &rbacv1.RoleBinding{}) @@ -92,7 +92,7 @@ func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *rbacv1.RoleB } // 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 *rbacv1.RoleBinding) (result *rbacv1.RoleBinding, err error) { +func (c *FakeRoleBindings) Update(ctx context.Context, roleBinding *rbacv1.RoleBinding, opts v1.UpdateOptions) (result *rbacv1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &rbacv1.RoleBinding{}) @@ -119,7 +119,7 @@ func (c *FakeRoleBindings) DeleteCollection(ctx context.Context, options *v1.Del } // Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.RoleBinding, err error) { +func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rbacv1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, pt, data, subresources...), &rbacv1.RoleBinding{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go index b50b1d8fd70..64c08912b0a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go @@ -38,14 +38,14 @@ type RolesGetter interface { // RoleInterface has methods to work with Role resources. type RoleInterface interface { - Create(context.Context, *v1.Role) (*v1.Role, error) - Update(context.Context, *v1.Role) (*v1.Role, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Role, error) + 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) + 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) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Role, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Role, err error) RoleExpansion } @@ -109,11 +109,12 @@ func (c *roles) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Inter } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Create(ctx context.Context, role *v1.Role) (result *v1.Role, err error) { +func (c *roles) Create(ctx context.Context, role *v1.Role, opts metav1.CreateOptions) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Post(). Namespace(c.ns). Resource("roles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *roles) Create(ctx context.Context, role *v1.Role) (result *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 *roles) Update(ctx context.Context, role *v1.Role) (result *v1.Role, err error) { +func (c *roles) Update(ctx context.Context, role *v1.Role, opts metav1.UpdateOptions) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Put(). Namespace(c.ns). Resource("roles"). Name(role.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *roles) DeleteCollection(ctx context.Context, options *metav1.DeleteOpti } // Patch applies the patch and returns the patched role. -func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Role, err error) { +func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Patch(pt). Namespace(c.ns). Resource("roles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go index 714069ffc57..70334e356c9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go @@ -38,14 +38,14 @@ type RoleBindingsGetter interface { // RoleBindingInterface has methods to work with RoleBinding resources. type RoleBindingInterface interface { - Create(context.Context, *v1.RoleBinding) (*v1.RoleBinding, error) - Update(context.Context, *v1.RoleBinding) (*v1.RoleBinding, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.RoleBinding, error) + 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) + 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) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.RoleBinding, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RoleBinding, err error) RoleBindingExpansion } @@ -109,11 +109,12 @@ func (c *roleBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watc } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Create(ctx context.Context, roleBinding *v1.RoleBinding) (result *v1.RoleBinding, err error) { +func (c *roleBindings) Create(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.CreateOptions) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Post(). Namespace(c.ns). Resource("rolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *roleBindings) Create(ctx context.Context, roleBinding *v1.RoleBinding) } // Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Update(ctx context.Context, roleBinding *v1.RoleBinding) (result *v1.RoleBinding, err error) { +func (c *roleBindings) Update(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.UpdateOptions) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Put(). Namespace(c.ns). Resource("rolebindings"). Name(roleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *roleBindings) DeleteCollection(ctx context.Context, options *metav1.Del } // Patch applies the patch and returns the patched roleBinding. -func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.RoleBinding, err error) { +func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("rolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go index a6a305524f5..9397cd8d427 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go @@ -38,14 +38,14 @@ type ClusterRolesGetter interface { // ClusterRoleInterface has methods to work with ClusterRole resources. type ClusterRoleInterface interface { - Create(context.Context, *v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error) - Update(context.Context, *v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.ClusterRole, error) + Create(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.CreateOptions) (*v1alpha1.ClusterRole, error) + Update(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.UpdateOptions) (*v1alpha1.ClusterRole, 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.ClusterRole, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterRoleList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRole, err error) ClusterRoleExpansion } @@ -104,10 +104,11 @@ func (c *clusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.CreateOptions) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Post(). Resource("clusterroles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1alpha1.Cluster } // Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.UpdateOptions) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Put(). Resource("clusterroles"). Name(clusterRole.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *clusterRoles) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched clusterRole. -func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Patch(pt). Resource("clusterroles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go index 0e87ee3175d..3d36d87b906 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go @@ -38,14 +38,14 @@ type ClusterRoleBindingsGetter interface { // ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources. type ClusterRoleBindingInterface interface { - Create(context.Context, *v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error) - Update(context.Context, *v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.ClusterRoleBinding, error) + Create(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.CreateOptions) (*v1alpha1.ClusterRoleBinding, error) + Update(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.UpdateOptions) (*v1alpha1.ClusterRoleBinding, 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.ClusterRoleBinding, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterRoleBindingList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } @@ -104,10 +104,11 @@ func (c *clusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Post(). Resource("clusterrolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1 } // Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Put(). Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Patch(pt). Resource("clusterrolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go index ec698872a95..966c601f3b2 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go @@ -77,7 +77,7 @@ func (c *FakeClusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watc } // 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 *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) { +func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.CreateOptions) (result *v1alpha1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &v1alpha1.ClusterRole{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *v1alpha1.Clu } // 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 *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) { +func (c *FakeClusterRoles) Update(ctx context.Context, clusterRole *v1alpha1.ClusterRole, opts v1.UpdateOptions) (result *v1alpha1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &v1alpha1.ClusterRole{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeClusterRoles) DeleteCollection(ctx context.Context, options *v1.Del } // Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { +func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, pt, data, subresources...), &v1alpha1.ClusterRole{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go index 65e0fe08b27..c1d43dcd888 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go @@ -77,7 +77,7 @@ func (c *FakeClusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions } // 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 *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &v1alpha1.ClusterRoleBinding{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding } // 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 *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1alpha1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1alpha1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &v1alpha1.ClusterRoleBinding{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeClusterRoleBindings) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, pt, data, subresources...), &v1alpha1.ClusterRoleBinding{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go index 76c2bb1dfb7..63579bbbb74 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go @@ -81,7 +81,7 @@ func (c *FakeRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } // 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 *v1alpha1.Role) (result *v1alpha1.Role, err error) { +func (c *FakeRoles) Create(ctx context.Context, role *v1alpha1.Role, opts v1.CreateOptions) (result *v1alpha1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &v1alpha1.Role{}) @@ -92,7 +92,7 @@ func (c *FakeRoles) Create(ctx context.Context, role *v1alpha1.Role) (result *v1 } // 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 *v1alpha1.Role) (result *v1alpha1.Role, err error) { +func (c *FakeRoles) Update(ctx context.Context, role *v1alpha1.Role, opts v1.UpdateOptions) (result *v1alpha1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &v1alpha1.Role{}) @@ -119,7 +119,7 @@ func (c *FakeRoles) DeleteCollection(ctx context.Context, options *v1.DeleteOpti } // Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { +func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, pt, data, subresources...), &v1alpha1.Role{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go index af5a93411dd..21bbb6c8dcb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go @@ -81,7 +81,7 @@ func (c *FakeRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watc } // 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 *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) { +func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.CreateOptions) (result *v1alpha1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &v1alpha1.RoleBinding{}) @@ -92,7 +92,7 @@ func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *v1alpha1.Rol } // 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 *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) { +func (c *FakeRoleBindings) Update(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.UpdateOptions) (result *v1alpha1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &v1alpha1.RoleBinding{}) @@ -119,7 +119,7 @@ func (c *FakeRoleBindings) DeleteCollection(ctx context.Context, options *v1.Del } // Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { +func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.RoleBinding{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go index 806ce3ca328..b2bd377961b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go @@ -38,14 +38,14 @@ type RolesGetter interface { // RoleInterface has methods to work with Role resources. type RoleInterface interface { - Create(context.Context, *v1alpha1.Role) (*v1alpha1.Role, error) - Update(context.Context, *v1alpha1.Role) (*v1alpha1.Role, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.Role, error) + Create(ctx context.Context, role *v1alpha1.Role, opts v1.CreateOptions) (*v1alpha1.Role, error) + Update(ctx context.Context, role *v1alpha1.Role, opts v1.UpdateOptions) (*v1alpha1.Role, 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.Role, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RoleList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Role, err error) RoleExpansion } @@ -109,11 +109,12 @@ func (c *roles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Create(ctx context.Context, role *v1alpha1.Role) (result *v1alpha1.Role, err error) { +func (c *roles) Create(ctx context.Context, role *v1alpha1.Role, opts v1.CreateOptions) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Post(). Namespace(c.ns). Resource("roles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *roles) Create(ctx context.Context, role *v1alpha1.Role) (result *v1alph } // Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Update(ctx context.Context, role *v1alpha1.Role) (result *v1alpha1.Role, err error) { +func (c *roles) Update(ctx context.Context, role *v1alpha1.Role, opts v1.UpdateOptions) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Put(). Namespace(c.ns). Resource("roles"). Name(role.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *roles) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, } // Patch applies the patch and returns the patched role. -func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { +func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Patch(pt). Namespace(c.ns). Resource("roles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go index fe40777a8d0..859515bf091 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go @@ -38,14 +38,14 @@ type RoleBindingsGetter interface { // RoleBindingInterface has methods to work with RoleBinding resources. type RoleBindingInterface interface { - Create(context.Context, *v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error) - Update(context.Context, *v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.RoleBinding, error) + Create(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.CreateOptions) (*v1alpha1.RoleBinding, error) + Update(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.UpdateOptions) (*v1alpha1.RoleBinding, 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.RoleBinding, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RoleBindingList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RoleBinding, err error) RoleBindingExpansion } @@ -109,11 +109,12 @@ func (c *roleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Create(ctx context.Context, roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Create(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.CreateOptions) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Post(). Namespace(c.ns). Resource("rolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *roleBindings) Create(ctx context.Context, roleBinding *v1alpha1.RoleBin } // Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Update(ctx context.Context, roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Update(ctx context.Context, roleBinding *v1alpha1.RoleBinding, opts v1.UpdateOptions) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Put(). Namespace(c.ns). Resource("rolebindings"). Name(roleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *roleBindings) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched roleBinding. -func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("rolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go index d118817484c..803b892e746 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go @@ -38,14 +38,14 @@ type ClusterRolesGetter interface { // ClusterRoleInterface has methods to work with ClusterRole resources. type ClusterRoleInterface interface { - Create(context.Context, *v1beta1.ClusterRole) (*v1beta1.ClusterRole, error) - Update(context.Context, *v1beta1.ClusterRole) (*v1beta1.ClusterRole, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.ClusterRole, error) + Create(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.CreateOptions) (*v1beta1.ClusterRole, error) + Update(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.UpdateOptions) (*v1beta1.ClusterRole, 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.ClusterRole, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ClusterRoleList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRole, err error) ClusterRoleExpansion } @@ -104,10 +104,11 @@ func (c *clusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { +func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.CreateOptions) (result *v1beta1.ClusterRole, err error) { result = &v1beta1.ClusterRole{} err = c.client.Post(). Resource("clusterroles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *clusterRoles) Create(ctx context.Context, clusterRole *v1beta1.ClusterR } // Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { +func (c *clusterRoles) Update(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.UpdateOptions) (result *v1beta1.ClusterRole, err error) { result = &v1beta1.ClusterRole{} err = c.client.Put(). Resource("clusterroles"). Name(clusterRole.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRole). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *clusterRoles) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched clusterRole. -func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) { +func (c *clusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRole, err error) { result = &v1beta1.ClusterRole{} err = c.client.Patch(pt). Resource("clusterroles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go index 29f17e7e9b7..81e07f33226 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go @@ -38,14 +38,14 @@ type ClusterRoleBindingsGetter interface { // ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources. type ClusterRoleBindingInterface interface { - Create(context.Context, *v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error) - Update(context.Context, *v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.ClusterRoleBinding, error) + Create(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.CreateOptions) (*v1beta1.ClusterRoleBinding, error) + Update(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.UpdateOptions) (*v1beta1.ClusterRoleBinding, 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.ClusterRoleBinding, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ClusterRoleBindingList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } @@ -104,10 +104,11 @@ func (c *clusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1beta1.ClusterRoleBinding, err error) { result = &v1beta1.ClusterRoleBinding{} err = c.client.Post(). Resource("clusterrolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *clusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1 } // Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1beta1.ClusterRoleBinding, err error) { result = &v1beta1.ClusterRoleBinding{} err = c.client.Put(). Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterRoleBinding). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *clusterRoleBindings) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { result = &v1beta1.ClusterRoleBinding{} err = c.client.Patch(pt). Resource("clusterrolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go index 2aa98ef990b..48d437cabaf 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go @@ -77,7 +77,7 @@ func (c *FakeClusterRoles) Watch(ctx context.Context, opts v1.ListOptions) (watc } // 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 *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { +func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.CreateOptions) (result *v1beta1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &v1beta1.ClusterRole{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeClusterRoles) Create(ctx context.Context, clusterRole *v1beta1.Clus } // 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 *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { +func (c *FakeClusterRoles) Update(ctx context.Context, clusterRole *v1beta1.ClusterRole, opts v1.UpdateOptions) (result *v1beta1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &v1beta1.ClusterRole{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeClusterRoles) DeleteCollection(ctx context.Context, options *v1.Del } // Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) { +func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, pt, data, subresources...), &v1beta1.ClusterRole{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go index 9fffbc3a96f..b20a6fa6cf7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go @@ -77,7 +77,7 @@ func (c *FakeClusterRoleBindings) Watch(ctx context.Context, opts v1.ListOptions } // 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 *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.CreateOptions) (result *v1beta1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &v1beta1.ClusterRoleBinding{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding } // 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 *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1beta1.ClusterRoleBinding, opts v1.UpdateOptions) (result *v1beta1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &v1beta1.ClusterRoleBinding{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeClusterRoleBindings) DeleteCollection(ctx context.Context, options } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, pt, data, subresources...), &v1beta1.ClusterRoleBinding{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go index a6952c228ff..eec0ef6f898 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go @@ -81,7 +81,7 @@ func (c *FakeRoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } // 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 *v1beta1.Role) (result *v1beta1.Role, err error) { +func (c *FakeRoles) Create(ctx context.Context, role *v1beta1.Role, opts v1.CreateOptions) (result *v1beta1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &v1beta1.Role{}) @@ -92,7 +92,7 @@ func (c *FakeRoles) Create(ctx context.Context, role *v1beta1.Role) (result *v1b } // 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 *v1beta1.Role) (result *v1beta1.Role, err error) { +func (c *FakeRoles) Update(ctx context.Context, role *v1beta1.Role, opts v1.UpdateOptions) (result *v1beta1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &v1beta1.Role{}) @@ -119,7 +119,7 @@ func (c *FakeRoles) DeleteCollection(ctx context.Context, options *v1.DeleteOpti } // Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) { +func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, pt, data, subresources...), &v1beta1.Role{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go index 5b43246dcfa..80f9638bcbd 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go @@ -81,7 +81,7 @@ func (c *FakeRoleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watc } // 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 *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { +func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.CreateOptions) (result *v1beta1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &v1beta1.RoleBinding{}) @@ -92,7 +92,7 @@ func (c *FakeRoleBindings) Create(ctx context.Context, roleBinding *v1beta1.Role } // 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 *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { +func (c *FakeRoleBindings) Update(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.UpdateOptions) (result *v1beta1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &v1beta1.RoleBinding{}) @@ -119,7 +119,7 @@ func (c *FakeRoleBindings) DeleteCollection(ctx context.Context, options *v1.Del } // Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) { +func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, pt, data, subresources...), &v1beta1.RoleBinding{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go index 7b23a0ea1b0..3a0233265ca 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go @@ -38,14 +38,14 @@ type RolesGetter interface { // RoleInterface has methods to work with Role resources. type RoleInterface interface { - Create(context.Context, *v1beta1.Role) (*v1beta1.Role, error) - Update(context.Context, *v1beta1.Role) (*v1beta1.Role, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.Role, error) + Create(ctx context.Context, role *v1beta1.Role, opts v1.CreateOptions) (*v1beta1.Role, error) + Update(ctx context.Context, role *v1beta1.Role, opts v1.UpdateOptions) (*v1beta1.Role, 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.Role, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.RoleList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Role, err error) RoleExpansion } @@ -109,11 +109,12 @@ func (c *roles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Create(ctx context.Context, role *v1beta1.Role) (result *v1beta1.Role, err error) { +func (c *roles) Create(ctx context.Context, role *v1beta1.Role, opts v1.CreateOptions) (result *v1beta1.Role, err error) { result = &v1beta1.Role{} err = c.client.Post(). Namespace(c.ns). Resource("roles"). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *roles) Create(ctx context.Context, role *v1beta1.Role) (result *v1beta1 } // Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. -func (c *roles) Update(ctx context.Context, role *v1beta1.Role) (result *v1beta1.Role, err error) { +func (c *roles) Update(ctx context.Context, role *v1beta1.Role, opts v1.UpdateOptions) (result *v1beta1.Role, err error) { result = &v1beta1.Role{} err = c.client.Put(). Namespace(c.ns). Resource("roles"). Name(role.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(role). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *roles) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, } // Patch applies the patch and returns the patched role. -func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) { +func (c *roles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Role, err error) { result = &v1beta1.Role{} err = c.client.Patch(pt). Namespace(c.ns). Resource("roles"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go index 92e7746fbc1..a0cb0763d7d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go @@ -38,14 +38,14 @@ type RoleBindingsGetter interface { // RoleBindingInterface has methods to work with RoleBinding resources. type RoleBindingInterface interface { - Create(context.Context, *v1beta1.RoleBinding) (*v1beta1.RoleBinding, error) - Update(context.Context, *v1beta1.RoleBinding) (*v1beta1.RoleBinding, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.RoleBinding, error) + Create(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.CreateOptions) (*v1beta1.RoleBinding, error) + Update(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.UpdateOptions) (*v1beta1.RoleBinding, 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.RoleBinding, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.RoleBindingList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RoleBinding, err error) RoleBindingExpansion } @@ -109,11 +109,12 @@ func (c *roleBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Create(ctx context.Context, roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { +func (c *roleBindings) Create(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.CreateOptions) (result *v1beta1.RoleBinding, err error) { result = &v1beta1.RoleBinding{} err = c.client.Post(). Namespace(c.ns). Resource("rolebindings"). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *roleBindings) Create(ctx context.Context, roleBinding *v1beta1.RoleBind } // Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *roleBindings) Update(ctx context.Context, roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { +func (c *roleBindings) Update(ctx context.Context, roleBinding *v1beta1.RoleBinding, opts v1.UpdateOptions) (result *v1beta1.RoleBinding, err error) { result = &v1beta1.RoleBinding{} err = c.client.Put(). Namespace(c.ns). Resource("rolebindings"). Name(roleBinding.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(roleBinding). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *roleBindings) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched roleBinding. -func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) { +func (c *roleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.RoleBinding, err error) { result = &v1beta1.RoleBinding{} err = c.client.Patch(pt). Namespace(c.ns). Resource("rolebindings"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go index f69280932ea..05c2d7ae66d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/fake/fake_priorityclass.go @@ -77,7 +77,7 @@ func (c *FakePriorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *schedulingv1.PriorityClass) (result *schedulingv1.PriorityClass, err error) { +func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *schedulingv1.PriorityClass, opts v1.CreateOptions) (result *schedulingv1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(priorityclassesResource, priorityClass), &schedulingv1.PriorityClass{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *schedul } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *schedulingv1.PriorityClass) (result *schedulingv1.PriorityClass, err error) { +func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *schedulingv1.PriorityClass, opts v1.UpdateOptions) (result *schedulingv1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(priorityclassesResource, priorityClass), &schedulingv1.PriorityClass{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakePriorityClasses) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched priorityClass. -func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *schedulingv1.PriorityClass, err error) { +func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *schedulingv1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, name, pt, data, subresources...), &schedulingv1.PriorityClass{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go index 34123303680..394adf44606 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go @@ -38,14 +38,14 @@ type PriorityClassesGetter interface { // PriorityClassInterface has methods to work with PriorityClass resources. type PriorityClassInterface interface { - Create(context.Context, *v1.PriorityClass) (*v1.PriorityClass, error) - Update(context.Context, *v1.PriorityClass) (*v1.PriorityClass, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.PriorityClass, error) + Create(ctx context.Context, priorityClass *v1.PriorityClass, opts metav1.CreateOptions) (*v1.PriorityClass, error) + Update(ctx context.Context, priorityClass *v1.PriorityClass, opts metav1.UpdateOptions) (*v1.PriorityClass, 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.PriorityClass, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.PriorityClassList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PriorityClass, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PriorityClass, err error) PriorityClassExpansion } @@ -104,10 +104,11 @@ func (c *priorityClasses) Watch(ctx context.Context, opts metav1.ListOptions) (w } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1.PriorityClass) (result *v1.PriorityClass, err error) { +func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1.PriorityClass, opts metav1.CreateOptions) (result *v1.PriorityClass, err error) { result = &v1.PriorityClass{} err = c.client.Post(). Resource("priorityclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1.Priority } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1.PriorityClass) (result *v1.PriorityClass, err error) { +func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1.PriorityClass, opts metav1.UpdateOptions) (result *v1.PriorityClass, err error) { result = &v1.PriorityClass{} err = c.client.Put(). Resource("priorityclasses"). Name(priorityClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *priorityClasses) DeleteCollection(ctx context.Context, options *metav1. } // Patch applies the patch and returns the patched priorityClass. -func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PriorityClass, err error) { +func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PriorityClass, err error) { result = &v1.PriorityClass{} err = c.client.Patch(pt). Resource("priorityclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go index e6001447a53..8b264e07acb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go @@ -77,7 +77,7 @@ func (c *FakePriorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *v1alpha1.PriorityClass) (result *v1alpha1.PriorityClass, err error) { +func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.CreateOptions) (result *v1alpha1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(priorityclassesResource, priorityClass), &v1alpha1.PriorityClass{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *v1alpha } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *v1alpha1.PriorityClass) (result *v1alpha1.PriorityClass, err error) { +func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.UpdateOptions) (result *v1alpha1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(priorityclassesResource, priorityClass), &v1alpha1.PriorityClass{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakePriorityClasses) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched priorityClass. -func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityClass, err error) { +func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, name, pt, data, subresources...), &v1alpha1.PriorityClass{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go index 529a19ff1a1..74a9b44ed5f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go @@ -38,14 +38,14 @@ type PriorityClassesGetter interface { // PriorityClassInterface has methods to work with PriorityClass resources. type PriorityClassInterface interface { - Create(context.Context, *v1alpha1.PriorityClass) (*v1alpha1.PriorityClass, error) - Update(context.Context, *v1alpha1.PriorityClass) (*v1alpha1.PriorityClass, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.PriorityClass, error) + Create(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.CreateOptions) (*v1alpha1.PriorityClass, error) + Update(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.UpdateOptions) (*v1alpha1.PriorityClass, 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.PriorityClass, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PriorityClassList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityClass, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityClass, err error) PriorityClassExpansion } @@ -104,10 +104,11 @@ func (c *priorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1alpha1.PriorityClass) (result *v1alpha1.PriorityClass, err error) { +func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.CreateOptions) (result *v1alpha1.PriorityClass, err error) { result = &v1alpha1.PriorityClass{} err = c.client.Post(). Resource("priorityclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1alpha1.Pr } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1alpha1.PriorityClass) (result *v1alpha1.PriorityClass, err error) { +func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1alpha1.PriorityClass, opts v1.UpdateOptions) (result *v1alpha1.PriorityClass, err error) { result = &v1alpha1.PriorityClass{} err = c.client.Put(). Resource("priorityclasses"). Name(priorityClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *priorityClasses) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched priorityClass. -func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PriorityClass, err error) { +func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityClass, err error) { result = &v1alpha1.PriorityClass{} err = c.client.Patch(pt). Resource("priorityclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go index f0c1d12ee1d..7381e634507 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go @@ -77,7 +77,7 @@ func (c *FakePriorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { +func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.CreateOptions) (result *v1beta1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(priorityclassesResource, priorityClass), &v1beta1.PriorityClass{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakePriorityClasses) Create(ctx context.Context, priorityClass *v1beta1 } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { +func (c *FakePriorityClasses) Update(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.UpdateOptions) (result *v1beta1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(priorityclassesResource, priorityClass), &v1beta1.PriorityClass{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakePriorityClasses) DeleteCollection(ctx context.Context, options *v1. } // Patch applies the patch and returns the patched priorityClass. -func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PriorityClass, err error) { +func (c *FakePriorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PriorityClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, name, pt, data, subresources...), &v1beta1.PriorityClass{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go index 7ace1a00a06..80db5299b84 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go @@ -38,14 +38,14 @@ type PriorityClassesGetter interface { // PriorityClassInterface has methods to work with PriorityClass resources. type PriorityClassInterface interface { - Create(context.Context, *v1beta1.PriorityClass) (*v1beta1.PriorityClass, error) - Update(context.Context, *v1beta1.PriorityClass) (*v1beta1.PriorityClass, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.PriorityClass, error) + Create(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.CreateOptions) (*v1beta1.PriorityClass, error) + Update(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.UpdateOptions) (*v1beta1.PriorityClass, 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.PriorityClass, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PriorityClassList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PriorityClass, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PriorityClass, err error) PriorityClassExpansion } @@ -104,10 +104,11 @@ func (c *priorityClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { +func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.CreateOptions) (result *v1beta1.PriorityClass, err error) { result = &v1beta1.PriorityClass{} err = c.client.Post(). Resource("priorityclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *priorityClasses) Create(ctx context.Context, priorityClass *v1beta1.Pri } // Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. -func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { +func (c *priorityClasses) Update(ctx context.Context, priorityClass *v1beta1.PriorityClass, opts v1.UpdateOptions) (result *v1beta1.PriorityClass, err error) { result = &v1beta1.PriorityClass{} err = c.client.Put(). Resource("priorityclasses"). Name(priorityClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(priorityClass). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *priorityClasses) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched priorityClass. -func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PriorityClass, err error) { +func (c *priorityClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PriorityClass, err error) { result = &v1beta1.PriorityClass{} err = c.client.Patch(pt). Resource("priorityclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go index 4dbdd9a0161..00dc34d2c32 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go @@ -81,7 +81,7 @@ func (c *FakePodPresets) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *FakePodPresets) Create(ctx context.Context, podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) { +func (c *FakePodPresets) Create(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.CreateOptions) (result *v1alpha1.PodPreset, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(podpresetsResource, c.ns, podPreset), &v1alpha1.PodPreset{}) @@ -92,7 +92,7 @@ func (c *FakePodPresets) Create(ctx context.Context, podPreset *v1alpha1.PodPres } // Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *FakePodPresets) Update(ctx context.Context, podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) { +func (c *FakePodPresets) Update(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.UpdateOptions) (result *v1alpha1.PodPreset, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(podpresetsResource, c.ns, podPreset), &v1alpha1.PodPreset{}) @@ -119,7 +119,7 @@ func (c *FakePodPresets) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched podPreset. -func (c *FakePodPresets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) { +func (c *FakePodPresets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodPreset, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(podpresetsResource, c.ns, name, pt, data, subresources...), &v1alpha1.PodPreset{}) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go index d3e43ea037f..01eaa9a82ca 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go @@ -38,14 +38,14 @@ type PodPresetsGetter interface { // PodPresetInterface has methods to work with PodPreset resources. type PodPresetInterface interface { - Create(context.Context, *v1alpha1.PodPreset) (*v1alpha1.PodPreset, error) - Update(context.Context, *v1alpha1.PodPreset) (*v1alpha1.PodPreset, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.PodPreset, error) + Create(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.CreateOptions) (*v1alpha1.PodPreset, error) + Update(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.UpdateOptions) (*v1alpha1.PodPreset, 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.PodPreset, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PodPresetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodPreset, err error) PodPresetExpansion } @@ -109,11 +109,12 @@ func (c *podPresets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } // Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *podPresets) Create(ctx context.Context, podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) { +func (c *podPresets) Create(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.CreateOptions) (result *v1alpha1.PodPreset, err error) { result = &v1alpha1.PodPreset{} err = c.client.Post(). Namespace(c.ns). Resource("podpresets"). + VersionedParams(&opts, scheme.ParameterCodec). Body(podPreset). Do(ctx). Into(result) @@ -121,12 +122,13 @@ func (c *podPresets) Create(ctx context.Context, podPreset *v1alpha1.PodPreset) } // Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any. -func (c *podPresets) Update(ctx context.Context, podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) { +func (c *podPresets) Update(ctx context.Context, podPreset *v1alpha1.PodPreset, opts v1.UpdateOptions) (result *v1alpha1.PodPreset, err error) { result = &v1alpha1.PodPreset{} err = c.client.Put(). Namespace(c.ns). Resource("podpresets"). Name(podPreset.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(podPreset). Do(ctx). Into(result) @@ -161,13 +163,14 @@ func (c *podPresets) DeleteCollection(ctx context.Context, options *v1.DeleteOpt } // Patch applies the patch and returns the patched podPreset. -func (c *podPresets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) { +func (c *podPresets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodPreset, err error) { result = &v1alpha1.PodPreset{} err = c.client.Patch(pt). Namespace(c.ns). Resource("podpresets"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go index b4e9b4a62e8..6ecde5933cb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go @@ -38,14 +38,14 @@ type CSINodesGetter interface { // CSINodeInterface has methods to work with CSINode resources. type CSINodeInterface interface { - Create(context.Context, *v1.CSINode) (*v1.CSINode, error) - Update(context.Context, *v1.CSINode) (*v1.CSINode, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.CSINode, error) + Create(ctx context.Context, cSINode *v1.CSINode, opts metav1.CreateOptions) (*v1.CSINode, error) + Update(ctx context.Context, cSINode *v1.CSINode, opts metav1.UpdateOptions) (*v1.CSINode, 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.CSINode, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.CSINodeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CSINode, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSINode, err error) CSINodeExpansion } @@ -104,10 +104,11 @@ func (c *cSINodes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In } // Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *cSINodes) Create(ctx context.Context, cSINode *v1.CSINode) (result *v1.CSINode, err error) { +func (c *cSINodes) Create(ctx context.Context, cSINode *v1.CSINode, opts metav1.CreateOptions) (result *v1.CSINode, err error) { result = &v1.CSINode{} err = c.client.Post(). Resource("csinodes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSINode). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *cSINodes) Create(ctx context.Context, cSINode *v1.CSINode) (result *v1. } // Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *cSINodes) Update(ctx context.Context, cSINode *v1.CSINode) (result *v1.CSINode, err error) { +func (c *cSINodes) Update(ctx context.Context, cSINode *v1.CSINode, opts metav1.UpdateOptions) (result *v1.CSINode, err error) { result = &v1.CSINode{} err = c.client.Put(). Resource("csinodes"). Name(cSINode.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSINode). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *cSINodes) DeleteCollection(ctx context.Context, options *metav1.DeleteO } // Patch applies the patch and returns the patched cSINode. -func (c *cSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CSINode, err error) { +func (c *cSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSINode, err error) { result = &v1.CSINode{} err = c.client.Patch(pt). Resource("csinodes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go index 283a9628fb1..94452160de8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csinode.go @@ -77,7 +77,7 @@ func (c *FakeCSINodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *FakeCSINodes) Create(ctx context.Context, cSINode *storagev1.CSINode) (result *storagev1.CSINode, err error) { +func (c *FakeCSINodes) Create(ctx context.Context, cSINode *storagev1.CSINode, opts v1.CreateOptions) (result *storagev1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(csinodesResource, cSINode), &storagev1.CSINode{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeCSINodes) Create(ctx context.Context, cSINode *storagev1.CSINode) ( } // Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *FakeCSINodes) Update(ctx context.Context, cSINode *storagev1.CSINode) (result *storagev1.CSINode, err error) { +func (c *FakeCSINodes) Update(ctx context.Context, cSINode *storagev1.CSINode, opts v1.UpdateOptions) (result *storagev1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(csinodesResource, cSINode), &storagev1.CSINode{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeCSINodes) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched cSINode. -func (c *FakeCSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *storagev1.CSINode, err error) { +func (c *FakeCSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(csinodesResource, name, pt, data, subresources...), &storagev1.CSINode{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go index 0c47a2dd784..2d5d1f2c76c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go @@ -77,7 +77,7 @@ func (c *FakeStorageClasses) Watch(ctx context.Context, opts v1.ListOptions) (wa } // Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Create(ctx context.Context, storageClass *storagev1.StorageClass) (result *storagev1.StorageClass, err error) { +func (c *FakeStorageClasses) Create(ctx context.Context, storageClass *storagev1.StorageClass, opts v1.CreateOptions) (result *storagev1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &storagev1.StorageClass{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeStorageClasses) Create(ctx context.Context, storageClass *storagev1 } // Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Update(ctx context.Context, storageClass *storagev1.StorageClass) (result *storagev1.StorageClass, err error) { +func (c *FakeStorageClasses) Update(ctx context.Context, storageClass *storagev1.StorageClass, opts v1.UpdateOptions) (result *storagev1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &storagev1.StorageClass{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeStorageClasses) DeleteCollection(ctx context.Context, options *v1.D } // Patch applies the patch and returns the patched storageClass. -func (c *FakeStorageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *storagev1.StorageClass, err error) { +func (c *FakeStorageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, pt, data, subresources...), &storagev1.StorageClass{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go index 7ddd5893c2a..479bf6ff8c5 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_volumeattachment.go @@ -77,7 +77,7 @@ func (c *FakeVolumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment) (result *storagev1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment, opts v1.CreateOptions) (result *storagev1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(volumeattachmentsResource, volumeAttachment), &storagev1.VolumeAttachment{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *st } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment) (result *storagev1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment, opts v1.UpdateOptions) (result *storagev1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(volumeattachmentsResource, volumeAttachment), &storagev1.VolumeAttachment{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *st // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment) (*storagev1.VolumeAttachment, error) { +func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *storagev1.VolumeAttachment, opts v1.UpdateOptions) (*storagev1.VolumeAttachment, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(volumeattachmentsResource, "status", volumeAttachment), &storagev1.VolumeAttachment{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakeVolumeAttachments) DeleteCollection(ctx context.Context, options *v } // Patch applies the patch and returns the patched volumeAttachment. -func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *storagev1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, name, pt, data, subresources...), &storagev1.VolumeAttachment{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go index 1815804b6be..b23725cce9c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go @@ -38,14 +38,14 @@ type StorageClassesGetter interface { // StorageClassInterface has methods to work with StorageClass resources. type StorageClassInterface interface { - Create(context.Context, *v1.StorageClass) (*v1.StorageClass, error) - Update(context.Context, *v1.StorageClass) (*v1.StorageClass, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.StorageClass, error) + Create(ctx context.Context, storageClass *v1.StorageClass, opts metav1.CreateOptions) (*v1.StorageClass, error) + Update(ctx context.Context, storageClass *v1.StorageClass, opts metav1.UpdateOptions) (*v1.StorageClass, 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.StorageClass, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.StorageClassList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StorageClass, err error) StorageClassExpansion } @@ -104,10 +104,11 @@ func (c *storageClasses) Watch(ctx context.Context, opts metav1.ListOptions) (wa } // Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *storageClasses) Create(ctx context.Context, storageClass *v1.StorageClass) (result *v1.StorageClass, err error) { +func (c *storageClasses) Create(ctx context.Context, storageClass *v1.StorageClass, opts metav1.CreateOptions) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Post(). Resource("storageclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(storageClass). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *storageClasses) Create(ctx context.Context, storageClass *v1.StorageCla } // Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *storageClasses) Update(ctx context.Context, storageClass *v1.StorageClass) (result *v1.StorageClass, err error) { +func (c *storageClasses) Update(ctx context.Context, storageClass *v1.StorageClass, opts metav1.UpdateOptions) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Put(). Resource("storageclasses"). Name(storageClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(storageClass). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *storageClasses) DeleteCollection(ctx context.Context, options *metav1.D } // Patch applies the patch and returns the patched storageClass. -func (c *storageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) { +func (c *storageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Patch(pt). Resource("storageclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go index 40a91b81f9e..1a466070e9e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go @@ -38,15 +38,15 @@ type VolumeAttachmentsGetter interface { // VolumeAttachmentInterface has methods to work with VolumeAttachment resources. type VolumeAttachmentInterface interface { - Create(context.Context, *v1.VolumeAttachment) (*v1.VolumeAttachment, error) - Update(context.Context, *v1.VolumeAttachment) (*v1.VolumeAttachment, error) - UpdateStatus(context.Context, *v1.VolumeAttachment) (*v1.VolumeAttachment, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.VolumeAttachment, error) + Create(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.CreateOptions) (*v1.VolumeAttachment, error) + Update(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (*v1.VolumeAttachment, error) + UpdateStatus(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (*v1.VolumeAttachment, 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.VolumeAttachment, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.VolumeAttachmentList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VolumeAttachment, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeAttachment, err error) VolumeAttachmentExpansion } @@ -105,10 +105,11 @@ func (c *volumeAttachments) Watch(ctx context.Context, opts metav1.ListOptions) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1.VolumeAttachment) (result *v1.VolumeAttachment, err error) { +func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.CreateOptions) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Post(). Resource("volumeattachments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1.Vol } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1.VolumeAttachment) (result *v1.VolumeAttachment, err error) { +func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1.Vol // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1.VolumeAttachment) (result *v1.VolumeAttachment, err error) { +func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *volumeAttachments) DeleteCollection(ctx context.Context, options *metav } // Patch applies the patch and returns the patched volumeAttachment. -func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VolumeAttachment, err error) { +func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeAttachment, err error) { result = &v1.VolumeAttachment{} err = c.client.Patch(pt). Resource("volumeattachments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go index 8f00a8a81f2..96cbf0259fd 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go @@ -77,7 +77,7 @@ func (c *FakeVolumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.CreateOptions) (result *v1alpha1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(volumeattachmentsResource, volumeAttachment), &v1alpha1.VolumeAttachment{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *v1 } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (result *v1alpha1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(volumeattachmentsResource, volumeAttachment), &v1alpha1.VolumeAttachment{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *v1 // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment) (*v1alpha1.VolumeAttachment, error) { +func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (*v1alpha1.VolumeAttachment, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(volumeattachmentsResource, "status", volumeAttachment), &v1alpha1.VolumeAttachment{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakeVolumeAttachments) DeleteCollection(ctx context.Context, options *v } // Patch applies the patch and returns the patched volumeAttachment. -func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, name, pt, data, subresources...), &v1alpha1.VolumeAttachment{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go index d7a0e8051fb..4ecc7eb21c4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go @@ -38,15 +38,15 @@ type VolumeAttachmentsGetter interface { // VolumeAttachmentInterface has methods to work with VolumeAttachment resources. type VolumeAttachmentInterface interface { - Create(context.Context, *v1alpha1.VolumeAttachment) (*v1alpha1.VolumeAttachment, error) - Update(context.Context, *v1alpha1.VolumeAttachment) (*v1alpha1.VolumeAttachment, error) - UpdateStatus(context.Context, *v1alpha1.VolumeAttachment) (*v1alpha1.VolumeAttachment, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.VolumeAttachment, error) + Create(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.CreateOptions) (*v1alpha1.VolumeAttachment, error) + Update(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (*v1alpha1.VolumeAttachment, error) + UpdateStatus(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (*v1alpha1.VolumeAttachment, 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.VolumeAttachment, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeAttachmentList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) VolumeAttachmentExpansion } @@ -105,10 +105,11 @@ func (c *volumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (wat } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) { +func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.CreateOptions) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Post(). Resource("volumeattachments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1alph } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) { +func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1alph // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment) (result *v1alpha1.VolumeAttachment, err error) { +func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1alpha1.VolumeAttachment, opts v1.UpdateOptions) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *volumeAttachments) DeleteCollection(ctx context.Context, options *v1.De } // Patch applies the patch and returns the patched volumeAttachment. -func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) { +func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VolumeAttachment, err error) { result = &v1alpha1.VolumeAttachment{} err = c.client.Patch(pt). Resource("volumeattachments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go index 1ec1e142eb5..0420bf9b26e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go @@ -38,14 +38,14 @@ type CSIDriversGetter interface { // CSIDriverInterface has methods to work with CSIDriver resources. type CSIDriverInterface interface { - Create(context.Context, *v1beta1.CSIDriver) (*v1beta1.CSIDriver, error) - Update(context.Context, *v1beta1.CSIDriver) (*v1beta1.CSIDriver, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.CSIDriver, error) + Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.CreateOptions) (*v1beta1.CSIDriver, error) + Update(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.UpdateOptions) (*v1beta1.CSIDriver, 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.CSIDriver, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CSIDriverList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSIDriver, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSIDriver, err error) CSIDriverExpansion } @@ -104,10 +104,11 @@ func (c *cSIDrivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inte } // Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *cSIDrivers) Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) { +func (c *cSIDrivers) Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.CreateOptions) (result *v1beta1.CSIDriver, err error) { result = &v1beta1.CSIDriver{} err = c.client.Post(). Resource("csidrivers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSIDriver). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *cSIDrivers) Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver) ( } // Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *cSIDrivers) Update(ctx context.Context, cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) { +func (c *cSIDrivers) Update(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.UpdateOptions) (result *v1beta1.CSIDriver, err error) { result = &v1beta1.CSIDriver{} err = c.client.Put(). Resource("csidrivers"). Name(cSIDriver.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSIDriver). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *cSIDrivers) DeleteCollection(ctx context.Context, options *v1.DeleteOpt } // Patch applies the patch and returns the patched cSIDriver. -func (c *cSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSIDriver, err error) { +func (c *cSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSIDriver, err error) { result = &v1beta1.CSIDriver{} err = c.client.Patch(pt). Resource("csidrivers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go index a2b5e4167ed..7f737017535 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go @@ -38,14 +38,14 @@ type CSINodesGetter interface { // CSINodeInterface has methods to work with CSINode resources. type CSINodeInterface interface { - Create(context.Context, *v1beta1.CSINode) (*v1beta1.CSINode, error) - Update(context.Context, *v1beta1.CSINode) (*v1beta1.CSINode, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.CSINode, error) + Create(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.CreateOptions) (*v1beta1.CSINode, error) + Update(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.UpdateOptions) (*v1beta1.CSINode, 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.CSINode, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CSINodeList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSINode, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSINode, err error) CSINodeExpansion } @@ -104,10 +104,11 @@ func (c *cSINodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } // Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *cSINodes) Create(ctx context.Context, cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) { +func (c *cSINodes) Create(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.CreateOptions) (result *v1beta1.CSINode, err error) { result = &v1beta1.CSINode{} err = c.client.Post(). Resource("csinodes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSINode). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *cSINodes) Create(ctx context.Context, cSINode *v1beta1.CSINode) (result } // Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *cSINodes) Update(ctx context.Context, cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) { +func (c *cSINodes) Update(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.UpdateOptions) (result *v1beta1.CSINode, err error) { result = &v1beta1.CSINode{} err = c.client.Put(). Resource("csinodes"). Name(cSINode.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(cSINode). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *cSINodes) DeleteCollection(ctx context.Context, options *v1.DeleteOptio } // Patch applies the patch and returns the patched cSINode. -func (c *cSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSINode, err error) { +func (c *cSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSINode, err error) { result = &v1beta1.CSINode{} err = c.client.Patch(pt). Resource("csinodes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go index d1d8a798119..7fe60c7304c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csidriver.go @@ -77,7 +77,7 @@ func (c *FakeCSIDrivers) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *FakeCSIDrivers) Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) { +func (c *FakeCSIDrivers) Create(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.CreateOptions) (result *v1beta1.CSIDriver, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(csidriversResource, cSIDriver), &v1beta1.CSIDriver{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeCSIDrivers) Create(ctx context.Context, cSIDriver *v1beta1.CSIDrive } // Update takes the representation of a cSIDriver and updates it. Returns the server's representation of the cSIDriver, and an error, if there is any. -func (c *FakeCSIDrivers) Update(ctx context.Context, cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDriver, err error) { +func (c *FakeCSIDrivers) Update(ctx context.Context, cSIDriver *v1beta1.CSIDriver, opts v1.UpdateOptions) (result *v1beta1.CSIDriver, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(csidriversResource, cSIDriver), &v1beta1.CSIDriver{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeCSIDrivers) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched cSIDriver. -func (c *FakeCSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSIDriver, err error) { +func (c *FakeCSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSIDriver, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(csidriversResource, name, pt, data, subresources...), &v1beta1.CSIDriver{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go index 3463d86a0f7..af22e22f9d5 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go @@ -77,7 +77,7 @@ func (c *FakeCSINodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *FakeCSINodes) Create(ctx context.Context, cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) { +func (c *FakeCSINodes) Create(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.CreateOptions) (result *v1beta1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(csinodesResource, cSINode), &v1beta1.CSINode{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeCSINodes) Create(ctx context.Context, cSINode *v1beta1.CSINode) (re } // Update takes the representation of a cSINode and updates it. Returns the server's representation of the cSINode, and an error, if there is any. -func (c *FakeCSINodes) Update(ctx context.Context, cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) { +func (c *FakeCSINodes) Update(ctx context.Context, cSINode *v1beta1.CSINode, opts v1.UpdateOptions) (result *v1beta1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(csinodesResource, cSINode), &v1beta1.CSINode{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeCSINodes) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched cSINode. -func (c *FakeCSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CSINode, err error) { +func (c *FakeCSINodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(csinodesResource, name, pt, data, subresources...), &v1beta1.CSINode{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go index 80b10bc7e78..8d53f8240dc 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go @@ -77,7 +77,7 @@ func (c *FakeStorageClasses) Watch(ctx context.Context, opts v1.ListOptions) (wa } // Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Create(ctx context.Context, storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { +func (c *FakeStorageClasses) Create(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.CreateOptions) (result *v1beta1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeStorageClasses) Create(ctx context.Context, storageClass *v1beta1.S } // Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Update(ctx context.Context, storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { +func (c *FakeStorageClasses) Update(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.UpdateOptions) (result *v1beta1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeStorageClasses) DeleteCollection(ctx context.Context, options *v1.D } // Patch applies the patch and returns the patched storageClass. -func (c *FakeStorageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { +func (c *FakeStorageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, pt, data, subresources...), &v1beta1.StorageClass{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go index d7f6ad8af05..30061b0619b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go @@ -77,7 +77,7 @@ func (c *FakeVolumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.CreateOptions) (result *v1beta1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(volumeattachmentsResource, volumeAttachment), &v1beta1.VolumeAttachment{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeVolumeAttachments) Create(ctx context.Context, volumeAttachment *v1 } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (result *v1beta1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(volumeattachmentsResource, volumeAttachment), &v1beta1.VolumeAttachment{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeVolumeAttachments) Update(ctx context.Context, volumeAttachment *v1 // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment) (*v1beta1.VolumeAttachment, error) { +func (c *FakeVolumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (*v1beta1.VolumeAttachment, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(volumeattachmentsResource, "status", volumeAttachment), &v1beta1.VolumeAttachment{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakeVolumeAttachments) DeleteCollection(ctx context.Context, options *v } // Patch applies the patch and returns the patched volumeAttachment. -func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeAttachment, err error) { +func (c *FakeVolumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeAttachment, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(volumeattachmentsResource, name, pt, data, subresources...), &v1beta1.VolumeAttachment{}) if obj == nil { diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go index 8c713d3115e..553d40f6840 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go @@ -38,14 +38,14 @@ type StorageClassesGetter interface { // StorageClassInterface has methods to work with StorageClass resources. type StorageClassInterface interface { - Create(context.Context, *v1beta1.StorageClass) (*v1beta1.StorageClass, error) - Update(context.Context, *v1beta1.StorageClass) (*v1beta1.StorageClass, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.StorageClass, error) + Create(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.CreateOptions) (*v1beta1.StorageClass, error) + Update(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.UpdateOptions) (*v1beta1.StorageClass, 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.StorageClass, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.StorageClassList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StorageClass, err error) StorageClassExpansion } @@ -104,10 +104,11 @@ func (c *storageClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch. } // Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *storageClasses) Create(ctx context.Context, storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Create(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.CreateOptions) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Post(). Resource("storageclasses"). + VersionedParams(&opts, scheme.ParameterCodec). Body(storageClass). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *storageClasses) Create(ctx context.Context, storageClass *v1beta1.Stora } // Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *storageClasses) Update(ctx context.Context, storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Update(ctx context.Context, storageClass *v1beta1.StorageClass, opts v1.UpdateOptions) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Put(). Resource("storageclasses"). Name(storageClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(storageClass). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *storageClasses) DeleteCollection(ctx context.Context, options *v1.Delet } // Patch applies the patch and returns the patched storageClass. -func (c *storageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Patch(pt). Resource("storageclasses"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go index 31d481f5a68..f9eb953845c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go @@ -38,15 +38,15 @@ type VolumeAttachmentsGetter interface { // VolumeAttachmentInterface has methods to work with VolumeAttachment resources. type VolumeAttachmentInterface interface { - Create(context.Context, *v1beta1.VolumeAttachment) (*v1beta1.VolumeAttachment, error) - Update(context.Context, *v1beta1.VolumeAttachment) (*v1beta1.VolumeAttachment, error) - UpdateStatus(context.Context, *v1beta1.VolumeAttachment) (*v1beta1.VolumeAttachment, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.VolumeAttachment, error) + Create(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.CreateOptions) (*v1beta1.VolumeAttachment, error) + Update(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (*v1beta1.VolumeAttachment, error) + UpdateStatus(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (*v1beta1.VolumeAttachment, 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.VolumeAttachment, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VolumeAttachmentList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeAttachment, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeAttachment, err error) VolumeAttachmentExpansion } @@ -105,10 +105,11 @@ func (c *volumeAttachments) Watch(ctx context.Context, opts v1.ListOptions) (wat } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) { +func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.CreateOptions) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Post(). Resource("volumeattachments"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *volumeAttachments) Create(ctx context.Context, volumeAttachment *v1beta } // Update takes the representation of a volumeAttachment and updates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. -func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) { +func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *volumeAttachments) Update(ctx context.Context, volumeAttachment *v1beta // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment) (result *v1beta1.VolumeAttachment, err error) { +func (c *volumeAttachments) UpdateStatus(ctx context.Context, volumeAttachment *v1beta1.VolumeAttachment, opts v1.UpdateOptions) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Put(). Resource("volumeattachments"). Name(volumeAttachment.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(volumeAttachment). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *volumeAttachments) DeleteCollection(ctx context.Context, options *v1.De } // Patch applies the patch and returns the patched volumeAttachment. -func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeAttachment, err error) { +func (c *volumeAttachments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VolumeAttachment, err error) { result = &v1beta1.VolumeAttachment{} err = c.client.Patch(pt). Resource("volumeattachments"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go index 3aebe542dc8..defcd8d37ca 100644 --- a/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go @@ -39,17 +39,17 @@ type ClusterTestTypesGetter interface { // ClusterTestTypeInterface has methods to work with ClusterTestType resources. type ClusterTestTypeInterface interface { - Create(context.Context, *v1.ClusterTestType) (*v1.ClusterTestType, error) - Update(context.Context, *v1.ClusterTestType) (*v1.ClusterTestType, error) - UpdateStatus(context.Context, *v1.ClusterTestType) (*v1.ClusterTestType, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ClusterTestType, error) + Create(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.CreateOptions) (*v1.ClusterTestType, error) + Update(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (*v1.ClusterTestType, error) + UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (*v1.ClusterTestType, 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.ClusterTestType, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterTestTypeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterTestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterTestType, err error) GetScale(ctx context.Context, clusterTestTypeName string, options metav1.GetOptions) (*autoscaling.Scale, error) - UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale) (*autoscaling.Scale, error) + UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale, opts metav1.UpdateOptions) (*autoscaling.Scale, error) ClusterTestTypeExpansion } @@ -109,10 +109,11 @@ func (c *clusterTestTypes) Watch(ctx context.Context, opts metav1.ListOptions) ( } // Create takes the representation of a clusterTestType and creates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.CreateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Post(). Resource("clustertesttypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). Do(ctx). Into(result) @@ -120,11 +121,12 @@ func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.Clust } // Update takes the representation of a clusterTestType and updates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). Resource("clustertesttypes"). Name(clusterTestType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). Do(ctx). Into(result) @@ -133,13 +135,13 @@ func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.Clust // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). Resource("clustertesttypes"). Name(clusterTestType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). Do(ctx). Into(result) @@ -172,12 +174,13 @@ func (c *clusterTestTypes) DeleteCollection(ctx context.Context, options *metav1 } // Patch applies the patch and returns the patched clusterTestType. -func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Patch(pt). Resource("clustertesttypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -198,12 +201,13 @@ func (c *clusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName str } // UpdateScale takes the top resource name and 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 *clusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { +func (c *clusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale, opts metav1.UpdateOptions) (result *autoscaling.Scale, err error) { result = &autoscaling.Scale{} err = c.client.Put(). Resource("clustertesttypes"). Name(clusterTestTypeName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go b/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go index 0d4cf547d86..f703e11cb27 100644 --- a/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go +++ b/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go @@ -78,7 +78,7 @@ func (c *FakeClusterTestTypes) Watch(ctx context.Context, opts v1.ListOptions) ( } // Create takes the representation of a clusterTestType and creates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *FakeClusterTestTypes) Create(ctx context.Context, clusterTestType *examplev1.ClusterTestType) (result *examplev1.ClusterTestType, err error) { +func (c *FakeClusterTestTypes) Create(ctx context.Context, clusterTestType *examplev1.ClusterTestType, opts v1.CreateOptions) (result *examplev1.ClusterTestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clustertesttypesResource, clusterTestType), &examplev1.ClusterTestType{}) if obj == nil { @@ -88,7 +88,7 @@ func (c *FakeClusterTestTypes) Create(ctx context.Context, clusterTestType *exam } // Update takes the representation of a clusterTestType and updates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *FakeClusterTestTypes) Update(ctx context.Context, clusterTestType *examplev1.ClusterTestType) (result *examplev1.ClusterTestType, err error) { +func (c *FakeClusterTestTypes) Update(ctx context.Context, clusterTestType *examplev1.ClusterTestType, opts v1.UpdateOptions) (result *examplev1.ClusterTestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clustertesttypesResource, clusterTestType), &examplev1.ClusterTestType{}) if obj == nil { @@ -99,7 +99,7 @@ func (c *FakeClusterTestTypes) Update(ctx context.Context, clusterTestType *exam // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *examplev1.ClusterTestType) (*examplev1.ClusterTestType, error) { +func (c *FakeClusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *examplev1.ClusterTestType, opts v1.UpdateOptions) (*examplev1.ClusterTestType, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(clustertesttypesResource, "status", clusterTestType), &examplev1.ClusterTestType{}) if obj == nil { @@ -124,7 +124,7 @@ func (c *FakeClusterTestTypes) DeleteCollection(ctx context.Context, options *v1 } // Patch applies the patch and returns the patched clusterTestType. -func (c *FakeClusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *examplev1.ClusterTestType, err error) { +func (c *FakeClusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *examplev1.ClusterTestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clustertesttypesResource, name, pt, data, subresources...), &examplev1.ClusterTestType{}) if obj == nil { @@ -144,7 +144,7 @@ func (c *FakeClusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName } // 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 *FakeClusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { +func (c *FakeClusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale, opts v1.UpdateOptions) (result *autoscaling.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(clustertesttypesResource, "scale", scale), &autoscaling.Scale{}) if obj == nil { diff --git a/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/fake/fake_testtype.go b/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/fake/fake_testtype.go index ea8e388aa00..b669a795f53 100644 --- a/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/fake/fake_testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/fake/fake_testtype.go @@ -81,7 +81,7 @@ func (c *FakeTestTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType, opts v1.CreateOptions) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) @@ -92,7 +92,7 @@ func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType, opts v1.UpdateOptions) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) @@ -104,7 +104,7 @@ func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *examplev1.TestType) (*examplev1.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *examplev1.TestType, opts v1.UpdateOptions) (*examplev1.TestType, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &examplev1.TestType{}) @@ -131,7 +131,7 @@ func (c *FakeTestTypes) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, pt, data, subresources...), &examplev1.TestType{}) diff --git a/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go index c2c04954de7..69a7bc1868d 100644 --- a/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go @@ -38,15 +38,15 @@ type TestTypesGetter interface { // TestTypeInterface has methods to work with TestType resources. type TestTypeInterface interface { - Create(context.Context, *v1.TestType) (*v1.TestType, error) - Update(context.Context, *v1.TestType) (*v1.TestType, error) - UpdateStatus(context.Context, *v1.TestType) (*v1.TestType, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.TestType, error) + Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (*v1.TestType, error) + Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, error) + UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, 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.TestType, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.TestTypeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) TestTypeExpansion } @@ -110,11 +110,12 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). Namespace(c.ns). Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result * } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result * // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *testTypes) DeleteCollection(ctx context.Context, options *metav1.Delete } // Patch applies the patch and returns the patched testType. -func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) { +func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). Namespace(c.ns). Resource("testtypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go index c19df6695e5..f8ca73b0a20 100644 --- a/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go @@ -39,17 +39,17 @@ type ClusterTestTypesGetter interface { // ClusterTestTypeInterface has methods to work with ClusterTestType resources. type ClusterTestTypeInterface interface { - Create(context.Context, *v1.ClusterTestType) (*v1.ClusterTestType, error) - Update(context.Context, *v1.ClusterTestType) (*v1.ClusterTestType, error) - UpdateStatus(context.Context, *v1.ClusterTestType) (*v1.ClusterTestType, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ClusterTestType, error) + Create(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.CreateOptions) (*v1.ClusterTestType, error) + Update(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (*v1.ClusterTestType, error) + UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (*v1.ClusterTestType, 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.ClusterTestType, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterTestTypeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterTestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterTestType, err error) GetScale(ctx context.Context, clusterTestTypeName string, options metav1.GetOptions) (*autoscaling.Scale, error) - UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale) (*autoscaling.Scale, error) + UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale, opts metav1.UpdateOptions) (*autoscaling.Scale, error) ClusterTestTypeExpansion } @@ -109,10 +109,11 @@ func (c *clusterTestTypes) Watch(ctx context.Context, opts metav1.ListOptions) ( } // Create takes the representation of a clusterTestType and creates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.CreateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Post(). Resource("clustertesttypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). Do(ctx). Into(result) @@ -120,11 +121,12 @@ func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.Clust } // Update takes the representation of a clusterTestType and updates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). Resource("clustertesttypes"). Name(clusterTestType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). Do(ctx). Into(result) @@ -133,13 +135,13 @@ func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.Clust // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). Resource("clustertesttypes"). Name(clusterTestType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). Do(ctx). Into(result) @@ -172,12 +174,13 @@ func (c *clusterTestTypes) DeleteCollection(ctx context.Context, options *metav1 } // Patch applies the patch and returns the patched clusterTestType. -func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Patch(pt). Resource("clustertesttypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -198,12 +201,13 @@ func (c *clusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName str } // UpdateScale takes the top resource name and 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 *clusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { +func (c *clusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale, opts metav1.UpdateOptions) (result *autoscaling.Scale, err error) { result = &autoscaling.Scale{} err = c.client.Put(). Resource("clustertesttypes"). Name(clusterTestTypeName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go b/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go index d3816474a6a..d10eafe60f3 100644 --- a/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go +++ b/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go @@ -78,7 +78,7 @@ func (c *FakeClusterTestTypes) Watch(ctx context.Context, opts v1.ListOptions) ( } // Create takes the representation of a clusterTestType and creates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *FakeClusterTestTypes) Create(ctx context.Context, clusterTestType *examplev1.ClusterTestType) (result *examplev1.ClusterTestType, err error) { +func (c *FakeClusterTestTypes) Create(ctx context.Context, clusterTestType *examplev1.ClusterTestType, opts v1.CreateOptions) (result *examplev1.ClusterTestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clustertesttypesResource, clusterTestType), &examplev1.ClusterTestType{}) if obj == nil { @@ -88,7 +88,7 @@ func (c *FakeClusterTestTypes) Create(ctx context.Context, clusterTestType *exam } // Update takes the representation of a clusterTestType and updates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *FakeClusterTestTypes) Update(ctx context.Context, clusterTestType *examplev1.ClusterTestType) (result *examplev1.ClusterTestType, err error) { +func (c *FakeClusterTestTypes) Update(ctx context.Context, clusterTestType *examplev1.ClusterTestType, opts v1.UpdateOptions) (result *examplev1.ClusterTestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clustertesttypesResource, clusterTestType), &examplev1.ClusterTestType{}) if obj == nil { @@ -99,7 +99,7 @@ func (c *FakeClusterTestTypes) Update(ctx context.Context, clusterTestType *exam // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *examplev1.ClusterTestType) (*examplev1.ClusterTestType, error) { +func (c *FakeClusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *examplev1.ClusterTestType, opts v1.UpdateOptions) (*examplev1.ClusterTestType, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(clustertesttypesResource, "status", clusterTestType), &examplev1.ClusterTestType{}) if obj == nil { @@ -124,7 +124,7 @@ func (c *FakeClusterTestTypes) DeleteCollection(ctx context.Context, options *v1 } // Patch applies the patch and returns the patched clusterTestType. -func (c *FakeClusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *examplev1.ClusterTestType, err error) { +func (c *FakeClusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *examplev1.ClusterTestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clustertesttypesResource, name, pt, data, subresources...), &examplev1.ClusterTestType{}) if obj == nil { @@ -144,7 +144,7 @@ func (c *FakeClusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName } // 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 *FakeClusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { +func (c *FakeClusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale, opts v1.UpdateOptions) (result *autoscaling.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(clustertesttypesResource, "scale", scale), &autoscaling.Scale{}) if obj == nil { diff --git a/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/fake/fake_testtype.go b/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/fake/fake_testtype.go index df5045fa10c..6346ee204e1 100644 --- a/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/fake/fake_testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/fake/fake_testtype.go @@ -81,7 +81,7 @@ func (c *FakeTestTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType, opts v1.CreateOptions) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) @@ -92,7 +92,7 @@ func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType, opts v1.UpdateOptions) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) @@ -104,7 +104,7 @@ func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *examplev1.TestType) (*examplev1.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *examplev1.TestType, opts v1.UpdateOptions) (*examplev1.TestType, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &examplev1.TestType{}) @@ -131,7 +131,7 @@ func (c *FakeTestTypes) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, pt, data, subresources...), &examplev1.TestType{}) diff --git a/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go index 81be57c0449..530a45e974f 100644 --- a/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go @@ -38,15 +38,15 @@ type TestTypesGetter interface { // TestTypeInterface has methods to work with TestType resources. type TestTypeInterface interface { - Create(context.Context, *v1.TestType) (*v1.TestType, error) - Update(context.Context, *v1.TestType) (*v1.TestType, error) - UpdateStatus(context.Context, *v1.TestType) (*v1.TestType, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.TestType, error) + Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (*v1.TestType, error) + Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, error) + UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, 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.TestType, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.TestTypeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) TestTypeExpansion } @@ -110,11 +110,12 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). Namespace(c.ns). Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result * } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result * // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *testTypes) DeleteCollection(ctx context.Context, options *metav1.Delete } // Patch applies the patch and returns the patched testType. -func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) { +func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). Namespace(c.ns). Resource("testtypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go index 2a8f095ea13..86c652af574 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go @@ -81,7 +81,7 @@ func (c *FakeTestTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(ctx context.Context, testType *example.TestType) (result *example.TestType, err error) { +func (c *FakeTestTypes) Create(ctx context.Context, testType *example.TestType, opts v1.CreateOptions) (result *example.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example.TestType{}) @@ -92,7 +92,7 @@ func (c *FakeTestTypes) Create(ctx context.Context, testType *example.TestType) } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(ctx context.Context, testType *example.TestType) (result *example.TestType, err error) { +func (c *FakeTestTypes) Update(ctx context.Context, testType *example.TestType, opts v1.UpdateOptions) (result *example.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example.TestType{}) @@ -104,7 +104,7 @@ func (c *FakeTestTypes) Update(ctx context.Context, testType *example.TestType) // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example.TestType) (*example.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example.TestType, opts v1.UpdateOptions) (*example.TestType, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example.TestType{}) @@ -131,7 +131,7 @@ func (c *FakeTestTypes) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example.TestType, err error) { +func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, pt, data, subresources...), &example.TestType{}) diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go index 424fc4656a5..3c4bf279eb9 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go @@ -38,15 +38,15 @@ type TestTypesGetter interface { // TestTypeInterface has methods to work with TestType resources. type TestTypeInterface interface { - Create(context.Context, *example.TestType) (*example.TestType, error) - Update(context.Context, *example.TestType) (*example.TestType, error) - UpdateStatus(context.Context, *example.TestType) (*example.TestType, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*example.TestType, error) + Create(ctx context.Context, testType *example.TestType, opts v1.CreateOptions) (*example.TestType, error) + Update(ctx context.Context, testType *example.TestType, opts v1.UpdateOptions) (*example.TestType, error) + UpdateStatus(ctx context.Context, testType *example.TestType, opts v1.UpdateOptions) (*example.TestType, 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) (*example.TestType, error) List(ctx context.Context, opts v1.ListOptions) (*example.TestTypeList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example.TestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example.TestType, err error) TestTypeExpansion } @@ -110,11 +110,12 @@ func (c *testTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Create(ctx context.Context, testType *example.TestType) (result *example.TestType, err error) { +func (c *testTypes) Create(ctx context.Context, testType *example.TestType, opts v1.CreateOptions) (result *example.TestType, err error) { result = &example.TestType{} err = c.client.Post(). Namespace(c.ns). Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *testTypes) Create(ctx context.Context, testType *example.TestType) (res } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Update(ctx context.Context, testType *example.TestType) (result *example.TestType, err error) { +func (c *testTypes) Update(ctx context.Context, testType *example.TestType, opts v1.UpdateOptions) (result *example.TestType, err error) { result = &example.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *testTypes) Update(ctx context.Context, testType *example.TestType) (res // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *testTypes) UpdateStatus(ctx context.Context, testType *example.TestType) (result *example.TestType, err error) { +func (c *testTypes) UpdateStatus(ctx context.Context, testType *example.TestType, opts v1.UpdateOptions) (result *example.TestType, err error) { result = &example.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *testTypes) DeleteCollection(ctx context.Context, options *v1.DeleteOpti } // Patch applies the patch and returns the patched testType. -func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example.TestType, err error) { +func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example.TestType, err error) { result = &example.TestType{} err = c.client.Patch(pt). Namespace(c.ns). Resource("testtypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go index 566a831e1e3..7595b6478a9 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go @@ -77,7 +77,7 @@ func (c *FakeTestTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(ctx context.Context, testType *example2.TestType) (result *example2.TestType, err error) { +func (c *FakeTestTypes) Create(ctx context.Context, testType *example2.TestType, opts v1.CreateOptions) (result *example2.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(testtypesResource, testType), &example2.TestType{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeTestTypes) Create(ctx context.Context, testType *example2.TestType) } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(ctx context.Context, testType *example2.TestType) (result *example2.TestType, err error) { +func (c *FakeTestTypes) Update(ctx context.Context, testType *example2.TestType, opts v1.UpdateOptions) (result *example2.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(testtypesResource, testType), &example2.TestType{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeTestTypes) Update(ctx context.Context, testType *example2.TestType) // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example2.TestType) (*example2.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example2.TestType, opts v1.UpdateOptions) (*example2.TestType, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(testtypesResource, "status", testType), &example2.TestType{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakeTestTypes) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example2.TestType, err error) { +func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example2.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(testtypesResource, name, pt, data, subresources...), &example2.TestType{}) if obj == nil { diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go index e9f8c444417..f29f593db2c 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go @@ -38,15 +38,15 @@ type TestTypesGetter interface { // TestTypeInterface has methods to work with TestType resources. type TestTypeInterface interface { - Create(context.Context, *example2.TestType) (*example2.TestType, error) - Update(context.Context, *example2.TestType) (*example2.TestType, error) - UpdateStatus(context.Context, *example2.TestType) (*example2.TestType, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*example2.TestType, error) + Create(ctx context.Context, testType *example2.TestType, opts v1.CreateOptions) (*example2.TestType, error) + Update(ctx context.Context, testType *example2.TestType, opts v1.UpdateOptions) (*example2.TestType, error) + UpdateStatus(ctx context.Context, testType *example2.TestType, opts v1.UpdateOptions) (*example2.TestType, 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) (*example2.TestType, error) List(ctx context.Context, opts v1.ListOptions) (*example2.TestTypeList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example2.TestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example2.TestType, err error) TestTypeExpansion } @@ -105,10 +105,11 @@ func (c *testTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Create(ctx context.Context, testType *example2.TestType) (result *example2.TestType, err error) { +func (c *testTypes) Create(ctx context.Context, testType *example2.TestType, opts v1.CreateOptions) (result *example2.TestType, err error) { result = &example2.TestType{} err = c.client.Post(). Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *testTypes) Create(ctx context.Context, testType *example2.TestType) (re } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Update(ctx context.Context, testType *example2.TestType) (result *example2.TestType, err error) { +func (c *testTypes) Update(ctx context.Context, testType *example2.TestType, opts v1.UpdateOptions) (result *example2.TestType, err error) { result = &example2.TestType{} err = c.client.Put(). Resource("testtypes"). Name(testType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *testTypes) Update(ctx context.Context, testType *example2.TestType) (re // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *testTypes) UpdateStatus(ctx context.Context, testType *example2.TestType) (result *example2.TestType, err error) { +func (c *testTypes) UpdateStatus(ctx context.Context, testType *example2.TestType, opts v1.UpdateOptions) (result *example2.TestType, err error) { result = &example2.TestType{} err = c.client.Put(). Resource("testtypes"). Name(testType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *testTypes) DeleteCollection(ctx context.Context, options *v1.DeleteOpti } // Patch applies the patch and returns the patched testType. -func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example2.TestType, err error) { +func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example2.TestType, err error) { result = &example2.TestType{} err = c.client.Patch(pt). Resource("testtypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/fake/fake_testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/fake/fake_testtype.go index 50725f7ec52..a26b42d1e53 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/fake/fake_testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/fake/fake_testtype.go @@ -81,7 +81,7 @@ func (c *FakeTestTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(ctx context.Context, testType *example3io.TestType) (result *example3io.TestType, err error) { +func (c *FakeTestTypes) Create(ctx context.Context, testType *example3io.TestType, opts v1.CreateOptions) (result *example3io.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example3io.TestType{}) @@ -92,7 +92,7 @@ func (c *FakeTestTypes) Create(ctx context.Context, testType *example3io.TestTyp } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(ctx context.Context, testType *example3io.TestType) (result *example3io.TestType, err error) { +func (c *FakeTestTypes) Update(ctx context.Context, testType *example3io.TestType, opts v1.UpdateOptions) (result *example3io.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example3io.TestType{}) @@ -104,7 +104,7 @@ func (c *FakeTestTypes) Update(ctx context.Context, testType *example3io.TestTyp // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example3io.TestType) (*example3io.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example3io.TestType, opts v1.UpdateOptions) (*example3io.TestType, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example3io.TestType{}) @@ -131,7 +131,7 @@ func (c *FakeTestTypes) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example3io.TestType, err error) { +func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example3io.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, pt, data, subresources...), &example3io.TestType{}) diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go index eb886168054..d2e51d5e2cd 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example3.io/internalversion/testtype.go @@ -38,15 +38,15 @@ type TestTypesGetter interface { // TestTypeInterface has methods to work with TestType resources. type TestTypeInterface interface { - Create(context.Context, *example3io.TestType) (*example3io.TestType, error) - Update(context.Context, *example3io.TestType) (*example3io.TestType, error) - UpdateStatus(context.Context, *example3io.TestType) (*example3io.TestType, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*example3io.TestType, error) + Create(ctx context.Context, testType *example3io.TestType, opts v1.CreateOptions) (*example3io.TestType, error) + Update(ctx context.Context, testType *example3io.TestType, opts v1.UpdateOptions) (*example3io.TestType, error) + UpdateStatus(ctx context.Context, testType *example3io.TestType, opts v1.UpdateOptions) (*example3io.TestType, 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) (*example3io.TestType, error) List(ctx context.Context, opts v1.ListOptions) (*example3io.TestTypeList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example3io.TestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example3io.TestType, err error) TestTypeExpansion } @@ -110,11 +110,12 @@ func (c *testTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Inter } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Create(ctx context.Context, testType *example3io.TestType) (result *example3io.TestType, err error) { +func (c *testTypes) Create(ctx context.Context, testType *example3io.TestType, opts v1.CreateOptions) (result *example3io.TestType, err error) { result = &example3io.TestType{} err = c.client.Post(). Namespace(c.ns). Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *testTypes) Create(ctx context.Context, testType *example3io.TestType) ( } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Update(ctx context.Context, testType *example3io.TestType) (result *example3io.TestType, err error) { +func (c *testTypes) Update(ctx context.Context, testType *example3io.TestType, opts v1.UpdateOptions) (result *example3io.TestType, err error) { result = &example3io.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *testTypes) Update(ctx context.Context, testType *example3io.TestType) ( // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *testTypes) UpdateStatus(ctx context.Context, testType *example3io.TestType) (result *example3io.TestType, err error) { +func (c *testTypes) UpdateStatus(ctx context.Context, testType *example3io.TestType, opts v1.UpdateOptions) (result *example3io.TestType, err error) { result = &example3io.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *testTypes) DeleteCollection(ctx context.Context, options *v1.DeleteOpti } // Patch applies the patch and returns the patched testType. -func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example3io.TestType, err error) { +func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example3io.TestType, err error) { result = &example3io.TestType{} err = c.client.Patch(pt). Namespace(c.ns). Resource("testtypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go index 5f8cc72c780..d3ef16e5a90 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go @@ -81,7 +81,7 @@ func (c *FakeTestTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType, opts v1.CreateOptions) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) @@ -92,7 +92,7 @@ func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType, opts v1.UpdateOptions) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) @@ -104,7 +104,7 @@ func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *examplev1.TestType) (*examplev1.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *examplev1.TestType, opts v1.UpdateOptions) (*examplev1.TestType, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &examplev1.TestType{}) @@ -131,7 +131,7 @@ func (c *FakeTestTypes) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, pt, data, subresources...), &examplev1.TestType{}) diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go index 670432b5514..2d42149182f 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go @@ -38,15 +38,15 @@ type TestTypesGetter interface { // TestTypeInterface has methods to work with TestType resources. type TestTypeInterface interface { - Create(context.Context, *v1.TestType) (*v1.TestType, error) - Update(context.Context, *v1.TestType) (*v1.TestType, error) - UpdateStatus(context.Context, *v1.TestType) (*v1.TestType, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.TestType, error) + Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (*v1.TestType, error) + Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, error) + UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, 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.TestType, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.TestTypeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) TestTypeExpansion } @@ -110,11 +110,12 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). Namespace(c.ns). Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result * } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result * // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *testTypes) DeleteCollection(ctx context.Context, options *metav1.Delete } // Patch applies the patch and returns the patched testType. -func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) { +func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). Namespace(c.ns). Resource("testtypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go index 95d8f5a6aad..7d64e588697 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go @@ -81,7 +81,7 @@ func (c *FakeTestTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(ctx context.Context, testType *example2v1.TestType) (result *example2v1.TestType, err error) { +func (c *FakeTestTypes) Create(ctx context.Context, testType *example2v1.TestType, opts v1.CreateOptions) (result *example2v1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example2v1.TestType{}) @@ -92,7 +92,7 @@ func (c *FakeTestTypes) Create(ctx context.Context, testType *example2v1.TestTyp } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(ctx context.Context, testType *example2v1.TestType) (result *example2v1.TestType, err error) { +func (c *FakeTestTypes) Update(ctx context.Context, testType *example2v1.TestType, opts v1.UpdateOptions) (result *example2v1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example2v1.TestType{}) @@ -104,7 +104,7 @@ func (c *FakeTestTypes) Update(ctx context.Context, testType *example2v1.TestTyp // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example2v1.TestType) (*example2v1.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example2v1.TestType, opts v1.UpdateOptions) (*example2v1.TestType, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example2v1.TestType{}) @@ -131,7 +131,7 @@ func (c *FakeTestTypes) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example2v1.TestType, err error) { +func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example2v1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, pt, data, subresources...), &example2v1.TestType{}) diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go index 99722d307f4..ea5650dbbe1 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go @@ -38,15 +38,15 @@ type TestTypesGetter interface { // TestTypeInterface has methods to work with TestType resources. type TestTypeInterface interface { - Create(context.Context, *v1.TestType) (*v1.TestType, error) - Update(context.Context, *v1.TestType) (*v1.TestType, error) - UpdateStatus(context.Context, *v1.TestType) (*v1.TestType, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.TestType, error) + Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (*v1.TestType, error) + Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, error) + UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, 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.TestType, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.TestTypeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) TestTypeExpansion } @@ -110,11 +110,12 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). Namespace(c.ns). Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result * } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result * // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *testTypes) DeleteCollection(ctx context.Context, options *metav1.Delete } // Patch applies the patch and returns the patched testType. -func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) { +func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). Namespace(c.ns). Resource("testtypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example3.io/v1/fake/fake_testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example3.io/v1/fake/fake_testtype.go index 6b02fabf592..18689dbd2b2 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example3.io/v1/fake/fake_testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example3.io/v1/fake/fake_testtype.go @@ -81,7 +81,7 @@ func (c *FakeTestTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(ctx context.Context, testType *example3iov1.TestType) (result *example3iov1.TestType, err error) { +func (c *FakeTestTypes) Create(ctx context.Context, testType *example3iov1.TestType, opts v1.CreateOptions) (result *example3iov1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example3iov1.TestType{}) @@ -92,7 +92,7 @@ func (c *FakeTestTypes) Create(ctx context.Context, testType *example3iov1.TestT } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(ctx context.Context, testType *example3iov1.TestType) (result *example3iov1.TestType, err error) { +func (c *FakeTestTypes) Update(ctx context.Context, testType *example3iov1.TestType, opts v1.UpdateOptions) (result *example3iov1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example3iov1.TestType{}) @@ -104,7 +104,7 @@ func (c *FakeTestTypes) Update(ctx context.Context, testType *example3iov1.TestT // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example3iov1.TestType) (*example3iov1.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example3iov1.TestType, opts v1.UpdateOptions) (*example3iov1.TestType, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example3iov1.TestType{}) @@ -131,7 +131,7 @@ func (c *FakeTestTypes) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example3iov1.TestType, err error) { +func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example3iov1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, pt, data, subresources...), &example3iov1.TestType{}) diff --git a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go index 794825c35f9..9ac449a514b 100644 --- a/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go @@ -38,15 +38,15 @@ type TestTypesGetter interface { // TestTypeInterface has methods to work with TestType resources. type TestTypeInterface interface { - Create(context.Context, *v1.TestType) (*v1.TestType, error) - Update(context.Context, *v1.TestType) (*v1.TestType, error) - UpdateStatus(context.Context, *v1.TestType) (*v1.TestType, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.TestType, error) + Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (*v1.TestType, error) + Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, error) + UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, 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.TestType, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.TestTypeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) TestTypeExpansion } @@ -110,11 +110,12 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). Namespace(c.ns). Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result * } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result * // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *testTypes) DeleteCollection(ctx context.Context, options *metav1.Delete } // Patch applies the patch and returns the patched testType. -func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) { +func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). Namespace(c.ns). Resource("testtypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go index 43ef4755e39..1fe6bfd99c4 100644 --- a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go @@ -39,17 +39,17 @@ type ClusterTestTypesGetter interface { // ClusterTestTypeInterface has methods to work with ClusterTestType resources. type ClusterTestTypeInterface interface { - Create(context.Context, *v1.ClusterTestType) (*v1.ClusterTestType, error) - Update(context.Context, *v1.ClusterTestType) (*v1.ClusterTestType, error) - UpdateStatus(context.Context, *v1.ClusterTestType) (*v1.ClusterTestType, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ClusterTestType, error) + Create(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.CreateOptions) (*v1.ClusterTestType, error) + Update(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (*v1.ClusterTestType, error) + UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (*v1.ClusterTestType, 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.ClusterTestType, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterTestTypeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterTestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterTestType, err error) GetScale(ctx context.Context, clusterTestTypeName string, options metav1.GetOptions) (*autoscaling.Scale, error) - UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale) (*autoscaling.Scale, error) + UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale, opts metav1.UpdateOptions) (*autoscaling.Scale, error) ClusterTestTypeExpansion } @@ -109,10 +109,11 @@ func (c *clusterTestTypes) Watch(ctx context.Context, opts metav1.ListOptions) ( } // Create takes the representation of a clusterTestType and creates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.CreateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Post(). Resource("clustertesttypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). Do(ctx). Into(result) @@ -120,11 +121,12 @@ func (c *clusterTestTypes) Create(ctx context.Context, clusterTestType *v1.Clust } // Update takes the representation of a clusterTestType and updates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). Resource("clustertesttypes"). Name(clusterTestType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). Do(ctx). Into(result) @@ -133,13 +135,13 @@ func (c *clusterTestTypes) Update(ctx context.Context, clusterTestType *v1.Clust // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *v1.ClusterTestType, opts metav1.UpdateOptions) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Put(). Resource("clustertesttypes"). Name(clusterTestType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(clusterTestType). Do(ctx). Into(result) @@ -172,12 +174,13 @@ func (c *clusterTestTypes) DeleteCollection(ctx context.Context, options *metav1 } // Patch applies the patch and returns the patched clusterTestType. -func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterTestType, err error) { +func (c *clusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterTestType, err error) { result = &v1.ClusterTestType{} err = c.client.Patch(pt). Resource("clustertesttypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) @@ -198,12 +201,13 @@ func (c *clusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName str } // UpdateScale takes the top resource name and 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 *clusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { +func (c *clusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale, opts metav1.UpdateOptions) (result *autoscaling.Scale, err error) { result = &autoscaling.Scale{} err = c.client.Put(). Resource("clustertesttypes"). Name(clusterTestTypeName). SubResource("scale"). + VersionedParams(&opts, scheme.ParameterCodec). Body(scale). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go index d15c5c1654c..5d01606ee2b 100644 --- a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go +++ b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go @@ -78,7 +78,7 @@ func (c *FakeClusterTestTypes) Watch(ctx context.Context, opts v1.ListOptions) ( } // Create takes the representation of a clusterTestType and creates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *FakeClusterTestTypes) Create(ctx context.Context, clusterTestType *examplev1.ClusterTestType) (result *examplev1.ClusterTestType, err error) { +func (c *FakeClusterTestTypes) Create(ctx context.Context, clusterTestType *examplev1.ClusterTestType, opts v1.CreateOptions) (result *examplev1.ClusterTestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(clustertesttypesResource, clusterTestType), &examplev1.ClusterTestType{}) if obj == nil { @@ -88,7 +88,7 @@ func (c *FakeClusterTestTypes) Create(ctx context.Context, clusterTestType *exam } // Update takes the representation of a clusterTestType and updates it. Returns the server's representation of the clusterTestType, and an error, if there is any. -func (c *FakeClusterTestTypes) Update(ctx context.Context, clusterTestType *examplev1.ClusterTestType) (result *examplev1.ClusterTestType, err error) { +func (c *FakeClusterTestTypes) Update(ctx context.Context, clusterTestType *examplev1.ClusterTestType, opts v1.UpdateOptions) (result *examplev1.ClusterTestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(clustertesttypesResource, clusterTestType), &examplev1.ClusterTestType{}) if obj == nil { @@ -99,7 +99,7 @@ func (c *FakeClusterTestTypes) Update(ctx context.Context, clusterTestType *exam // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *examplev1.ClusterTestType) (*examplev1.ClusterTestType, error) { +func (c *FakeClusterTestTypes) UpdateStatus(ctx context.Context, clusterTestType *examplev1.ClusterTestType, opts v1.UpdateOptions) (*examplev1.ClusterTestType, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(clustertesttypesResource, "status", clusterTestType), &examplev1.ClusterTestType{}) if obj == nil { @@ -124,7 +124,7 @@ func (c *FakeClusterTestTypes) DeleteCollection(ctx context.Context, options *v1 } // Patch applies the patch and returns the patched clusterTestType. -func (c *FakeClusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *examplev1.ClusterTestType, err error) { +func (c *FakeClusterTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *examplev1.ClusterTestType, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clustertesttypesResource, name, pt, data, subresources...), &examplev1.ClusterTestType{}) if obj == nil { @@ -144,7 +144,7 @@ func (c *FakeClusterTestTypes) GetScale(ctx context.Context, clusterTestTypeName } // 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 *FakeClusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { +func (c *FakeClusterTestTypes) UpdateScale(ctx context.Context, clusterTestTypeName string, scale *autoscaling.Scale, opts v1.UpdateOptions) (result *autoscaling.Scale, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(clustertesttypesResource, "scale", scale), &autoscaling.Scale{}) if obj == nil { diff --git a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go index a3dbc0640b1..dfbc8caf564 100644 --- a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go @@ -81,7 +81,7 @@ func (c *FakeTestTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType, opts v1.CreateOptions) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) @@ -92,7 +92,7 @@ func (c *FakeTestTypes) Create(ctx context.Context, testType *examplev1.TestType } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType, opts v1.UpdateOptions) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) @@ -104,7 +104,7 @@ func (c *FakeTestTypes) Update(ctx context.Context, testType *examplev1.TestType // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *examplev1.TestType) (*examplev1.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *examplev1.TestType, opts v1.UpdateOptions) (*examplev1.TestType, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &examplev1.TestType{}) @@ -131,7 +131,7 @@ func (c *FakeTestTypes) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *examplev1.TestType, err error) { +func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *examplev1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, pt, data, subresources...), &examplev1.TestType{}) diff --git a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go index 3023b2162c6..779dd5767d7 100644 --- a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go @@ -38,15 +38,15 @@ type TestTypesGetter interface { // TestTypeInterface has methods to work with TestType resources. type TestTypeInterface interface { - Create(context.Context, *v1.TestType) (*v1.TestType, error) - Update(context.Context, *v1.TestType) (*v1.TestType, error) - UpdateStatus(context.Context, *v1.TestType) (*v1.TestType, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.TestType, error) + Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (*v1.TestType, error) + Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, error) + UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, 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.TestType, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.TestTypeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) TestTypeExpansion } @@ -110,11 +110,12 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). Namespace(c.ns). Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result * } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result * // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *testTypes) DeleteCollection(ctx context.Context, options *metav1.Delete } // Patch applies the patch and returns the patched testType. -func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) { +func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). Namespace(c.ns). Resource("testtypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go index 096ea06aaf2..ea843c6bfda 100644 --- a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go @@ -81,7 +81,7 @@ func (c *FakeTestTypes) Watch(ctx context.Context, opts v1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(ctx context.Context, testType *example2v1.TestType) (result *example2v1.TestType, err error) { +func (c *FakeTestTypes) Create(ctx context.Context, testType *example2v1.TestType, opts v1.CreateOptions) (result *example2v1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example2v1.TestType{}) @@ -92,7 +92,7 @@ func (c *FakeTestTypes) Create(ctx context.Context, testType *example2v1.TestTyp } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(ctx context.Context, testType *example2v1.TestType) (result *example2v1.TestType, err error) { +func (c *FakeTestTypes) Update(ctx context.Context, testType *example2v1.TestType, opts v1.UpdateOptions) (result *example2v1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example2v1.TestType{}) @@ -104,7 +104,7 @@ func (c *FakeTestTypes) Update(ctx context.Context, testType *example2v1.TestTyp // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example2v1.TestType) (*example2v1.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(ctx context.Context, testType *example2v1.TestType, opts v1.UpdateOptions) (*example2v1.TestType, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example2v1.TestType{}) @@ -131,7 +131,7 @@ func (c *FakeTestTypes) DeleteCollection(ctx context.Context, options *v1.Delete } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *example2v1.TestType, err error) { +func (c *FakeTestTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *example2v1.TestType, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, pt, data, subresources...), &example2v1.TestType{}) diff --git a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go index 1327f720e1f..3f5af5f97ce 100644 --- a/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go @@ -38,15 +38,15 @@ type TestTypesGetter interface { // TestTypeInterface has methods to work with TestType resources. type TestTypeInterface interface { - Create(context.Context, *v1.TestType) (*v1.TestType, error) - Update(context.Context, *v1.TestType) (*v1.TestType, error) - UpdateStatus(context.Context, *v1.TestType) (*v1.TestType, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.TestType, error) + Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (*v1.TestType, error) + Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, error) + UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (*v1.TestType, 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.TestType, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.TestTypeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) TestTypeExpansion } @@ -110,11 +110,12 @@ func (c *testTypes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Create(ctx context.Context, testType *v1.TestType, opts metav1.CreateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Post(). Namespace(c.ns). Resource("testtypes"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *testTypes) Create(ctx context.Context, testType *v1.TestType) (result * } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) Update(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *testTypes) Update(ctx context.Context, testType *v1.TestType) (result * // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType) (result *v1.TestType, err error) { +func (c *testTypes) UpdateStatus(ctx context.Context, testType *v1.TestType, opts metav1.UpdateOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Put(). Namespace(c.ns). Resource("testtypes"). Name(testType.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(testType). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *testTypes) DeleteCollection(ctx context.Context, options *metav1.Delete } // Patch applies the patch and returns the patched testType. -func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) { +func (c *testTypes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Patch(pt). Namespace(c.ns). Resource("testtypes"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go index 24867b37456..dfaaee3ed0e 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go @@ -38,15 +38,15 @@ type APIServicesGetter interface { // APIServiceInterface has methods to work with APIService resources. type APIServiceInterface interface { - Create(context.Context, *v1.APIService) (*v1.APIService, error) - Update(context.Context, *v1.APIService) (*v1.APIService, error) - UpdateStatus(context.Context, *v1.APIService) (*v1.APIService, error) - Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error - Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.APIService, error) + Create(ctx context.Context, aPIService *v1.APIService, opts metav1.CreateOptions) (*v1.APIService, error) + Update(ctx context.Context, aPIService *v1.APIService, opts metav1.UpdateOptions) (*v1.APIService, error) + UpdateStatus(ctx context.Context, aPIService *v1.APIService, opts metav1.UpdateOptions) (*v1.APIService, 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.APIService, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.APIServiceList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.APIService, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.APIService, err error) APIServiceExpansion } @@ -105,10 +105,11 @@ func (c *aPIServices) Watch(ctx context.Context, opts metav1.ListOptions) (watch } // Create takes the representation of a aPIService and creates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *aPIServices) Create(ctx context.Context, aPIService *v1.APIService) (result *v1.APIService, err error) { +func (c *aPIServices) Create(ctx context.Context, aPIService *v1.APIService, opts metav1.CreateOptions) (result *v1.APIService, err error) { result = &v1.APIService{} err = c.client.Post(). Resource("apiservices"). + VersionedParams(&opts, scheme.ParameterCodec). Body(aPIService). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *aPIServices) Create(ctx context.Context, aPIService *v1.APIService) (re } // Update takes the representation of a aPIService and updates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *aPIServices) Update(ctx context.Context, aPIService *v1.APIService) (result *v1.APIService, err error) { +func (c *aPIServices) Update(ctx context.Context, aPIService *v1.APIService, opts metav1.UpdateOptions) (result *v1.APIService, err error) { result = &v1.APIService{} err = c.client.Put(). Resource("apiservices"). Name(aPIService.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(aPIService). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *aPIServices) Update(ctx context.Context, aPIService *v1.APIService) (re // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *aPIServices) UpdateStatus(ctx context.Context, aPIService *v1.APIService) (result *v1.APIService, err error) { +func (c *aPIServices) UpdateStatus(ctx context.Context, aPIService *v1.APIService, opts metav1.UpdateOptions) (result *v1.APIService, err error) { result = &v1.APIService{} err = c.client.Put(). Resource("apiservices"). Name(aPIService.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(aPIService). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *aPIServices) DeleteCollection(ctx context.Context, options *metav1.Dele } // Patch applies the patch and returns the patched aPIService. -func (c *aPIServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.APIService, err error) { +func (c *aPIServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.APIService, err error) { result = &v1.APIService{} err = c.client.Patch(pt). Resource("apiservices"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/fake/fake_apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/fake/fake_apiservice.go index 8c80481809e..4d5001c6ccc 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/fake/fake_apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/fake/fake_apiservice.go @@ -77,7 +77,7 @@ func (c *FakeAPIServices) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a aPIService and creates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *FakeAPIServices) Create(ctx context.Context, aPIService *apiregistrationv1.APIService) (result *apiregistrationv1.APIService, err error) { +func (c *FakeAPIServices) Create(ctx context.Context, aPIService *apiregistrationv1.APIService, opts v1.CreateOptions) (result *apiregistrationv1.APIService, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(apiservicesResource, aPIService), &apiregistrationv1.APIService{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeAPIServices) Create(ctx context.Context, aPIService *apiregistratio } // Update takes the representation of a aPIService and updates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *FakeAPIServices) Update(ctx context.Context, aPIService *apiregistrationv1.APIService) (result *apiregistrationv1.APIService, err error) { +func (c *FakeAPIServices) Update(ctx context.Context, aPIService *apiregistrationv1.APIService, opts v1.UpdateOptions) (result *apiregistrationv1.APIService, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(apiservicesResource, aPIService), &apiregistrationv1.APIService{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeAPIServices) Update(ctx context.Context, aPIService *apiregistratio // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAPIServices) UpdateStatus(ctx context.Context, aPIService *apiregistrationv1.APIService) (*apiregistrationv1.APIService, error) { +func (c *FakeAPIServices) UpdateStatus(ctx context.Context, aPIService *apiregistrationv1.APIService, opts v1.UpdateOptions) (*apiregistrationv1.APIService, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(apiservicesResource, "status", aPIService), &apiregistrationv1.APIService{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakeAPIServices) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched aPIService. -func (c *FakeAPIServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *apiregistrationv1.APIService, err error) { +func (c *FakeAPIServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apiregistrationv1.APIService, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(apiservicesResource, name, pt, data, subresources...), &apiregistrationv1.APIService{}) if obj == nil { diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go index a4c2967ae81..b39d9b2dc01 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go @@ -38,15 +38,15 @@ type APIServicesGetter interface { // APIServiceInterface has methods to work with APIService resources. type APIServiceInterface interface { - Create(context.Context, *v1beta1.APIService) (*v1beta1.APIService, error) - Update(context.Context, *v1beta1.APIService) (*v1beta1.APIService, error) - UpdateStatus(context.Context, *v1beta1.APIService) (*v1beta1.APIService, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.APIService, error) + Create(ctx context.Context, aPIService *v1beta1.APIService, opts v1.CreateOptions) (*v1beta1.APIService, error) + Update(ctx context.Context, aPIService *v1beta1.APIService, opts v1.UpdateOptions) (*v1beta1.APIService, error) + UpdateStatus(ctx context.Context, aPIService *v1beta1.APIService, opts v1.UpdateOptions) (*v1beta1.APIService, 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.APIService, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.APIServiceList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.APIService, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.APIService, err error) APIServiceExpansion } @@ -105,10 +105,11 @@ func (c *aPIServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int } // Create takes the representation of a aPIService and creates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *aPIServices) Create(ctx context.Context, aPIService *v1beta1.APIService) (result *v1beta1.APIService, err error) { +func (c *aPIServices) Create(ctx context.Context, aPIService *v1beta1.APIService, opts v1.CreateOptions) (result *v1beta1.APIService, err error) { result = &v1beta1.APIService{} err = c.client.Post(). Resource("apiservices"). + VersionedParams(&opts, scheme.ParameterCodec). Body(aPIService). Do(ctx). Into(result) @@ -116,11 +117,12 @@ func (c *aPIServices) Create(ctx context.Context, aPIService *v1beta1.APIService } // Update takes the representation of a aPIService and updates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *aPIServices) Update(ctx context.Context, aPIService *v1beta1.APIService) (result *v1beta1.APIService, err error) { +func (c *aPIServices) Update(ctx context.Context, aPIService *v1beta1.APIService, opts v1.UpdateOptions) (result *v1beta1.APIService, err error) { result = &v1beta1.APIService{} err = c.client.Put(). Resource("apiservices"). Name(aPIService.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(aPIService). Do(ctx). Into(result) @@ -129,13 +131,13 @@ func (c *aPIServices) Update(ctx context.Context, aPIService *v1beta1.APIService // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *aPIServices) UpdateStatus(ctx context.Context, aPIService *v1beta1.APIService) (result *v1beta1.APIService, err error) { +func (c *aPIServices) UpdateStatus(ctx context.Context, aPIService *v1beta1.APIService, opts v1.UpdateOptions) (result *v1beta1.APIService, err error) { result = &v1beta1.APIService{} err = c.client.Put(). Resource("apiservices"). Name(aPIService.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(aPIService). Do(ctx). Into(result) @@ -168,12 +170,13 @@ func (c *aPIServices) DeleteCollection(ctx context.Context, options *v1.DeleteOp } // Patch applies the patch and returns the patched aPIService. -func (c *aPIServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.APIService, err error) { +func (c *aPIServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.APIService, err error) { result = &v1beta1.APIService{} err = c.client.Patch(pt). Resource("apiservices"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/fake/fake_apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/fake/fake_apiservice.go index 8db0c1aa1d6..36b59e11aa7 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/fake/fake_apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/fake/fake_apiservice.go @@ -77,7 +77,7 @@ func (c *FakeAPIServices) Watch(ctx context.Context, opts v1.ListOptions) (watch } // Create takes the representation of a aPIService and creates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *FakeAPIServices) Create(ctx context.Context, aPIService *v1beta1.APIService) (result *v1beta1.APIService, err error) { +func (c *FakeAPIServices) Create(ctx context.Context, aPIService *v1beta1.APIService, opts v1.CreateOptions) (result *v1beta1.APIService, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(apiservicesResource, aPIService), &v1beta1.APIService{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeAPIServices) Create(ctx context.Context, aPIService *v1beta1.APISer } // Update takes the representation of a aPIService and updates it. Returns the server's representation of the aPIService, and an error, if there is any. -func (c *FakeAPIServices) Update(ctx context.Context, aPIService *v1beta1.APIService) (result *v1beta1.APIService, err error) { +func (c *FakeAPIServices) Update(ctx context.Context, aPIService *v1beta1.APIService, opts v1.UpdateOptions) (result *v1beta1.APIService, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(apiservicesResource, aPIService), &v1beta1.APIService{}) if obj == nil { @@ -98,7 +98,7 @@ func (c *FakeAPIServices) Update(ctx context.Context, aPIService *v1beta1.APISer // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAPIServices) UpdateStatus(ctx context.Context, aPIService *v1beta1.APIService) (*v1beta1.APIService, error) { +func (c *FakeAPIServices) UpdateStatus(ctx context.Context, aPIService *v1beta1.APIService, opts v1.UpdateOptions) (*v1beta1.APIService, error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateSubresourceAction(apiservicesResource, "status", aPIService), &v1beta1.APIService{}) if obj == nil { @@ -123,7 +123,7 @@ func (c *FakeAPIServices) DeleteCollection(ctx context.Context, options *v1.Dele } // Patch applies the patch and returns the patched aPIService. -func (c *FakeAPIServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.APIService, err error) { +func (c *FakeAPIServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.APIService, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(apiservicesResource, name, pt, data, subresources...), &v1beta1.APIService{}) if obj == nil { diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go index ecb5fad2617..d79163ddb81 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go @@ -37,7 +37,7 @@ type NodeMetricsesGetter interface { // NodeMetricsInterface has methods to work with NodeMetrics resources. type NodeMetricsInterface interface { - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.NodeMetrics, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.NodeMetrics, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.NodeMetricsList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) NodeMetricsExpansion diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go index f957dea5c8c..49d57c8e887 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go @@ -37,7 +37,7 @@ type PodMetricsesGetter interface { // PodMetricsInterface has methods to work with PodMetrics resources. type PodMetricsInterface interface { - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.PodMetrics, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PodMetrics, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PodMetricsList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) PodMetricsExpansion diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go index 78b2b0e40a6..a312221ed25 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go @@ -37,7 +37,7 @@ type NodeMetricsesGetter interface { // NodeMetricsInterface has methods to work with NodeMetrics resources. type NodeMetricsInterface interface { - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.NodeMetrics, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.NodeMetrics, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.NodeMetricsList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) NodeMetricsExpansion diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go index dd5a03d1fc7..e66c377c25b 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go @@ -37,7 +37,7 @@ type PodMetricsesGetter interface { // PodMetricsInterface has methods to work with PodMetrics resources. type PodMetricsInterface interface { - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.PodMetrics, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.PodMetrics, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PodMetricsList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) PodMetricsExpansion diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fake/fake_fischer.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fake/fake_fischer.go index 93165d11b1a..9e2d2ad36ca 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fake/fake_fischer.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fake/fake_fischer.go @@ -77,7 +77,7 @@ func (c *FakeFischers) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a fischer and creates it. Returns the server's representation of the fischer, and an error, if there is any. -func (c *FakeFischers) Create(ctx context.Context, fischer *v1alpha1.Fischer) (result *v1alpha1.Fischer, err error) { +func (c *FakeFischers) Create(ctx context.Context, fischer *v1alpha1.Fischer, opts v1.CreateOptions) (result *v1alpha1.Fischer, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(fischersResource, fischer), &v1alpha1.Fischer{}) if obj == nil { @@ -87,7 +87,7 @@ func (c *FakeFischers) Create(ctx context.Context, fischer *v1alpha1.Fischer) (r } // Update takes the representation of a fischer and updates it. Returns the server's representation of the fischer, and an error, if there is any. -func (c *FakeFischers) Update(ctx context.Context, fischer *v1alpha1.Fischer) (result *v1alpha1.Fischer, err error) { +func (c *FakeFischers) Update(ctx context.Context, fischer *v1alpha1.Fischer, opts v1.UpdateOptions) (result *v1alpha1.Fischer, err error) { obj, err := c.Fake. Invokes(testing.NewRootUpdateAction(fischersResource, fischer), &v1alpha1.Fischer{}) if obj == nil { @@ -112,7 +112,7 @@ func (c *FakeFischers) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched fischer. -func (c *FakeFischers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Fischer, err error) { +func (c *FakeFischers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Fischer, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(fischersResource, name, pt, data, subresources...), &v1alpha1.Fischer{}) if obj == nil { diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fake/fake_flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fake/fake_flunder.go index 0b13958f69b..d1b76d43716 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fake/fake_flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fake/fake_flunder.go @@ -81,7 +81,7 @@ func (c *FakeFlunders) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a flunder and creates it. Returns the server's representation of the flunder, and an error, if there is any. -func (c *FakeFlunders) Create(ctx context.Context, flunder *v1alpha1.Flunder) (result *v1alpha1.Flunder, err error) { +func (c *FakeFlunders) Create(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.CreateOptions) (result *v1alpha1.Flunder, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(flundersResource, c.ns, flunder), &v1alpha1.Flunder{}) @@ -92,7 +92,7 @@ func (c *FakeFlunders) Create(ctx context.Context, flunder *v1alpha1.Flunder) (r } // Update takes the representation of a flunder and updates it. Returns the server's representation of the flunder, and an error, if there is any. -func (c *FakeFlunders) Update(ctx context.Context, flunder *v1alpha1.Flunder) (result *v1alpha1.Flunder, err error) { +func (c *FakeFlunders) Update(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.UpdateOptions) (result *v1alpha1.Flunder, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(flundersResource, c.ns, flunder), &v1alpha1.Flunder{}) @@ -104,7 +104,7 @@ func (c *FakeFlunders) Update(ctx context.Context, flunder *v1alpha1.Flunder) (r // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeFlunders) UpdateStatus(ctx context.Context, flunder *v1alpha1.Flunder) (*v1alpha1.Flunder, error) { +func (c *FakeFlunders) UpdateStatus(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.UpdateOptions) (*v1alpha1.Flunder, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(flundersResource, "status", c.ns, flunder), &v1alpha1.Flunder{}) @@ -131,7 +131,7 @@ func (c *FakeFlunders) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched flunder. -func (c *FakeFlunders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Flunder, err error) { +func (c *FakeFlunders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Flunder, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(flundersResource, c.ns, name, pt, data, subresources...), &v1alpha1.Flunder{}) diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go index e99f1b03187..51ab0e9c152 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go @@ -38,14 +38,14 @@ type FischersGetter interface { // FischerInterface has methods to work with Fischer resources. type FischerInterface interface { - Create(context.Context, *v1alpha1.Fischer) (*v1alpha1.Fischer, error) - Update(context.Context, *v1alpha1.Fischer) (*v1alpha1.Fischer, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.Fischer, error) + Create(ctx context.Context, fischer *v1alpha1.Fischer, opts v1.CreateOptions) (*v1alpha1.Fischer, error) + Update(ctx context.Context, fischer *v1alpha1.Fischer, opts v1.UpdateOptions) (*v1alpha1.Fischer, 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.Fischer, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FischerList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Fischer, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Fischer, err error) FischerExpansion } @@ -104,10 +104,11 @@ func (c *fischers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } // Create takes the representation of a fischer and creates it. Returns the server's representation of the fischer, and an error, if there is any. -func (c *fischers) Create(ctx context.Context, fischer *v1alpha1.Fischer) (result *v1alpha1.Fischer, err error) { +func (c *fischers) Create(ctx context.Context, fischer *v1alpha1.Fischer, opts v1.CreateOptions) (result *v1alpha1.Fischer, err error) { result = &v1alpha1.Fischer{} err = c.client.Post(). Resource("fischers"). + VersionedParams(&opts, scheme.ParameterCodec). Body(fischer). Do(ctx). Into(result) @@ -115,11 +116,12 @@ func (c *fischers) Create(ctx context.Context, fischer *v1alpha1.Fischer) (resul } // Update takes the representation of a fischer and updates it. Returns the server's representation of the fischer, and an error, if there is any. -func (c *fischers) Update(ctx context.Context, fischer *v1alpha1.Fischer) (result *v1alpha1.Fischer, err error) { +func (c *fischers) Update(ctx context.Context, fischer *v1alpha1.Fischer, opts v1.UpdateOptions) (result *v1alpha1.Fischer, err error) { result = &v1alpha1.Fischer{} err = c.client.Put(). Resource("fischers"). Name(fischer.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(fischer). Do(ctx). Into(result) @@ -152,12 +154,13 @@ func (c *fischers) DeleteCollection(ctx context.Context, options *v1.DeleteOptio } // Patch applies the patch and returns the patched fischer. -func (c *fischers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Fischer, err error) { +func (c *fischers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Fischer, err error) { result = &v1alpha1.Fischer{} err = c.client.Patch(pt). Resource("fischers"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go index 664eda2f165..ae8dffeb62c 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go @@ -38,15 +38,15 @@ type FlundersGetter interface { // FlunderInterface has methods to work with Flunder resources. type FlunderInterface interface { - Create(context.Context, *v1alpha1.Flunder) (*v1alpha1.Flunder, error) - Update(context.Context, *v1alpha1.Flunder) (*v1alpha1.Flunder, error) - UpdateStatus(context.Context, *v1alpha1.Flunder) (*v1alpha1.Flunder, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.Flunder, error) + Create(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.CreateOptions) (*v1alpha1.Flunder, error) + Update(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.UpdateOptions) (*v1alpha1.Flunder, error) + UpdateStatus(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.UpdateOptions) (*v1alpha1.Flunder, 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.Flunder, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FlunderList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Flunder, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Flunder, err error) FlunderExpansion } @@ -110,11 +110,12 @@ func (c *flunders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } // Create takes the representation of a flunder and creates it. Returns the server's representation of the flunder, and an error, if there is any. -func (c *flunders) Create(ctx context.Context, flunder *v1alpha1.Flunder) (result *v1alpha1.Flunder, err error) { +func (c *flunders) Create(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.CreateOptions) (result *v1alpha1.Flunder, err error) { result = &v1alpha1.Flunder{} err = c.client.Post(). Namespace(c.ns). Resource("flunders"). + VersionedParams(&opts, scheme.ParameterCodec). Body(flunder). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *flunders) Create(ctx context.Context, flunder *v1alpha1.Flunder) (resul } // Update takes the representation of a flunder and updates it. Returns the server's representation of the flunder, and an error, if there is any. -func (c *flunders) Update(ctx context.Context, flunder *v1alpha1.Flunder) (result *v1alpha1.Flunder, err error) { +func (c *flunders) Update(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.UpdateOptions) (result *v1alpha1.Flunder, err error) { result = &v1alpha1.Flunder{} err = c.client.Put(). Namespace(c.ns). Resource("flunders"). Name(flunder.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(flunder). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *flunders) Update(ctx context.Context, flunder *v1alpha1.Flunder) (resul // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *flunders) UpdateStatus(ctx context.Context, flunder *v1alpha1.Flunder) (result *v1alpha1.Flunder, err error) { +func (c *flunders) UpdateStatus(ctx context.Context, flunder *v1alpha1.Flunder, opts v1.UpdateOptions) (result *v1alpha1.Flunder, err error) { result = &v1alpha1.Flunder{} err = c.client.Put(). Namespace(c.ns). Resource("flunders"). Name(flunder.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(flunder). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *flunders) DeleteCollection(ctx context.Context, options *v1.DeleteOptio } // Patch applies the patch and returns the patched flunder. -func (c *flunders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Flunder, err error) { +func (c *flunders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Flunder, err error) { result = &v1alpha1.Flunder{} err = c.client.Patch(pt). Namespace(c.ns). Resource("flunders"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/fake/fake_flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/fake/fake_flunder.go index afc5d4cd2ae..5039134bd8f 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/fake/fake_flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/fake/fake_flunder.go @@ -81,7 +81,7 @@ func (c *FakeFlunders) Watch(ctx context.Context, opts v1.ListOptions) (watch.In } // Create takes the representation of a flunder and creates it. Returns the server's representation of the flunder, and an error, if there is any. -func (c *FakeFlunders) Create(ctx context.Context, flunder *v1beta1.Flunder) (result *v1beta1.Flunder, err error) { +func (c *FakeFlunders) Create(ctx context.Context, flunder *v1beta1.Flunder, opts v1.CreateOptions) (result *v1beta1.Flunder, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(flundersResource, c.ns, flunder), &v1beta1.Flunder{}) @@ -92,7 +92,7 @@ func (c *FakeFlunders) Create(ctx context.Context, flunder *v1beta1.Flunder) (re } // Update takes the representation of a flunder and updates it. Returns the server's representation of the flunder, and an error, if there is any. -func (c *FakeFlunders) Update(ctx context.Context, flunder *v1beta1.Flunder) (result *v1beta1.Flunder, err error) { +func (c *FakeFlunders) Update(ctx context.Context, flunder *v1beta1.Flunder, opts v1.UpdateOptions) (result *v1beta1.Flunder, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(flundersResource, c.ns, flunder), &v1beta1.Flunder{}) @@ -104,7 +104,7 @@ func (c *FakeFlunders) Update(ctx context.Context, flunder *v1beta1.Flunder) (re // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeFlunders) UpdateStatus(ctx context.Context, flunder *v1beta1.Flunder) (*v1beta1.Flunder, error) { +func (c *FakeFlunders) UpdateStatus(ctx context.Context, flunder *v1beta1.Flunder, opts v1.UpdateOptions) (*v1beta1.Flunder, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(flundersResource, "status", c.ns, flunder), &v1beta1.Flunder{}) @@ -131,7 +131,7 @@ func (c *FakeFlunders) DeleteCollection(ctx context.Context, options *v1.DeleteO } // Patch applies the patch and returns the patched flunder. -func (c *FakeFlunders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Flunder, err error) { +func (c *FakeFlunders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Flunder, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(flundersResource, c.ns, name, pt, data, subresources...), &v1beta1.Flunder{}) diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go index 0a8574b25e4..61900687e7d 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go @@ -38,15 +38,15 @@ type FlundersGetter interface { // FlunderInterface has methods to work with Flunder resources. type FlunderInterface interface { - Create(context.Context, *v1beta1.Flunder) (*v1beta1.Flunder, error) - Update(context.Context, *v1beta1.Flunder) (*v1beta1.Flunder, error) - UpdateStatus(context.Context, *v1beta1.Flunder) (*v1beta1.Flunder, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.Flunder, error) + Create(ctx context.Context, flunder *v1beta1.Flunder, opts v1.CreateOptions) (*v1beta1.Flunder, error) + Update(ctx context.Context, flunder *v1beta1.Flunder, opts v1.UpdateOptions) (*v1beta1.Flunder, error) + UpdateStatus(ctx context.Context, flunder *v1beta1.Flunder, opts v1.UpdateOptions) (*v1beta1.Flunder, 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.Flunder, error) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.FlunderList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Flunder, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Flunder, err error) FlunderExpansion } @@ -110,11 +110,12 @@ func (c *flunders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } // Create takes the representation of a flunder and creates it. Returns the server's representation of the flunder, and an error, if there is any. -func (c *flunders) Create(ctx context.Context, flunder *v1beta1.Flunder) (result *v1beta1.Flunder, err error) { +func (c *flunders) Create(ctx context.Context, flunder *v1beta1.Flunder, opts v1.CreateOptions) (result *v1beta1.Flunder, err error) { result = &v1beta1.Flunder{} err = c.client.Post(). Namespace(c.ns). Resource("flunders"). + VersionedParams(&opts, scheme.ParameterCodec). Body(flunder). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *flunders) Create(ctx context.Context, flunder *v1beta1.Flunder) (result } // Update takes the representation of a flunder and updates it. Returns the server's representation of the flunder, and an error, if there is any. -func (c *flunders) Update(ctx context.Context, flunder *v1beta1.Flunder) (result *v1beta1.Flunder, err error) { +func (c *flunders) Update(ctx context.Context, flunder *v1beta1.Flunder, opts v1.UpdateOptions) (result *v1beta1.Flunder, err error) { result = &v1beta1.Flunder{} err = c.client.Put(). Namespace(c.ns). Resource("flunders"). Name(flunder.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(flunder). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *flunders) Update(ctx context.Context, flunder *v1beta1.Flunder) (result // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *flunders) UpdateStatus(ctx context.Context, flunder *v1beta1.Flunder) (result *v1beta1.Flunder, err error) { +func (c *flunders) UpdateStatus(ctx context.Context, flunder *v1beta1.Flunder, opts v1.UpdateOptions) (result *v1beta1.Flunder, err error) { result = &v1beta1.Flunder{} err = c.client.Put(). Namespace(c.ns). Resource("flunders"). Name(flunder.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(flunder). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *flunders) DeleteCollection(ctx context.Context, options *v1.DeleteOptio } // Patch applies the patch and returns the patched flunder. -func (c *flunders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Flunder, err error) { +func (c *flunders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Flunder, err error) { result = &v1beta1.Flunder{} err = c.client.Patch(pt). Namespace(c.ns). Resource("flunders"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result) diff --git a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/fake/fake_foo.go b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/fake/fake_foo.go index 353f91e307f..e1434da222c 100644 --- a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/fake/fake_foo.go +++ b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/fake/fake_foo.go @@ -81,7 +81,7 @@ func (c *FakeFoos) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interf } // Create takes the representation of a foo and creates it. Returns the server's representation of the foo, and an error, if there is any. -func (c *FakeFoos) Create(ctx context.Context, foo *v1alpha1.Foo) (result *v1alpha1.Foo, err error) { +func (c *FakeFoos) Create(ctx context.Context, foo *v1alpha1.Foo, opts v1.CreateOptions) (result *v1alpha1.Foo, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(foosResource, c.ns, foo), &v1alpha1.Foo{}) @@ -92,7 +92,7 @@ func (c *FakeFoos) Create(ctx context.Context, foo *v1alpha1.Foo) (result *v1alp } // Update takes the representation of a foo and updates it. Returns the server's representation of the foo, and an error, if there is any. -func (c *FakeFoos) Update(ctx context.Context, foo *v1alpha1.Foo) (result *v1alpha1.Foo, err error) { +func (c *FakeFoos) Update(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (result *v1alpha1.Foo, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(foosResource, c.ns, foo), &v1alpha1.Foo{}) @@ -104,7 +104,7 @@ func (c *FakeFoos) Update(ctx context.Context, foo *v1alpha1.Foo) (result *v1alp // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeFoos) UpdateStatus(ctx context.Context, foo *v1alpha1.Foo) (*v1alpha1.Foo, error) { +func (c *FakeFoos) UpdateStatus(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (*v1alpha1.Foo, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(foosResource, "status", c.ns, foo), &v1alpha1.Foo{}) @@ -131,7 +131,7 @@ func (c *FakeFoos) DeleteCollection(ctx context.Context, options *v1.DeleteOptio } // Patch applies the patch and returns the patched foo. -func (c *FakeFoos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Foo, err error) { +func (c *FakeFoos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Foo, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(foosResource, c.ns, name, pt, data, subresources...), &v1alpha1.Foo{}) diff --git a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go index 9798124227e..bf0eae3a006 100644 --- a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go +++ b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go @@ -38,15 +38,15 @@ type FoosGetter interface { // FooInterface has methods to work with Foo resources. type FooInterface interface { - Create(context.Context, *v1alpha1.Foo) (*v1alpha1.Foo, error) - Update(context.Context, *v1alpha1.Foo) (*v1alpha1.Foo, error) - UpdateStatus(context.Context, *v1alpha1.Foo) (*v1alpha1.Foo, error) - Delete(ctx context.Context, name string, options *v1.DeleteOptions) error - DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.Foo, error) + Create(ctx context.Context, foo *v1alpha1.Foo, opts v1.CreateOptions) (*v1alpha1.Foo, error) + Update(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (*v1alpha1.Foo, error) + UpdateStatus(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (*v1alpha1.Foo, 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.Foo, error) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FooList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Foo, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Foo, err error) FooExpansion } @@ -110,11 +110,12 @@ func (c *foos) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, } // Create takes the representation of a foo and creates it. Returns the server's representation of the foo, and an error, if there is any. -func (c *foos) Create(ctx context.Context, foo *v1alpha1.Foo) (result *v1alpha1.Foo, err error) { +func (c *foos) Create(ctx context.Context, foo *v1alpha1.Foo, opts v1.CreateOptions) (result *v1alpha1.Foo, err error) { result = &v1alpha1.Foo{} err = c.client.Post(). Namespace(c.ns). Resource("foos"). + VersionedParams(&opts, scheme.ParameterCodec). Body(foo). Do(ctx). Into(result) @@ -122,12 +123,13 @@ func (c *foos) Create(ctx context.Context, foo *v1alpha1.Foo) (result *v1alpha1. } // Update takes the representation of a foo and updates it. Returns the server's representation of the foo, and an error, if there is any. -func (c *foos) Update(ctx context.Context, foo *v1alpha1.Foo) (result *v1alpha1.Foo, err error) { +func (c *foos) Update(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (result *v1alpha1.Foo, err error) { result = &v1alpha1.Foo{} err = c.client.Put(). Namespace(c.ns). Resource("foos"). Name(foo.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(foo). Do(ctx). Into(result) @@ -136,14 +138,14 @@ func (c *foos) Update(ctx context.Context, foo *v1alpha1.Foo) (result *v1alpha1. // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *foos) UpdateStatus(ctx context.Context, foo *v1alpha1.Foo) (result *v1alpha1.Foo, err error) { +func (c *foos) UpdateStatus(ctx context.Context, foo *v1alpha1.Foo, opts v1.UpdateOptions) (result *v1alpha1.Foo, err error) { result = &v1alpha1.Foo{} err = c.client.Put(). Namespace(c.ns). Resource("foos"). Name(foo.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(foo). Do(ctx). Into(result) @@ -178,13 +180,14 @@ func (c *foos) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, } // Patch applies the patch and returns the patched foo. -func (c *foos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Foo, err error) { +func (c *foos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Foo, err error) { result = &v1alpha1.Foo{} err = c.client.Patch(pt). Namespace(c.ns). Resource("foos"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). Do(ctx). Into(result)