Debian Codegraph @

kubernetes/typed/scheduling/v1/priorityclass.go

raw symbols SCIP
1 /*
2 Copyright The Kubernetes Authors.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16
17 // Code generated by client-gen. DO NOT EDIT.
18
19 package v1
20
21 import (
22 context "context"
23
24 schedulingv1 "k8s.io/api/scheduling/v1"
25 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
26 types "k8s.io/apimachinery/pkg/types"
27 watch "k8s.io/apimachinery/pkg/watch"
28 applyconfigurationsschedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1"
29 gentype "k8s.io/client-go/gentype"
30 scheme "k8s.io/client-go/kubernetes/scheme"
31 )
32
33 // PriorityClassesGetter has a method to return a PriorityClassInterface.
34 // A group's client should implement this interface.
35 type PriorityClassesGetter interface {
36 PriorityClasses() PriorityClassInterface
37 }
38
39 // PriorityClassInterface has methods to work with PriorityClass resources.
40 type PriorityClassInterface interface {
41 Create(ctx context.Context, priorityClass *schedulingv1.PriorityClass, opts metav1.CreateOptions) (*schedulingv1.PriorityClass, error)
42 Update(ctx context.Context, priorityClass *schedulingv1.PriorityClass, opts metav1.UpdateOptions) (*schedulingv1.PriorityClass, error)
43 Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
44 DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
45 Get(ctx context.Context, name string, opts metav1.GetOptions) (*schedulingv1.PriorityClass, error)
46 List(ctx context.Context, opts metav1.ListOptions) (*schedulingv1.PriorityClassList, error)
47 Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
48 Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *schedulingv1.PriorityClass, err error)
49 Apply(ctx context.Context, priorityClass *applyconfigurationsschedulingv1.PriorityClassApplyConfiguration, opts metav1.ApplyOptions) (result *schedulingv1.PriorityClass, err error)
50 PriorityClassExpansion
51 }
52
53 // priorityClasses implements PriorityClassInterface
54 type priorityClasses struct {
55 *gentype.ClientWithListAndApply[*schedulingv1.PriorityClass, *schedulingv1.PriorityClassList, *applyconfigurationsschedulingv1.PriorityClassApplyConfiguration]
56 }
57
58 // newPriorityClasses returns a PriorityClasses
59 func newPriorityClasses(c *SchedulingV1Client) *priorityClasses {
60 return &priorityClasses{
61 gentype.NewClientWithListAndApply[*schedulingv1.PriorityClass, *schedulingv1.PriorityClassList, *applyconfigurationsschedulingv1.PriorityClassApplyConfiguration](
62 "priorityclasses",
63 c.RESTClient(),
64 scheme.ParameterCodec,
65 "",
66 func() *schedulingv1.PriorityClass { return &schedulingv1.PriorityClass{} },
67 func() *schedulingv1.PriorityClassList { return &schedulingv1.PriorityClassList{} },
68 gentype.PrefersProtobuf[*schedulingv1.PriorityClass](),
69 ),
70 }
71 }