// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v3.21.12
// source: yandex/cloud/apploadbalancer/v1/http_router_service.proto

package apploadbalancer

import (
	context "context"
	operation "github.com/yandex-cloud/go-genproto/yandex/cloud/operation"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	HttpRouterService_Get_FullMethodName            = "/yandex.cloud.apploadbalancer.v1.HttpRouterService/Get"
	HttpRouterService_List_FullMethodName           = "/yandex.cloud.apploadbalancer.v1.HttpRouterService/List"
	HttpRouterService_Create_FullMethodName         = "/yandex.cloud.apploadbalancer.v1.HttpRouterService/Create"
	HttpRouterService_Update_FullMethodName         = "/yandex.cloud.apploadbalancer.v1.HttpRouterService/Update"
	HttpRouterService_Delete_FullMethodName         = "/yandex.cloud.apploadbalancer.v1.HttpRouterService/Delete"
	HttpRouterService_ListOperations_FullMethodName = "/yandex.cloud.apploadbalancer.v1.HttpRouterService/ListOperations"
)

// HttpRouterServiceClient is the client API for HttpRouterService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// A set of methods for managing HTTP routers.
type HttpRouterServiceClient interface {
	// Returns the specified HTTP router.
	//
	// To get the list of all available HTTP routers, make a [List] request.
	Get(ctx context.Context, in *GetHttpRouterRequest, opts ...grpc.CallOption) (*HttpRouter, error)
	// Lists HTTP routers in the specified folder.
	List(ctx context.Context, in *ListHttpRoutersRequest, opts ...grpc.CallOption) (*ListHttpRoutersResponse, error)
	// Creates an HTTP router in the specified folder.
	Create(ctx context.Context, in *CreateHttpRouterRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the specified HTTP router.
	Update(ctx context.Context, in *UpdateHttpRouterRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes the specified HTTP router.
	Delete(ctx context.Context, in *DeleteHttpRouterRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Lists operations for the specified HTTP router.
	ListOperations(ctx context.Context, in *ListHttpRouterOperationsRequest, opts ...grpc.CallOption) (*ListHttpRouterOperationsResponse, error)
}

type httpRouterServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewHttpRouterServiceClient(cc grpc.ClientConnInterface) HttpRouterServiceClient {
	return &httpRouterServiceClient{cc}
}

func (c *httpRouterServiceClient) Get(ctx context.Context, in *GetHttpRouterRequest, opts ...grpc.CallOption) (*HttpRouter, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(HttpRouter)
	err := c.cc.Invoke(ctx, HttpRouterService_Get_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *httpRouterServiceClient) List(ctx context.Context, in *ListHttpRoutersRequest, opts ...grpc.CallOption) (*ListHttpRoutersResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListHttpRoutersResponse)
	err := c.cc.Invoke(ctx, HttpRouterService_List_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *httpRouterServiceClient) Create(ctx context.Context, in *CreateHttpRouterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, HttpRouterService_Create_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *httpRouterServiceClient) Update(ctx context.Context, in *UpdateHttpRouterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, HttpRouterService_Update_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *httpRouterServiceClient) Delete(ctx context.Context, in *DeleteHttpRouterRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, HttpRouterService_Delete_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *httpRouterServiceClient) ListOperations(ctx context.Context, in *ListHttpRouterOperationsRequest, opts ...grpc.CallOption) (*ListHttpRouterOperationsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListHttpRouterOperationsResponse)
	err := c.cc.Invoke(ctx, HttpRouterService_ListOperations_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// HttpRouterServiceServer is the server API for HttpRouterService service.
// All implementations should embed UnimplementedHttpRouterServiceServer
// for forward compatibility.
//
// A set of methods for managing HTTP routers.
type HttpRouterServiceServer interface {
	// Returns the specified HTTP router.
	//
	// To get the list of all available HTTP routers, make a [List] request.
	Get(context.Context, *GetHttpRouterRequest) (*HttpRouter, error)
	// Lists HTTP routers in the specified folder.
	List(context.Context, *ListHttpRoutersRequest) (*ListHttpRoutersResponse, error)
	// Creates an HTTP router in the specified folder.
	Create(context.Context, *CreateHttpRouterRequest) (*operation.Operation, error)
	// Updates the specified HTTP router.
	Update(context.Context, *UpdateHttpRouterRequest) (*operation.Operation, error)
	// Deletes the specified HTTP router.
	Delete(context.Context, *DeleteHttpRouterRequest) (*operation.Operation, error)
	// Lists operations for the specified HTTP router.
	ListOperations(context.Context, *ListHttpRouterOperationsRequest) (*ListHttpRouterOperationsResponse, error)
}

// UnimplementedHttpRouterServiceServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedHttpRouterServiceServer struct{}

func (UnimplementedHttpRouterServiceServer) Get(context.Context, *GetHttpRouterRequest) (*HttpRouter, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedHttpRouterServiceServer) List(context.Context, *ListHttpRoutersRequest) (*ListHttpRoutersResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedHttpRouterServiceServer) Create(context.Context, *CreateHttpRouterRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedHttpRouterServiceServer) Update(context.Context, *UpdateHttpRouterRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedHttpRouterServiceServer) Delete(context.Context, *DeleteHttpRouterRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedHttpRouterServiceServer) ListOperations(context.Context, *ListHttpRouterOperationsRequest) (*ListHttpRouterOperationsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented")
}
func (UnimplementedHttpRouterServiceServer) testEmbeddedByValue() {}

// UnsafeHttpRouterServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HttpRouterServiceServer will
// result in compilation errors.
type UnsafeHttpRouterServiceServer interface {
	mustEmbedUnimplementedHttpRouterServiceServer()
}

func RegisterHttpRouterServiceServer(s grpc.ServiceRegistrar, srv HttpRouterServiceServer) {
	// If the following call pancis, it indicates UnimplementedHttpRouterServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&HttpRouterService_ServiceDesc, srv)
}

func _HttpRouterService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetHttpRouterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HttpRouterServiceServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: HttpRouterService_Get_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HttpRouterServiceServer).Get(ctx, req.(*GetHttpRouterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HttpRouterService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListHttpRoutersRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HttpRouterServiceServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: HttpRouterService_List_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HttpRouterServiceServer).List(ctx, req.(*ListHttpRoutersRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HttpRouterService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateHttpRouterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HttpRouterServiceServer).Create(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: HttpRouterService_Create_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HttpRouterServiceServer).Create(ctx, req.(*CreateHttpRouterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HttpRouterService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateHttpRouterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HttpRouterServiceServer).Update(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: HttpRouterService_Update_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HttpRouterServiceServer).Update(ctx, req.(*UpdateHttpRouterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HttpRouterService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteHttpRouterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HttpRouterServiceServer).Delete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: HttpRouterService_Delete_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HttpRouterServiceServer).Delete(ctx, req.(*DeleteHttpRouterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HttpRouterService_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListHttpRouterOperationsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HttpRouterServiceServer).ListOperations(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: HttpRouterService_ListOperations_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HttpRouterServiceServer).ListOperations(ctx, req.(*ListHttpRouterOperationsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// HttpRouterService_ServiceDesc is the grpc.ServiceDesc for HttpRouterService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var HttpRouterService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.apploadbalancer.v1.HttpRouterService",
	HandlerType: (*HttpRouterServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _HttpRouterService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _HttpRouterService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _HttpRouterService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _HttpRouterService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _HttpRouterService_Delete_Handler,
		},
		{
			MethodName: "ListOperations",
			Handler:    _HttpRouterService_ListOperations_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/apploadbalancer/v1/http_router_service.proto",
}
