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

package v1beta1

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"
	scheme "open-cluster-management.io/api/client/cluster/clientset/versioned/scheme"
	clusterv1beta1 "open-cluster-management.io/api/cluster/v1beta1"
)

// PlacementsGetter has a method to return a PlacementInterface.
// A group's client should implement this interface.
type PlacementsGetter interface {
	Placements(namespace string) PlacementInterface
}

// PlacementInterface has methods to work with Placement resources.
type PlacementInterface interface {
	Create(ctx context.Context, placement *clusterv1beta1.Placement, opts v1.CreateOptions) (*clusterv1beta1.Placement, error)
	Update(ctx context.Context, placement *clusterv1beta1.Placement, opts v1.UpdateOptions) (*clusterv1beta1.Placement, error)
	// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
	UpdateStatus(ctx context.Context, placement *clusterv1beta1.Placement, opts v1.UpdateOptions) (*clusterv1beta1.Placement, 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) (*clusterv1beta1.Placement, error)
	List(ctx context.Context, opts v1.ListOptions) (*clusterv1beta1.PlacementList, 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 *clusterv1beta1.Placement, err error)
	PlacementExpansion
}

// placements implements PlacementInterface
type placements struct {
	*gentype.ClientWithList[*clusterv1beta1.Placement, *clusterv1beta1.PlacementList]
}

// newPlacements returns a Placements
func newPlacements(c *ClusterV1beta1Client, namespace string) *placements {
	return &placements{
		gentype.NewClientWithList[*clusterv1beta1.Placement, *clusterv1beta1.PlacementList](
			"placements",
			c.RESTClient(),
			scheme.ParameterCodec,
			namespace,
			func() *clusterv1beta1.Placement { return &clusterv1beta1.Placement{} },
			func() *clusterv1beta1.PlacementList { return &clusterv1beta1.PlacementList{} },
		),
	}
}
