k8s.io/client-go@v0.31.1/kubernetes/typed/node/v1alpha1/runtimeclass.go (about)

     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 v1alpha1
    20  
    21  import (
    22  	"context"
    23  
    24  	v1alpha1 "k8s.io/api/node/v1alpha1"
    25  	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    26  	types "k8s.io/apimachinery/pkg/types"
    27  	watch "k8s.io/apimachinery/pkg/watch"
    28  	nodev1alpha1 "k8s.io/client-go/applyconfigurations/node/v1alpha1"
    29  	gentype "k8s.io/client-go/gentype"
    30  	scheme "k8s.io/client-go/kubernetes/scheme"
    31  )
    32  
    33  // RuntimeClassesGetter has a method to return a RuntimeClassInterface.
    34  // A group's client should implement this interface.
    35  type RuntimeClassesGetter interface {
    36  	RuntimeClasses() RuntimeClassInterface
    37  }
    38  
    39  // RuntimeClassInterface has methods to work with RuntimeClass resources.
    40  type RuntimeClassInterface interface {
    41  	Create(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.CreateOptions) (*v1alpha1.RuntimeClass, error)
    42  	Update(ctx context.Context, runtimeClass *v1alpha1.RuntimeClass, opts v1.UpdateOptions) (*v1alpha1.RuntimeClass, error)
    43  	Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
    44  	DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
    45  	Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.RuntimeClass, error)
    46  	List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RuntimeClassList, error)
    47  	Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
    48  	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RuntimeClass, err error)
    49  	Apply(ctx context.Context, runtimeClass *nodev1alpha1.RuntimeClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.RuntimeClass, err error)
    50  	RuntimeClassExpansion
    51  }
    52  
    53  // runtimeClasses implements RuntimeClassInterface
    54  type runtimeClasses struct {
    55  	*gentype.ClientWithListAndApply[*v1alpha1.RuntimeClass, *v1alpha1.RuntimeClassList, *nodev1alpha1.RuntimeClassApplyConfiguration]
    56  }
    57  
    58  // newRuntimeClasses returns a RuntimeClasses
    59  func newRuntimeClasses(c *NodeV1alpha1Client) *runtimeClasses {
    60  	return &runtimeClasses{
    61  		gentype.NewClientWithListAndApply[*v1alpha1.RuntimeClass, *v1alpha1.RuntimeClassList, *nodev1alpha1.RuntimeClassApplyConfiguration](
    62  			"runtimeclasses",
    63  			c.RESTClient(),
    64  			scheme.ParameterCodec,
    65  			"",
    66  			func() *v1alpha1.RuntimeClass { return &v1alpha1.RuntimeClass{} },
    67  			func() *v1alpha1.RuntimeClassList { return &v1alpha1.RuntimeClassList{} }),
    68  	}
    69  }