// Copyright Contributors to the Open Cluster Management project
// Code generated by client-gen. DO NOT EDIT.

package v1alpha1

import (
	context "context"

	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	types "k8s.io/apimachinery/pkg/types"
	watch "k8s.io/apimachinery/pkg/watch"
	gentype "k8s.io/client-go/gentype"
	addonv1alpha1 "open-cluster-management.io/api/addon/v1alpha1"
	scheme "open-cluster-management.io/api/client/addon/clientset/versioned/scheme"
)

// ManagedClusterAddOnsGetter has a method to return a ManagedClusterAddOnInterface.
// A group's client should implement this interface.
type ManagedClusterAddOnsGetter interface {
	ManagedClusterAddOns(namespace string) ManagedClusterAddOnInterface
}

// ManagedClusterAddOnInterface has methods to work with ManagedClusterAddOn resources.
type ManagedClusterAddOnInterface interface {
	Create(ctx context.Context, managedClusterAddOn *addonv1alpha1.ManagedClusterAddOn, opts v1.CreateOptions) (*addonv1alpha1.ManagedClusterAddOn, error)
	Update(ctx context.Context, managedClusterAddOn *addonv1alpha1.ManagedClusterAddOn, opts v1.UpdateOptions) (*addonv1alpha1.ManagedClusterAddOn, error)
	// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
	UpdateStatus(ctx context.Context, managedClusterAddOn *addonv1alpha1.ManagedClusterAddOn, opts v1.UpdateOptions) (*addonv1alpha1.ManagedClusterAddOn, error)
	Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
	DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
	Get(ctx context.Context, name string, opts v1.GetOptions) (*addonv1alpha1.ManagedClusterAddOn, error)
	List(ctx context.Context, opts v1.ListOptions) (*addonv1alpha1.ManagedClusterAddOnList, error)
	Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *addonv1alpha1.ManagedClusterAddOn, err error)
	ManagedClusterAddOnExpansion
}

// managedClusterAddOns implements ManagedClusterAddOnInterface
type managedClusterAddOns struct {
	*gentype.ClientWithList[*addonv1alpha1.ManagedClusterAddOn, *addonv1alpha1.ManagedClusterAddOnList]
}

// newManagedClusterAddOns returns a ManagedClusterAddOns
func newManagedClusterAddOns(c *AddonV1alpha1Client, namespace string) *managedClusterAddOns {
	return &managedClusterAddOns{
		gentype.NewClientWithList[*addonv1alpha1.ManagedClusterAddOn, *addonv1alpha1.ManagedClusterAddOnList](
			"managedclusteraddons",
			c.RESTClient(),
			scheme.ParameterCodec,
			namespace,
			func() *addonv1alpha1.ManagedClusterAddOn { return &addonv1alpha1.ManagedClusterAddOn{} },
			func() *addonv1alpha1.ManagedClusterAddOnList { return &addonv1alpha1.ManagedClusterAddOnList{} },
		),
	}
}
