mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-26 07:10:41 +00:00
DRA API: verbatim copy v1beta2 -> v1
Kubernetes-commit: 1f2f433f76dbc28d1fd6602f96e6dd871893601b
This commit is contained in:
committed by
Kubernetes Publisher
parent
5f1f878e5c
commit
dce90c45af
71
kubernetes/typed/resource/v1/deviceclass.go
Normal file
71
kubernetes/typed/resource/v1/deviceclass.go
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
resourcev1beta2 "k8s.io/api/resource/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
applyconfigurationsresourcev1beta2 "k8s.io/client-go/applyconfigurations/resource/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
|
||||
// DeviceClassesGetter has a method to return a DeviceClassInterface.
|
||||
// A group's client should implement this interface.
|
||||
type DeviceClassesGetter interface {
|
||||
DeviceClasses() DeviceClassInterface
|
||||
}
|
||||
|
||||
// DeviceClassInterface has methods to work with DeviceClass resources.
|
||||
type DeviceClassInterface interface {
|
||||
Create(ctx context.Context, deviceClass *resourcev1beta2.DeviceClass, opts v1.CreateOptions) (*resourcev1beta2.DeviceClass, error)
|
||||
Update(ctx context.Context, deviceClass *resourcev1beta2.DeviceClass, opts v1.UpdateOptions) (*resourcev1beta2.DeviceClass, 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) (*resourcev1beta2.DeviceClass, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*resourcev1beta2.DeviceClassList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *resourcev1beta2.DeviceClass, err error)
|
||||
Apply(ctx context.Context, deviceClass *applyconfigurationsresourcev1beta2.DeviceClassApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1beta2.DeviceClass, err error)
|
||||
DeviceClassExpansion
|
||||
}
|
||||
|
||||
// deviceClasses implements DeviceClassInterface
|
||||
type deviceClasses struct {
|
||||
*gentype.ClientWithListAndApply[*resourcev1beta2.DeviceClass, *resourcev1beta2.DeviceClassList, *applyconfigurationsresourcev1beta2.DeviceClassApplyConfiguration]
|
||||
}
|
||||
|
||||
// newDeviceClasses returns a DeviceClasses
|
||||
func newDeviceClasses(c *ResourceV1beta2Client) *deviceClasses {
|
||||
return &deviceClasses{
|
||||
gentype.NewClientWithListAndApply[*resourcev1beta2.DeviceClass, *resourcev1beta2.DeviceClassList, *applyconfigurationsresourcev1beta2.DeviceClassApplyConfiguration](
|
||||
"deviceclasses",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
"",
|
||||
func() *resourcev1beta2.DeviceClass { return &resourcev1beta2.DeviceClass{} },
|
||||
func() *resourcev1beta2.DeviceClassList { return &resourcev1beta2.DeviceClassList{} },
|
||||
gentype.PrefersProtobuf[*resourcev1beta2.DeviceClass](),
|
||||
),
|
||||
}
|
||||
}
|
20
kubernetes/typed/resource/v1/doc.go
Normal file
20
kubernetes/typed/resource/v1/doc.go
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1beta2
|
20
kubernetes/typed/resource/v1/fake/doc.go
Normal file
20
kubernetes/typed/resource/v1/fake/doc.go
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
51
kubernetes/typed/resource/v1/fake/fake_deviceclass.go
Normal file
51
kubernetes/typed/resource/v1/fake/fake_deviceclass.go
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1beta2 "k8s.io/api/resource/v1beta2"
|
||||
resourcev1beta2 "k8s.io/client-go/applyconfigurations/resource/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
typedresourcev1beta2 "k8s.io/client-go/kubernetes/typed/resource/v1beta2"
|
||||
)
|
||||
|
||||
// fakeDeviceClasses implements DeviceClassInterface
|
||||
type fakeDeviceClasses struct {
|
||||
*gentype.FakeClientWithListAndApply[*v1beta2.DeviceClass, *v1beta2.DeviceClassList, *resourcev1beta2.DeviceClassApplyConfiguration]
|
||||
Fake *FakeResourceV1beta2
|
||||
}
|
||||
|
||||
func newFakeDeviceClasses(fake *FakeResourceV1beta2) typedresourcev1beta2.DeviceClassInterface {
|
||||
return &fakeDeviceClasses{
|
||||
gentype.NewFakeClientWithListAndApply[*v1beta2.DeviceClass, *v1beta2.DeviceClassList, *resourcev1beta2.DeviceClassApplyConfiguration](
|
||||
fake.Fake,
|
||||
"",
|
||||
v1beta2.SchemeGroupVersion.WithResource("deviceclasses"),
|
||||
v1beta2.SchemeGroupVersion.WithKind("DeviceClass"),
|
||||
func() *v1beta2.DeviceClass { return &v1beta2.DeviceClass{} },
|
||||
func() *v1beta2.DeviceClassList { return &v1beta2.DeviceClassList{} },
|
||||
func(dst, src *v1beta2.DeviceClassList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta2.DeviceClassList) []*v1beta2.DeviceClass { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v1beta2.DeviceClassList, items []*v1beta2.DeviceClass) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
}
|
52
kubernetes/typed/resource/v1/fake/fake_resource_client.go
Normal file
52
kubernetes/typed/resource/v1/fake/fake_resource_client.go
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1beta2 "k8s.io/client-go/kubernetes/typed/resource/v1beta2"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeResourceV1beta2 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1beta2) DeviceClasses() v1beta2.DeviceClassInterface {
|
||||
return newFakeDeviceClasses(c)
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1beta2) ResourceClaims(namespace string) v1beta2.ResourceClaimInterface {
|
||||
return newFakeResourceClaims(c, namespace)
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1beta2) ResourceClaimTemplates(namespace string) v1beta2.ResourceClaimTemplateInterface {
|
||||
return newFakeResourceClaimTemplates(c, namespace)
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1beta2) ResourceSlices() v1beta2.ResourceSliceInterface {
|
||||
return newFakeResourceSlices(c)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeResourceV1beta2) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
53
kubernetes/typed/resource/v1/fake/fake_resourceclaim.go
Normal file
53
kubernetes/typed/resource/v1/fake/fake_resourceclaim.go
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1beta2 "k8s.io/api/resource/v1beta2"
|
||||
resourcev1beta2 "k8s.io/client-go/applyconfigurations/resource/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
typedresourcev1beta2 "k8s.io/client-go/kubernetes/typed/resource/v1beta2"
|
||||
)
|
||||
|
||||
// fakeResourceClaims implements ResourceClaimInterface
|
||||
type fakeResourceClaims struct {
|
||||
*gentype.FakeClientWithListAndApply[*v1beta2.ResourceClaim, *v1beta2.ResourceClaimList, *resourcev1beta2.ResourceClaimApplyConfiguration]
|
||||
Fake *FakeResourceV1beta2
|
||||
}
|
||||
|
||||
func newFakeResourceClaims(fake *FakeResourceV1beta2, namespace string) typedresourcev1beta2.ResourceClaimInterface {
|
||||
return &fakeResourceClaims{
|
||||
gentype.NewFakeClientWithListAndApply[*v1beta2.ResourceClaim, *v1beta2.ResourceClaimList, *resourcev1beta2.ResourceClaimApplyConfiguration](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta2.SchemeGroupVersion.WithResource("resourceclaims"),
|
||||
v1beta2.SchemeGroupVersion.WithKind("ResourceClaim"),
|
||||
func() *v1beta2.ResourceClaim { return &v1beta2.ResourceClaim{} },
|
||||
func() *v1beta2.ResourceClaimList { return &v1beta2.ResourceClaimList{} },
|
||||
func(dst, src *v1beta2.ResourceClaimList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta2.ResourceClaimList) []*v1beta2.ResourceClaim {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1beta2.ResourceClaimList, items []*v1beta2.ResourceClaim) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1beta2 "k8s.io/api/resource/v1beta2"
|
||||
resourcev1beta2 "k8s.io/client-go/applyconfigurations/resource/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
typedresourcev1beta2 "k8s.io/client-go/kubernetes/typed/resource/v1beta2"
|
||||
)
|
||||
|
||||
// fakeResourceClaimTemplates implements ResourceClaimTemplateInterface
|
||||
type fakeResourceClaimTemplates struct {
|
||||
*gentype.FakeClientWithListAndApply[*v1beta2.ResourceClaimTemplate, *v1beta2.ResourceClaimTemplateList, *resourcev1beta2.ResourceClaimTemplateApplyConfiguration]
|
||||
Fake *FakeResourceV1beta2
|
||||
}
|
||||
|
||||
func newFakeResourceClaimTemplates(fake *FakeResourceV1beta2, namespace string) typedresourcev1beta2.ResourceClaimTemplateInterface {
|
||||
return &fakeResourceClaimTemplates{
|
||||
gentype.NewFakeClientWithListAndApply[*v1beta2.ResourceClaimTemplate, *v1beta2.ResourceClaimTemplateList, *resourcev1beta2.ResourceClaimTemplateApplyConfiguration](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta2.SchemeGroupVersion.WithResource("resourceclaimtemplates"),
|
||||
v1beta2.SchemeGroupVersion.WithKind("ResourceClaimTemplate"),
|
||||
func() *v1beta2.ResourceClaimTemplate { return &v1beta2.ResourceClaimTemplate{} },
|
||||
func() *v1beta2.ResourceClaimTemplateList { return &v1beta2.ResourceClaimTemplateList{} },
|
||||
func(dst, src *v1beta2.ResourceClaimTemplateList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta2.ResourceClaimTemplateList) []*v1beta2.ResourceClaimTemplate {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1beta2.ResourceClaimTemplateList, items []*v1beta2.ResourceClaimTemplate) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
}
|
53
kubernetes/typed/resource/v1/fake/fake_resourceslice.go
Normal file
53
kubernetes/typed/resource/v1/fake/fake_resourceslice.go
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1beta2 "k8s.io/api/resource/v1beta2"
|
||||
resourcev1beta2 "k8s.io/client-go/applyconfigurations/resource/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
typedresourcev1beta2 "k8s.io/client-go/kubernetes/typed/resource/v1beta2"
|
||||
)
|
||||
|
||||
// fakeResourceSlices implements ResourceSliceInterface
|
||||
type fakeResourceSlices struct {
|
||||
*gentype.FakeClientWithListAndApply[*v1beta2.ResourceSlice, *v1beta2.ResourceSliceList, *resourcev1beta2.ResourceSliceApplyConfiguration]
|
||||
Fake *FakeResourceV1beta2
|
||||
}
|
||||
|
||||
func newFakeResourceSlices(fake *FakeResourceV1beta2) typedresourcev1beta2.ResourceSliceInterface {
|
||||
return &fakeResourceSlices{
|
||||
gentype.NewFakeClientWithListAndApply[*v1beta2.ResourceSlice, *v1beta2.ResourceSliceList, *resourcev1beta2.ResourceSliceApplyConfiguration](
|
||||
fake.Fake,
|
||||
"",
|
||||
v1beta2.SchemeGroupVersion.WithResource("resourceslices"),
|
||||
v1beta2.SchemeGroupVersion.WithKind("ResourceSlice"),
|
||||
func() *v1beta2.ResourceSlice { return &v1beta2.ResourceSlice{} },
|
||||
func() *v1beta2.ResourceSliceList { return &v1beta2.ResourceSliceList{} },
|
||||
func(dst, src *v1beta2.ResourceSliceList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta2.ResourceSliceList) []*v1beta2.ResourceSlice {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1beta2.ResourceSliceList, items []*v1beta2.ResourceSlice) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
}
|
27
kubernetes/typed/resource/v1/generated_expansion.go
Normal file
27
kubernetes/typed/resource/v1/generated_expansion.go
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta2
|
||||
|
||||
type DeviceClassExpansion interface{}
|
||||
|
||||
type ResourceClaimExpansion interface{}
|
||||
|
||||
type ResourceClaimTemplateExpansion interface{}
|
||||
|
||||
type ResourceSliceExpansion interface{}
|
116
kubernetes/typed/resource/v1/resource_client.go
Normal file
116
kubernetes/typed/resource/v1/resource_client.go
Normal file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
http "net/http"
|
||||
|
||||
resourcev1beta2 "k8s.io/api/resource/v1beta2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type ResourceV1beta2Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
DeviceClassesGetter
|
||||
ResourceClaimsGetter
|
||||
ResourceClaimTemplatesGetter
|
||||
ResourceSlicesGetter
|
||||
}
|
||||
|
||||
// ResourceV1beta2Client is used to interact with features provided by the resource.k8s.io group.
|
||||
type ResourceV1beta2Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *ResourceV1beta2Client) DeviceClasses() DeviceClassInterface {
|
||||
return newDeviceClasses(c)
|
||||
}
|
||||
|
||||
func (c *ResourceV1beta2Client) ResourceClaims(namespace string) ResourceClaimInterface {
|
||||
return newResourceClaims(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ResourceV1beta2Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface {
|
||||
return newResourceClaimTemplates(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ResourceV1beta2Client) ResourceSlices() ResourceSliceInterface {
|
||||
return newResourceSlices(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new ResourceV1beta2Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*ResourceV1beta2Client, error) {
|
||||
config := *c
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewForConfigAndClient(&config, httpClient)
|
||||
}
|
||||
|
||||
// NewForConfigAndClient creates a new ResourceV1beta2Client for the given config and http client.
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1beta2Client, error) {
|
||||
config := *c
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ResourceV1beta2Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new ResourceV1beta2Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *ResourceV1beta2Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new ResourceV1beta2Client for the given RESTClient.
|
||||
func New(c rest.Interface) *ResourceV1beta2Client {
|
||||
return &ResourceV1beta2Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := resourcev1beta2.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *ResourceV1beta2Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
75
kubernetes/typed/resource/v1/resourceclaim.go
Normal file
75
kubernetes/typed/resource/v1/resourceclaim.go
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
resourcev1beta2 "k8s.io/api/resource/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
applyconfigurationsresourcev1beta2 "k8s.io/client-go/applyconfigurations/resource/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
|
||||
// ResourceClaimsGetter has a method to return a ResourceClaimInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ResourceClaimsGetter interface {
|
||||
ResourceClaims(namespace string) ResourceClaimInterface
|
||||
}
|
||||
|
||||
// ResourceClaimInterface has methods to work with ResourceClaim resources.
|
||||
type ResourceClaimInterface interface {
|
||||
Create(ctx context.Context, resourceClaim *resourcev1beta2.ResourceClaim, opts v1.CreateOptions) (*resourcev1beta2.ResourceClaim, error)
|
||||
Update(ctx context.Context, resourceClaim *resourcev1beta2.ResourceClaim, opts v1.UpdateOptions) (*resourcev1beta2.ResourceClaim, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, resourceClaim *resourcev1beta2.ResourceClaim, opts v1.UpdateOptions) (*resourcev1beta2.ResourceClaim, 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) (*resourcev1beta2.ResourceClaim, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*resourcev1beta2.ResourceClaimList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *resourcev1beta2.ResourceClaim, err error)
|
||||
Apply(ctx context.Context, resourceClaim *applyconfigurationsresourcev1beta2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1beta2.ResourceClaim, err error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
ApplyStatus(ctx context.Context, resourceClaim *applyconfigurationsresourcev1beta2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1beta2.ResourceClaim, err error)
|
||||
ResourceClaimExpansion
|
||||
}
|
||||
|
||||
// resourceClaims implements ResourceClaimInterface
|
||||
type resourceClaims struct {
|
||||
*gentype.ClientWithListAndApply[*resourcev1beta2.ResourceClaim, *resourcev1beta2.ResourceClaimList, *applyconfigurationsresourcev1beta2.ResourceClaimApplyConfiguration]
|
||||
}
|
||||
|
||||
// newResourceClaims returns a ResourceClaims
|
||||
func newResourceClaims(c *ResourceV1beta2Client, namespace string) *resourceClaims {
|
||||
return &resourceClaims{
|
||||
gentype.NewClientWithListAndApply[*resourcev1beta2.ResourceClaim, *resourcev1beta2.ResourceClaimList, *applyconfigurationsresourcev1beta2.ResourceClaimApplyConfiguration](
|
||||
"resourceclaims",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *resourcev1beta2.ResourceClaim { return &resourcev1beta2.ResourceClaim{} },
|
||||
func() *resourcev1beta2.ResourceClaimList { return &resourcev1beta2.ResourceClaimList{} },
|
||||
gentype.PrefersProtobuf[*resourcev1beta2.ResourceClaim](),
|
||||
),
|
||||
}
|
||||
}
|
71
kubernetes/typed/resource/v1/resourceclaimtemplate.go
Normal file
71
kubernetes/typed/resource/v1/resourceclaimtemplate.go
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
resourcev1beta2 "k8s.io/api/resource/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
applyconfigurationsresourcev1beta2 "k8s.io/client-go/applyconfigurations/resource/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
|
||||
// ResourceClaimTemplatesGetter has a method to return a ResourceClaimTemplateInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ResourceClaimTemplatesGetter interface {
|
||||
ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface
|
||||
}
|
||||
|
||||
// ResourceClaimTemplateInterface has methods to work with ResourceClaimTemplate resources.
|
||||
type ResourceClaimTemplateInterface interface {
|
||||
Create(ctx context.Context, resourceClaimTemplate *resourcev1beta2.ResourceClaimTemplate, opts v1.CreateOptions) (*resourcev1beta2.ResourceClaimTemplate, error)
|
||||
Update(ctx context.Context, resourceClaimTemplate *resourcev1beta2.ResourceClaimTemplate, opts v1.UpdateOptions) (*resourcev1beta2.ResourceClaimTemplate, 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) (*resourcev1beta2.ResourceClaimTemplate, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*resourcev1beta2.ResourceClaimTemplateList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *resourcev1beta2.ResourceClaimTemplate, err error)
|
||||
Apply(ctx context.Context, resourceClaimTemplate *applyconfigurationsresourcev1beta2.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1beta2.ResourceClaimTemplate, err error)
|
||||
ResourceClaimTemplateExpansion
|
||||
}
|
||||
|
||||
// resourceClaimTemplates implements ResourceClaimTemplateInterface
|
||||
type resourceClaimTemplates struct {
|
||||
*gentype.ClientWithListAndApply[*resourcev1beta2.ResourceClaimTemplate, *resourcev1beta2.ResourceClaimTemplateList, *applyconfigurationsresourcev1beta2.ResourceClaimTemplateApplyConfiguration]
|
||||
}
|
||||
|
||||
// newResourceClaimTemplates returns a ResourceClaimTemplates
|
||||
func newResourceClaimTemplates(c *ResourceV1beta2Client, namespace string) *resourceClaimTemplates {
|
||||
return &resourceClaimTemplates{
|
||||
gentype.NewClientWithListAndApply[*resourcev1beta2.ResourceClaimTemplate, *resourcev1beta2.ResourceClaimTemplateList, *applyconfigurationsresourcev1beta2.ResourceClaimTemplateApplyConfiguration](
|
||||
"resourceclaimtemplates",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *resourcev1beta2.ResourceClaimTemplate { return &resourcev1beta2.ResourceClaimTemplate{} },
|
||||
func() *resourcev1beta2.ResourceClaimTemplateList { return &resourcev1beta2.ResourceClaimTemplateList{} },
|
||||
gentype.PrefersProtobuf[*resourcev1beta2.ResourceClaimTemplate](),
|
||||
),
|
||||
}
|
||||
}
|
71
kubernetes/typed/resource/v1/resourceslice.go
Normal file
71
kubernetes/typed/resource/v1/resourceslice.go
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
resourcev1beta2 "k8s.io/api/resource/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
applyconfigurationsresourcev1beta2 "k8s.io/client-go/applyconfigurations/resource/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
|
||||
// ResourceSlicesGetter has a method to return a ResourceSliceInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ResourceSlicesGetter interface {
|
||||
ResourceSlices() ResourceSliceInterface
|
||||
}
|
||||
|
||||
// ResourceSliceInterface has methods to work with ResourceSlice resources.
|
||||
type ResourceSliceInterface interface {
|
||||
Create(ctx context.Context, resourceSlice *resourcev1beta2.ResourceSlice, opts v1.CreateOptions) (*resourcev1beta2.ResourceSlice, error)
|
||||
Update(ctx context.Context, resourceSlice *resourcev1beta2.ResourceSlice, opts v1.UpdateOptions) (*resourcev1beta2.ResourceSlice, 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) (*resourcev1beta2.ResourceSlice, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*resourcev1beta2.ResourceSliceList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *resourcev1beta2.ResourceSlice, err error)
|
||||
Apply(ctx context.Context, resourceSlice *applyconfigurationsresourcev1beta2.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1beta2.ResourceSlice, err error)
|
||||
ResourceSliceExpansion
|
||||
}
|
||||
|
||||
// resourceSlices implements ResourceSliceInterface
|
||||
type resourceSlices struct {
|
||||
*gentype.ClientWithListAndApply[*resourcev1beta2.ResourceSlice, *resourcev1beta2.ResourceSliceList, *applyconfigurationsresourcev1beta2.ResourceSliceApplyConfiguration]
|
||||
}
|
||||
|
||||
// newResourceSlices returns a ResourceSlices
|
||||
func newResourceSlices(c *ResourceV1beta2Client) *resourceSlices {
|
||||
return &resourceSlices{
|
||||
gentype.NewClientWithListAndApply[*resourcev1beta2.ResourceSlice, *resourcev1beta2.ResourceSliceList, *applyconfigurationsresourcev1beta2.ResourceSliceApplyConfiguration](
|
||||
"resourceslices",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
"",
|
||||
func() *resourcev1beta2.ResourceSlice { return &resourcev1beta2.ResourceSlice{} },
|
||||
func() *resourcev1beta2.ResourceSliceList { return &resourcev1beta2.ResourceSliceList{} },
|
||||
gentype.PrefersProtobuf[*resourcev1beta2.ResourceSlice](),
|
||||
),
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user