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

package v1

import (
	context "context"

	routev1 "github.com/openshift/api/route/v1"
	applyconfigurationsroutev1 "github.com/openshift/client-go/route/applyconfigurations/route/v1"
	scheme "github.com/openshift/client-go/route/clientset/versioned/scheme"
	metav1 "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"
)

// RoutesGetter has a method to return a RouteInterface.
// A group's client should implement this interface.
type RoutesGetter interface {
	Routes(namespace string) RouteInterface
}

// RouteInterface has methods to work with Route resources.
type RouteInterface interface {
	Create(ctx context.Context, route *routev1.Route, opts metav1.CreateOptions) (*routev1.Route, error)
	Update(ctx context.Context, route *routev1.Route, opts metav1.UpdateOptions) (*routev1.Route, error)
	// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
	UpdateStatus(ctx context.Context, route *routev1.Route, opts metav1.UpdateOptions) (*routev1.Route, error)
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
	DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Get(ctx context.Context, name string, opts metav1.GetOptions) (*routev1.Route, error)
	List(ctx context.Context, opts metav1.ListOptions) (*routev1.RouteList, error)
	Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *routev1.Route, err error)
	Apply(ctx context.Context, route *applyconfigurationsroutev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *routev1.Route, err error)
	// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
	ApplyStatus(ctx context.Context, route *applyconfigurationsroutev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *routev1.Route, err error)
	RouteExpansion
}

// routes implements RouteInterface
type routes struct {
	*gentype.ClientWithListAndApply[*routev1.Route, *routev1.RouteList, *applyconfigurationsroutev1.RouteApplyConfiguration]
}

// newRoutes returns a Routes
func newRoutes(c *RouteV1Client, namespace string) *routes {
	return &routes{
		gentype.NewClientWithListAndApply[*routev1.Route, *routev1.RouteList, *applyconfigurationsroutev1.RouteApplyConfiguration](
			"routes",
			c.RESTClient(),
			scheme.ParameterCodec,
			namespace,
			func() *routev1.Route { return &routev1.Route{} },
			func() *routev1.RouteList { return &routev1.RouteList{} },
		),
	}
}
