// CatalogService -- platform-managed provider and model registry.
//
// The catalog is the authoritative source of truth for AI providers
// (OpenAI, Anthropic, AWS Bedrock, ...) and the models each provider
// exposes. Every model name that appears in an inference request or a
// billing record resolves against this catalog.
//
// Write surface (UpsertProvider, UpsertModel, SetProviderCredential,
// DeleteProvider, DeleteModel) mirrors the IA reference shape. Project
// <-> model assignment lives on this same service as a project view of
// the catalog -- IA does not define these RPCs and fraser's existing
// admin.v1 surface owns the underlying repositories that we reuse.

// Code generated by protoc-gen-connect-go. DO NOT EDIT.
//
// Source: tars/catalog/v1/catalog.proto

package catalogv1connect

import (
	connect "connectrpc.com/connect"
	context "context"
	errors "errors"
	v1 "github.com/tetrateio/agentrouter-go/genapi/api/tars/catalog/v1"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
	http "net/http"
	strings "strings"
)

// This is a compile-time assertion to ensure that this generated file and the connect package are
// compatible. If you get a compiler error that this constant is not defined, this code was
// generated with a version of connect newer than the one compiled into your binary. You can fix the
// problem by either regenerating this code with an older version of connect or updating the connect
// version compiled into your binary.
const _ = connect.IsAtLeastVersion1_13_0

const (
	// CatalogServiceName is the fully-qualified name of the CatalogService service.
	CatalogServiceName = "tars.catalog.v1.CatalogService"
)

// These constants are the fully-qualified names of the RPCs defined in this package. They're
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
//
// Note that these are different from the fully-qualified method names used by
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
// period.
const (
	// CatalogServiceListProvidersProcedure is the fully-qualified name of the CatalogService's
	// ListProviders RPC.
	CatalogServiceListProvidersProcedure = "/tars.catalog.v1.CatalogService/ListProviders"
	// CatalogServiceGetProviderProcedure is the fully-qualified name of the CatalogService's
	// GetProvider RPC.
	CatalogServiceGetProviderProcedure = "/tars.catalog.v1.CatalogService/GetProvider"
	// CatalogServiceListModelsProcedure is the fully-qualified name of the CatalogService's ListModels
	// RPC.
	CatalogServiceListModelsProcedure = "/tars.catalog.v1.CatalogService/ListModels"
	// CatalogServiceGetModelProcedure is the fully-qualified name of the CatalogService's GetModel RPC.
	CatalogServiceGetModelProcedure = "/tars.catalog.v1.CatalogService/GetModel"
	// CatalogServiceUpsertProviderProcedure is the fully-qualified name of the CatalogService's
	// UpsertProvider RPC.
	CatalogServiceUpsertProviderProcedure = "/tars.catalog.v1.CatalogService/UpsertProvider"
	// CatalogServiceUpsertModelProcedure is the fully-qualified name of the CatalogService's
	// UpsertModel RPC.
	CatalogServiceUpsertModelProcedure = "/tars.catalog.v1.CatalogService/UpsertModel"
	// CatalogServiceSetProviderCredentialProcedure is the fully-qualified name of the CatalogService's
	// SetProviderCredential RPC.
	CatalogServiceSetProviderCredentialProcedure = "/tars.catalog.v1.CatalogService/SetProviderCredential"
	// CatalogServiceDeleteProviderProcedure is the fully-qualified name of the CatalogService's
	// DeleteProvider RPC.
	CatalogServiceDeleteProviderProcedure = "/tars.catalog.v1.CatalogService/DeleteProvider"
	// CatalogServiceDeleteModelProcedure is the fully-qualified name of the CatalogService's
	// DeleteModel RPC.
	CatalogServiceDeleteModelProcedure = "/tars.catalog.v1.CatalogService/DeleteModel"
	// CatalogServiceAssignModelToProjectProcedure is the fully-qualified name of the CatalogService's
	// AssignModelToProject RPC.
	CatalogServiceAssignModelToProjectProcedure = "/tars.catalog.v1.CatalogService/AssignModelToProject"
	// CatalogServiceListProjectModelsProcedure is the fully-qualified name of the CatalogService's
	// ListProjectModels RPC.
	CatalogServiceListProjectModelsProcedure = "/tars.catalog.v1.CatalogService/ListProjectModels"
	// CatalogServiceUnassignModelFromProjectProcedure is the fully-qualified name of the
	// CatalogService's UnassignModelFromProject RPC.
	CatalogServiceUnassignModelFromProjectProcedure = "/tars.catalog.v1.CatalogService/UnassignModelFromProject"
)

// CatalogServiceClient is a client for the tars.catalog.v1.CatalogService service.
type CatalogServiceClient interface {
	// ListProviders returns all registered AI providers. Supports
	// cursor-based pagination via page_size and page_token.
	ListProviders(context.Context, *connect.Request[v1.ListProvidersRequest]) (*connect.Response[v1.ListProvidersResponse], error)
	// GetProvider returns a single provider by id.
	GetProvider(context.Context, *connect.Request[v1.GetProviderRequest]) (*connect.Response[v1.GetProviderResponse], error)
	// ListModels returns catalog models, optionally filtered to a single
	// provider via the provider_id query parameter.
	ListModels(context.Context, *connect.Request[v1.ListModelsRequest]) (*connect.Response[v1.ListModelsResponse], error)
	// GetModel returns a single model by id (UUID) or by unique model name,
	// including its pricing, context window, and capabilities.
	GetModel(context.Context, *connect.Request[v1.GetModelRequest]) (*connect.Response[v1.GetModelResponse], error)
	// UpsertProvider creates or fully replaces a provider record.
	UpsertProvider(context.Context, *connect.Request[v1.UpsertProviderRequest]) (*connect.Response[v1.Provider], error)
	// UpsertModel creates or fully replaces a model record.
	UpsertModel(context.Context, *connect.Request[v1.UpsertModelRequest]) (*connect.Response[v1.Model], error)
	// SetProviderCredential stores or rotates the credential used to
	// authenticate requests to this provider. The plaintext is never
	// returned; the provider's credential_suffix reflects the last 4
	// characters.
	SetProviderCredential(context.Context, *connect.Request[v1.SetProviderCredentialRequest]) (*connect.Response[v1.Provider], error)
	// DeleteProvider removes a provider. Refuses while any model still
	// references it.
	DeleteProvider(context.Context, *connect.Request[v1.DeleteProviderRequest]) (*connect.Response[emptypb.Empty], error)
	// DeleteModel removes a model entry.
	DeleteModel(context.Context, *connect.Request[v1.DeleteModelRequest]) (*connect.Response[emptypb.Empty], error)
	// AssignModelToProject grants a project access to a catalog model.
	// Idempotent: re-assigning a model is a no-op.
	AssignModelToProject(context.Context, *connect.Request[v1.AssignModelToProjectRequest]) (*connect.Response[v1.AssignModelToProjectResponse], error)
	// ListProjectModels returns every catalog model assigned to a project.
	ListProjectModels(context.Context, *connect.Request[v1.ListProjectModelsRequest]) (*connect.Response[v1.ListProjectModelsResponse], error)
	// UnassignModelFromProject removes a project's access to a catalog model.
	UnassignModelFromProject(context.Context, *connect.Request[v1.UnassignModelFromProjectRequest]) (*connect.Response[v1.UnassignModelFromProjectResponse], error)
}

// NewCatalogServiceClient constructs a client for the tars.catalog.v1.CatalogService service. By
// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
// connect.WithGRPC() or connect.WithGRPCWeb() options.
//
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
// http://api.acme.com or https://acme.com/grpc).
func NewCatalogServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) CatalogServiceClient {
	baseURL = strings.TrimRight(baseURL, "/")
	catalogServiceMethods := v1.File_tars_catalog_v1_catalog_proto.Services().ByName("CatalogService").Methods()
	return &catalogServiceClient{
		listProviders: connect.NewClient[v1.ListProvidersRequest, v1.ListProvidersResponse](
			httpClient,
			baseURL+CatalogServiceListProvidersProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("ListProviders")),
			connect.WithIdempotency(connect.IdempotencyNoSideEffects),
			connect.WithClientOptions(opts...),
		),
		getProvider: connect.NewClient[v1.GetProviderRequest, v1.GetProviderResponse](
			httpClient,
			baseURL+CatalogServiceGetProviderProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("GetProvider")),
			connect.WithIdempotency(connect.IdempotencyNoSideEffects),
			connect.WithClientOptions(opts...),
		),
		listModels: connect.NewClient[v1.ListModelsRequest, v1.ListModelsResponse](
			httpClient,
			baseURL+CatalogServiceListModelsProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("ListModels")),
			connect.WithIdempotency(connect.IdempotencyNoSideEffects),
			connect.WithClientOptions(opts...),
		),
		getModel: connect.NewClient[v1.GetModelRequest, v1.GetModelResponse](
			httpClient,
			baseURL+CatalogServiceGetModelProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("GetModel")),
			connect.WithIdempotency(connect.IdempotencyNoSideEffects),
			connect.WithClientOptions(opts...),
		),
		upsertProvider: connect.NewClient[v1.UpsertProviderRequest, v1.Provider](
			httpClient,
			baseURL+CatalogServiceUpsertProviderProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("UpsertProvider")),
			connect.WithClientOptions(opts...),
		),
		upsertModel: connect.NewClient[v1.UpsertModelRequest, v1.Model](
			httpClient,
			baseURL+CatalogServiceUpsertModelProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("UpsertModel")),
			connect.WithClientOptions(opts...),
		),
		setProviderCredential: connect.NewClient[v1.SetProviderCredentialRequest, v1.Provider](
			httpClient,
			baseURL+CatalogServiceSetProviderCredentialProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("SetProviderCredential")),
			connect.WithClientOptions(opts...),
		),
		deleteProvider: connect.NewClient[v1.DeleteProviderRequest, emptypb.Empty](
			httpClient,
			baseURL+CatalogServiceDeleteProviderProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("DeleteProvider")),
			connect.WithClientOptions(opts...),
		),
		deleteModel: connect.NewClient[v1.DeleteModelRequest, emptypb.Empty](
			httpClient,
			baseURL+CatalogServiceDeleteModelProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("DeleteModel")),
			connect.WithClientOptions(opts...),
		),
		assignModelToProject: connect.NewClient[v1.AssignModelToProjectRequest, v1.AssignModelToProjectResponse](
			httpClient,
			baseURL+CatalogServiceAssignModelToProjectProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("AssignModelToProject")),
			connect.WithClientOptions(opts...),
		),
		listProjectModels: connect.NewClient[v1.ListProjectModelsRequest, v1.ListProjectModelsResponse](
			httpClient,
			baseURL+CatalogServiceListProjectModelsProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("ListProjectModels")),
			connect.WithIdempotency(connect.IdempotencyNoSideEffects),
			connect.WithClientOptions(opts...),
		),
		unassignModelFromProject: connect.NewClient[v1.UnassignModelFromProjectRequest, v1.UnassignModelFromProjectResponse](
			httpClient,
			baseURL+CatalogServiceUnassignModelFromProjectProcedure,
			connect.WithSchema(catalogServiceMethods.ByName("UnassignModelFromProject")),
			connect.WithClientOptions(opts...),
		),
	}
}

// catalogServiceClient implements CatalogServiceClient.
type catalogServiceClient struct {
	listProviders            *connect.Client[v1.ListProvidersRequest, v1.ListProvidersResponse]
	getProvider              *connect.Client[v1.GetProviderRequest, v1.GetProviderResponse]
	listModels               *connect.Client[v1.ListModelsRequest, v1.ListModelsResponse]
	getModel                 *connect.Client[v1.GetModelRequest, v1.GetModelResponse]
	upsertProvider           *connect.Client[v1.UpsertProviderRequest, v1.Provider]
	upsertModel              *connect.Client[v1.UpsertModelRequest, v1.Model]
	setProviderCredential    *connect.Client[v1.SetProviderCredentialRequest, v1.Provider]
	deleteProvider           *connect.Client[v1.DeleteProviderRequest, emptypb.Empty]
	deleteModel              *connect.Client[v1.DeleteModelRequest, emptypb.Empty]
	assignModelToProject     *connect.Client[v1.AssignModelToProjectRequest, v1.AssignModelToProjectResponse]
	listProjectModels        *connect.Client[v1.ListProjectModelsRequest, v1.ListProjectModelsResponse]
	unassignModelFromProject *connect.Client[v1.UnassignModelFromProjectRequest, v1.UnassignModelFromProjectResponse]
}

// ListProviders calls tars.catalog.v1.CatalogService.ListProviders.
func (c *catalogServiceClient) ListProviders(ctx context.Context, req *connect.Request[v1.ListProvidersRequest]) (*connect.Response[v1.ListProvidersResponse], error) {
	return c.listProviders.CallUnary(ctx, req)
}

// GetProvider calls tars.catalog.v1.CatalogService.GetProvider.
func (c *catalogServiceClient) GetProvider(ctx context.Context, req *connect.Request[v1.GetProviderRequest]) (*connect.Response[v1.GetProviderResponse], error) {
	return c.getProvider.CallUnary(ctx, req)
}

// ListModels calls tars.catalog.v1.CatalogService.ListModels.
func (c *catalogServiceClient) ListModels(ctx context.Context, req *connect.Request[v1.ListModelsRequest]) (*connect.Response[v1.ListModelsResponse], error) {
	return c.listModels.CallUnary(ctx, req)
}

// GetModel calls tars.catalog.v1.CatalogService.GetModel.
func (c *catalogServiceClient) GetModel(ctx context.Context, req *connect.Request[v1.GetModelRequest]) (*connect.Response[v1.GetModelResponse], error) {
	return c.getModel.CallUnary(ctx, req)
}

// UpsertProvider calls tars.catalog.v1.CatalogService.UpsertProvider.
func (c *catalogServiceClient) UpsertProvider(ctx context.Context, req *connect.Request[v1.UpsertProviderRequest]) (*connect.Response[v1.Provider], error) {
	return c.upsertProvider.CallUnary(ctx, req)
}

// UpsertModel calls tars.catalog.v1.CatalogService.UpsertModel.
func (c *catalogServiceClient) UpsertModel(ctx context.Context, req *connect.Request[v1.UpsertModelRequest]) (*connect.Response[v1.Model], error) {
	return c.upsertModel.CallUnary(ctx, req)
}

// SetProviderCredential calls tars.catalog.v1.CatalogService.SetProviderCredential.
func (c *catalogServiceClient) SetProviderCredential(ctx context.Context, req *connect.Request[v1.SetProviderCredentialRequest]) (*connect.Response[v1.Provider], error) {
	return c.setProviderCredential.CallUnary(ctx, req)
}

// DeleteProvider calls tars.catalog.v1.CatalogService.DeleteProvider.
func (c *catalogServiceClient) DeleteProvider(ctx context.Context, req *connect.Request[v1.DeleteProviderRequest]) (*connect.Response[emptypb.Empty], error) {
	return c.deleteProvider.CallUnary(ctx, req)
}

// DeleteModel calls tars.catalog.v1.CatalogService.DeleteModel.
func (c *catalogServiceClient) DeleteModel(ctx context.Context, req *connect.Request[v1.DeleteModelRequest]) (*connect.Response[emptypb.Empty], error) {
	return c.deleteModel.CallUnary(ctx, req)
}

// AssignModelToProject calls tars.catalog.v1.CatalogService.AssignModelToProject.
func (c *catalogServiceClient) AssignModelToProject(ctx context.Context, req *connect.Request[v1.AssignModelToProjectRequest]) (*connect.Response[v1.AssignModelToProjectResponse], error) {
	return c.assignModelToProject.CallUnary(ctx, req)
}

// ListProjectModels calls tars.catalog.v1.CatalogService.ListProjectModels.
func (c *catalogServiceClient) ListProjectModels(ctx context.Context, req *connect.Request[v1.ListProjectModelsRequest]) (*connect.Response[v1.ListProjectModelsResponse], error) {
	return c.listProjectModels.CallUnary(ctx, req)
}

// UnassignModelFromProject calls tars.catalog.v1.CatalogService.UnassignModelFromProject.
func (c *catalogServiceClient) UnassignModelFromProject(ctx context.Context, req *connect.Request[v1.UnassignModelFromProjectRequest]) (*connect.Response[v1.UnassignModelFromProjectResponse], error) {
	return c.unassignModelFromProject.CallUnary(ctx, req)
}

// CatalogServiceHandler is an implementation of the tars.catalog.v1.CatalogService service.
type CatalogServiceHandler interface {
	// ListProviders returns all registered AI providers. Supports
	// cursor-based pagination via page_size and page_token.
	ListProviders(context.Context, *connect.Request[v1.ListProvidersRequest]) (*connect.Response[v1.ListProvidersResponse], error)
	// GetProvider returns a single provider by id.
	GetProvider(context.Context, *connect.Request[v1.GetProviderRequest]) (*connect.Response[v1.GetProviderResponse], error)
	// ListModels returns catalog models, optionally filtered to a single
	// provider via the provider_id query parameter.
	ListModels(context.Context, *connect.Request[v1.ListModelsRequest]) (*connect.Response[v1.ListModelsResponse], error)
	// GetModel returns a single model by id (UUID) or by unique model name,
	// including its pricing, context window, and capabilities.
	GetModel(context.Context, *connect.Request[v1.GetModelRequest]) (*connect.Response[v1.GetModelResponse], error)
	// UpsertProvider creates or fully replaces a provider record.
	UpsertProvider(context.Context, *connect.Request[v1.UpsertProviderRequest]) (*connect.Response[v1.Provider], error)
	// UpsertModel creates or fully replaces a model record.
	UpsertModel(context.Context, *connect.Request[v1.UpsertModelRequest]) (*connect.Response[v1.Model], error)
	// SetProviderCredential stores or rotates the credential used to
	// authenticate requests to this provider. The plaintext is never
	// returned; the provider's credential_suffix reflects the last 4
	// characters.
	SetProviderCredential(context.Context, *connect.Request[v1.SetProviderCredentialRequest]) (*connect.Response[v1.Provider], error)
	// DeleteProvider removes a provider. Refuses while any model still
	// references it.
	DeleteProvider(context.Context, *connect.Request[v1.DeleteProviderRequest]) (*connect.Response[emptypb.Empty], error)
	// DeleteModel removes a model entry.
	DeleteModel(context.Context, *connect.Request[v1.DeleteModelRequest]) (*connect.Response[emptypb.Empty], error)
	// AssignModelToProject grants a project access to a catalog model.
	// Idempotent: re-assigning a model is a no-op.
	AssignModelToProject(context.Context, *connect.Request[v1.AssignModelToProjectRequest]) (*connect.Response[v1.AssignModelToProjectResponse], error)
	// ListProjectModels returns every catalog model assigned to a project.
	ListProjectModels(context.Context, *connect.Request[v1.ListProjectModelsRequest]) (*connect.Response[v1.ListProjectModelsResponse], error)
	// UnassignModelFromProject removes a project's access to a catalog model.
	UnassignModelFromProject(context.Context, *connect.Request[v1.UnassignModelFromProjectRequest]) (*connect.Response[v1.UnassignModelFromProjectResponse], error)
}

// NewCatalogServiceHandler builds an HTTP handler from the service implementation. It returns the
// path on which to mount the handler and the handler itself.
//
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
// and JSON codecs. They also support gzip compression.
func NewCatalogServiceHandler(svc CatalogServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
	catalogServiceMethods := v1.File_tars_catalog_v1_catalog_proto.Services().ByName("CatalogService").Methods()
	catalogServiceListProvidersHandler := connect.NewUnaryHandler(
		CatalogServiceListProvidersProcedure,
		svc.ListProviders,
		connect.WithSchema(catalogServiceMethods.ByName("ListProviders")),
		connect.WithIdempotency(connect.IdempotencyNoSideEffects),
		connect.WithHandlerOptions(opts...),
	)
	catalogServiceGetProviderHandler := connect.NewUnaryHandler(
		CatalogServiceGetProviderProcedure,
		svc.GetProvider,
		connect.WithSchema(catalogServiceMethods.ByName("GetProvider")),
		connect.WithIdempotency(connect.IdempotencyNoSideEffects),
		connect.WithHandlerOptions(opts...),
	)
	catalogServiceListModelsHandler := connect.NewUnaryHandler(
		CatalogServiceListModelsProcedure,
		svc.ListModels,
		connect.WithSchema(catalogServiceMethods.ByName("ListModels")),
		connect.WithIdempotency(connect.IdempotencyNoSideEffects),
		connect.WithHandlerOptions(opts...),
	)
	catalogServiceGetModelHandler := connect.NewUnaryHandler(
		CatalogServiceGetModelProcedure,
		svc.GetModel,
		connect.WithSchema(catalogServiceMethods.ByName("GetModel")),
		connect.WithIdempotency(connect.IdempotencyNoSideEffects),
		connect.WithHandlerOptions(opts...),
	)
	catalogServiceUpsertProviderHandler := connect.NewUnaryHandler(
		CatalogServiceUpsertProviderProcedure,
		svc.UpsertProvider,
		connect.WithSchema(catalogServiceMethods.ByName("UpsertProvider")),
		connect.WithHandlerOptions(opts...),
	)
	catalogServiceUpsertModelHandler := connect.NewUnaryHandler(
		CatalogServiceUpsertModelProcedure,
		svc.UpsertModel,
		connect.WithSchema(catalogServiceMethods.ByName("UpsertModel")),
		connect.WithHandlerOptions(opts...),
	)
	catalogServiceSetProviderCredentialHandler := connect.NewUnaryHandler(
		CatalogServiceSetProviderCredentialProcedure,
		svc.SetProviderCredential,
		connect.WithSchema(catalogServiceMethods.ByName("SetProviderCredential")),
		connect.WithHandlerOptions(opts...),
	)
	catalogServiceDeleteProviderHandler := connect.NewUnaryHandler(
		CatalogServiceDeleteProviderProcedure,
		svc.DeleteProvider,
		connect.WithSchema(catalogServiceMethods.ByName("DeleteProvider")),
		connect.WithHandlerOptions(opts...),
	)
	catalogServiceDeleteModelHandler := connect.NewUnaryHandler(
		CatalogServiceDeleteModelProcedure,
		svc.DeleteModel,
		connect.WithSchema(catalogServiceMethods.ByName("DeleteModel")),
		connect.WithHandlerOptions(opts...),
	)
	catalogServiceAssignModelToProjectHandler := connect.NewUnaryHandler(
		CatalogServiceAssignModelToProjectProcedure,
		svc.AssignModelToProject,
		connect.WithSchema(catalogServiceMethods.ByName("AssignModelToProject")),
		connect.WithHandlerOptions(opts...),
	)
	catalogServiceListProjectModelsHandler := connect.NewUnaryHandler(
		CatalogServiceListProjectModelsProcedure,
		svc.ListProjectModels,
		connect.WithSchema(catalogServiceMethods.ByName("ListProjectModels")),
		connect.WithIdempotency(connect.IdempotencyNoSideEffects),
		connect.WithHandlerOptions(opts...),
	)
	catalogServiceUnassignModelFromProjectHandler := connect.NewUnaryHandler(
		CatalogServiceUnassignModelFromProjectProcedure,
		svc.UnassignModelFromProject,
		connect.WithSchema(catalogServiceMethods.ByName("UnassignModelFromProject")),
		connect.WithHandlerOptions(opts...),
	)
	return "/tars.catalog.v1.CatalogService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		switch r.URL.Path {
		case CatalogServiceListProvidersProcedure:
			catalogServiceListProvidersHandler.ServeHTTP(w, r)
		case CatalogServiceGetProviderProcedure:
			catalogServiceGetProviderHandler.ServeHTTP(w, r)
		case CatalogServiceListModelsProcedure:
			catalogServiceListModelsHandler.ServeHTTP(w, r)
		case CatalogServiceGetModelProcedure:
			catalogServiceGetModelHandler.ServeHTTP(w, r)
		case CatalogServiceUpsertProviderProcedure:
			catalogServiceUpsertProviderHandler.ServeHTTP(w, r)
		case CatalogServiceUpsertModelProcedure:
			catalogServiceUpsertModelHandler.ServeHTTP(w, r)
		case CatalogServiceSetProviderCredentialProcedure:
			catalogServiceSetProviderCredentialHandler.ServeHTTP(w, r)
		case CatalogServiceDeleteProviderProcedure:
			catalogServiceDeleteProviderHandler.ServeHTTP(w, r)
		case CatalogServiceDeleteModelProcedure:
			catalogServiceDeleteModelHandler.ServeHTTP(w, r)
		case CatalogServiceAssignModelToProjectProcedure:
			catalogServiceAssignModelToProjectHandler.ServeHTTP(w, r)
		case CatalogServiceListProjectModelsProcedure:
			catalogServiceListProjectModelsHandler.ServeHTTP(w, r)
		case CatalogServiceUnassignModelFromProjectProcedure:
			catalogServiceUnassignModelFromProjectHandler.ServeHTTP(w, r)
		default:
			http.NotFound(w, r)
		}
	})
}

// UnimplementedCatalogServiceHandler returns CodeUnimplemented from all methods.
type UnimplementedCatalogServiceHandler struct{}

func (UnimplementedCatalogServiceHandler) ListProviders(context.Context, *connect.Request[v1.ListProvidersRequest]) (*connect.Response[v1.ListProvidersResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.ListProviders is not implemented"))
}

func (UnimplementedCatalogServiceHandler) GetProvider(context.Context, *connect.Request[v1.GetProviderRequest]) (*connect.Response[v1.GetProviderResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.GetProvider is not implemented"))
}

func (UnimplementedCatalogServiceHandler) ListModels(context.Context, *connect.Request[v1.ListModelsRequest]) (*connect.Response[v1.ListModelsResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.ListModels is not implemented"))
}

func (UnimplementedCatalogServiceHandler) GetModel(context.Context, *connect.Request[v1.GetModelRequest]) (*connect.Response[v1.GetModelResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.GetModel is not implemented"))
}

func (UnimplementedCatalogServiceHandler) UpsertProvider(context.Context, *connect.Request[v1.UpsertProviderRequest]) (*connect.Response[v1.Provider], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.UpsertProvider is not implemented"))
}

func (UnimplementedCatalogServiceHandler) UpsertModel(context.Context, *connect.Request[v1.UpsertModelRequest]) (*connect.Response[v1.Model], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.UpsertModel is not implemented"))
}

func (UnimplementedCatalogServiceHandler) SetProviderCredential(context.Context, *connect.Request[v1.SetProviderCredentialRequest]) (*connect.Response[v1.Provider], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.SetProviderCredential is not implemented"))
}

func (UnimplementedCatalogServiceHandler) DeleteProvider(context.Context, *connect.Request[v1.DeleteProviderRequest]) (*connect.Response[emptypb.Empty], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.DeleteProvider is not implemented"))
}

func (UnimplementedCatalogServiceHandler) DeleteModel(context.Context, *connect.Request[v1.DeleteModelRequest]) (*connect.Response[emptypb.Empty], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.DeleteModel is not implemented"))
}

func (UnimplementedCatalogServiceHandler) AssignModelToProject(context.Context, *connect.Request[v1.AssignModelToProjectRequest]) (*connect.Response[v1.AssignModelToProjectResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.AssignModelToProject is not implemented"))
}

func (UnimplementedCatalogServiceHandler) ListProjectModels(context.Context, *connect.Request[v1.ListProjectModelsRequest]) (*connect.Response[v1.ListProjectModelsResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.ListProjectModels is not implemented"))
}

func (UnimplementedCatalogServiceHandler) UnassignModelFromProject(context.Context, *connect.Request[v1.UnassignModelFromProjectRequest]) (*connect.Response[v1.UnassignModelFromProjectResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.catalog.v1.CatalogService.UnassignModelFromProject is not implemented"))
}
