k8s.io/client-go@v0.31.1/kubernetes/typed/storage/v1/volumeattachment.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 v1 20 21 import ( 22 "context" 23 24 v1 "k8s.io/api/storage/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 storagev1 "k8s.io/client-go/applyconfigurations/storage/v1" 29 gentype "k8s.io/client-go/gentype" 30 scheme "k8s.io/client-go/kubernetes/scheme" 31 ) 32 33 // VolumeAttachmentsGetter has a method to return a VolumeAttachmentInterface. 34 // A group's client should implement this interface. 35 type VolumeAttachmentsGetter interface { 36 VolumeAttachments() VolumeAttachmentInterface 37 } 38 39 // VolumeAttachmentInterface has methods to work with VolumeAttachment resources. 40 type VolumeAttachmentInterface interface { 41 Create(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.CreateOptions) (*v1.VolumeAttachment, error) 42 Update(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (*v1.VolumeAttachment, error) 43 // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). 44 UpdateStatus(ctx context.Context, volumeAttachment *v1.VolumeAttachment, opts metav1.UpdateOptions) (*v1.VolumeAttachment, error) 45 Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error 46 DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error 47 Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VolumeAttachment, error) 48 List(ctx context.Context, opts metav1.ListOptions) (*v1.VolumeAttachmentList, error) 49 Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) 50 Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VolumeAttachment, err error) 51 Apply(ctx context.Context, volumeAttachment *storagev1.VolumeAttachmentApplyConfiguration, opts metav1.ApplyOptions) (result *v1.VolumeAttachment, err error) 52 // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). 53 ApplyStatus(ctx context.Context, volumeAttachment *storagev1.VolumeAttachmentApplyConfiguration, opts metav1.ApplyOptions) (result *v1.VolumeAttachment, err error) 54 VolumeAttachmentExpansion 55 } 56 57 // volumeAttachments implements VolumeAttachmentInterface 58 type volumeAttachments struct { 59 *gentype.ClientWithListAndApply[*v1.VolumeAttachment, *v1.VolumeAttachmentList, *storagev1.VolumeAttachmentApplyConfiguration] 60 } 61 62 // newVolumeAttachments returns a VolumeAttachments 63 func newVolumeAttachments(c *StorageV1Client) *volumeAttachments { 64 return &volumeAttachments{ 65 gentype.NewClientWithListAndApply[*v1.VolumeAttachment, *v1.VolumeAttachmentList, *storagev1.VolumeAttachmentApplyConfiguration]( 66 "volumeattachments", 67 c.RESTClient(), 68 scheme.ParameterCodec, 69 "", 70 func() *v1.VolumeAttachment { return &v1.VolumeAttachment{} }, 71 func() *v1.VolumeAttachmentList { return &v1.VolumeAttachmentList{} }), 72 } 73 }