// Copyright (c) 2026 Tigera, Inc. All rights reserved.

// Code generated by client-gen. DO NOT EDIT.

package v3

import (
	context "context"

	projectcalicov3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
	applyconfigurationgeneratedprojectcalicov3 "github.com/projectcalico/api/pkg/client/applyconfiguration_generated/projectcalico/v3"
	scheme "github.com/projectcalico/api/pkg/client/clientset_generated/clientset/scheme"
	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"
)

// IPAMBlocksGetter has a method to return a IPAMBlockInterface.
// A group's client should implement this interface.
type IPAMBlocksGetter interface {
	IPAMBlocks() IPAMBlockInterface
}

// IPAMBlockInterface has methods to work with IPAMBlock resources.
type IPAMBlockInterface interface {
	Create(ctx context.Context, iPAMBlock *projectcalicov3.IPAMBlock, opts v1.CreateOptions) (*projectcalicov3.IPAMBlock, error)
	Update(ctx context.Context, iPAMBlock *projectcalicov3.IPAMBlock, opts v1.UpdateOptions) (*projectcalicov3.IPAMBlock, 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) (*projectcalicov3.IPAMBlock, error)
	List(ctx context.Context, opts v1.ListOptions) (*projectcalicov3.IPAMBlockList, 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 *projectcalicov3.IPAMBlock, err error)
	Apply(ctx context.Context, iPAMBlock *applyconfigurationgeneratedprojectcalicov3.IPAMBlockApplyConfiguration, opts v1.ApplyOptions) (result *projectcalicov3.IPAMBlock, err error)
	IPAMBlockExpansion
}

// iPAMBlocks implements IPAMBlockInterface
type iPAMBlocks struct {
	*gentype.ClientWithListAndApply[*projectcalicov3.IPAMBlock, *projectcalicov3.IPAMBlockList, *applyconfigurationgeneratedprojectcalicov3.IPAMBlockApplyConfiguration]
}

// newIPAMBlocks returns a IPAMBlocks
func newIPAMBlocks(c *ProjectcalicoV3Client) *iPAMBlocks {
	return &iPAMBlocks{
		gentype.NewClientWithListAndApply[*projectcalicov3.IPAMBlock, *projectcalicov3.IPAMBlockList, *applyconfigurationgeneratedprojectcalicov3.IPAMBlockApplyConfiguration](
			"ipamblocks",
			c.RESTClient(),
			scheme.ParameterCodec,
			"",
			func() *projectcalicov3.IPAMBlock { return &projectcalicov3.IPAMBlock{} },
			func() *projectcalicov3.IPAMBlockList { return &projectcalicov3.IPAMBlockList{} },
		),
	}
}
