k8s.io/client-go@v0.31.1/kubernetes/typed/resource/v1alpha3/resourceclaim.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 v1alpha3
    20  
    21  import (
    22  	"context"
    23  
    24  	v1alpha3 "k8s.io/api/resource/v1alpha3"
    25  	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    26  	types "k8s.io/apimachinery/pkg/types"
    27  	watch "k8s.io/apimachinery/pkg/watch"
    28  	resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
    29  	gentype "k8s.io/client-go/gentype"
    30  	scheme "k8s.io/client-go/kubernetes/scheme"
    31  )
    32  
    33  // ResourceClaimsGetter has a method to return a ResourceClaimInterface.
    34  // A group's client should implement this interface.
    35  type ResourceClaimsGetter interface {
    36  	ResourceClaims(namespace string) ResourceClaimInterface
    37  }
    38  
    39  // ResourceClaimInterface has methods to work with ResourceClaim resources.
    40  type ResourceClaimInterface interface {
    41  	Create(ctx context.Context, resourceClaim *v1alpha3.ResourceClaim, opts v1.CreateOptions) (*v1alpha3.ResourceClaim, error)
    42  	Update(ctx context.Context, resourceClaim *v1alpha3.ResourceClaim, opts v1.UpdateOptions) (*v1alpha3.ResourceClaim, error)
    43  	// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
    44  	UpdateStatus(ctx context.Context, resourceClaim *v1alpha3.ResourceClaim, opts v1.UpdateOptions) (*v1alpha3.ResourceClaim, error)
    45  	Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
    46  	DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
    47  	Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClaim, error)
    48  	List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClaimList, error)
    49  	Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
    50  	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClaim, err error)
    51  	Apply(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaim, err error)
    52  	// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
    53  	ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaim, err error)
    54  	ResourceClaimExpansion
    55  }
    56  
    57  // resourceClaims implements ResourceClaimInterface
    58  type resourceClaims struct {
    59  	*gentype.ClientWithListAndApply[*v1alpha3.ResourceClaim, *v1alpha3.ResourceClaimList, *resourcev1alpha3.ResourceClaimApplyConfiguration]
    60  }
    61  
    62  // newResourceClaims returns a ResourceClaims
    63  func newResourceClaims(c *ResourceV1alpha3Client, namespace string) *resourceClaims {
    64  	return &resourceClaims{
    65  		gentype.NewClientWithListAndApply[*v1alpha3.ResourceClaim, *v1alpha3.ResourceClaimList, *resourcev1alpha3.ResourceClaimApplyConfiguration](
    66  			"resourceclaims",
    67  			c.RESTClient(),
    68  			scheme.ParameterCodec,
    69  			namespace,
    70  			func() *v1alpha3.ResourceClaim { return &v1alpha3.ResourceClaim{} },
    71  			func() *v1alpha3.ResourceClaimList { return &v1alpha3.ResourceClaimList{} }),
    72  	}
    73  }