| 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 | policyv1 "k8s.io/api/policy/v1" |
| 23 | gentype "k8s.io/client-go/gentype" |
| 24 | scheme "k8s.io/client-go/kubernetes/scheme" |
| 25 | ) |
| 26 | |
| 27 | // EvictionsGetter has a method to return a EvictionInterface. |
| 28 | // A group's client should implement this interface. |
| 29 | type EvictionsGetter interface { |
| 30 | Evictions(namespace string) EvictionInterface |
| 31 | } |
| 32 | |
| 33 | // EvictionInterface has methods to work with Eviction resources. |
| 34 | type EvictionInterface interface { |
| 35 | EvictionExpansion |
| 36 | } |
| 37 | |
| 38 | // evictions implements EvictionInterface |
| 39 | type evictions struct { |
| 40 | *gentype.Client[*policyv1.Eviction] |
| 41 | } |
| 42 | |
| 43 | // newEvictions returns a Evictions |
| 44 | func newEvictions(c *PolicyV1Client, namespace string) *evictions { |
| 45 | return &evictions{ |
| 46 | gentype.NewClient[*policyv1.Eviction]( |
| 47 | "evictions", |
| 48 | c.RESTClient(), |
| 49 | scheme.ParameterCodec, |
| 50 | namespace, |
| 51 | func() *policyv1.Eviction { return &policyv1.Eviction{} }, |
| 52 | gentype.PrefersProtobuf[*policyv1.Eviction](), |
| 53 | ), |
| 54 | } |
| 55 | } |