// Copyright 2025 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

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

package v1beta2

import (
	context "context"

	controlplanev1beta2 "antrea.io/antrea/pkg/apis/controlplane/v1beta2"
	scheme "antrea.io/antrea/pkg/client/clientset/versioned/scheme"
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	watch "k8s.io/apimachinery/pkg/watch"
	gentype "k8s.io/client-go/gentype"
)

// NetworkPoliciesGetter has a method to return a NetworkPolicyInterface.
// A group's client should implement this interface.
type NetworkPoliciesGetter interface {
	NetworkPolicies() NetworkPolicyInterface
}

// NetworkPolicyInterface has methods to work with NetworkPolicy resources.
type NetworkPolicyInterface interface {
	Get(ctx context.Context, name string, opts v1.GetOptions) (*controlplanev1beta2.NetworkPolicy, error)
	List(ctx context.Context, opts v1.ListOptions) (*controlplanev1beta2.NetworkPolicyList, error)
	Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
	NetworkPolicyExpansion
}

// networkPolicies implements NetworkPolicyInterface
type networkPolicies struct {
	*gentype.ClientWithList[*controlplanev1beta2.NetworkPolicy, *controlplanev1beta2.NetworkPolicyList]
}

// newNetworkPolicies returns a NetworkPolicies
func newNetworkPolicies(c *ControlplaneV1beta2Client) *networkPolicies {
	return &networkPolicies{
		gentype.NewClientWithList[*controlplanev1beta2.NetworkPolicy, *controlplanev1beta2.NetworkPolicyList](
			"networkpolicies",
			c.RESTClient(),
			scheme.ParameterCodec,
			"",
			func() *controlplanev1beta2.NetworkPolicy { return &controlplanev1beta2.NetworkPolicy{} },
			func() *controlplanev1beta2.NetworkPolicyList { return &controlplanev1beta2.NetworkPolicyList{} },
		),
	}
}
