// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             v3.21.12
// source: yandex/cloud/loadtesting/api/v1/regression_dashboard_service.proto

package loadtesting

import (
	context "context"
	regression "github.com/yandex-cloud/go-genproto/yandex/cloud/loadtesting/api/v1/regression"
	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 (
	RegressionDashboardService_Create_FullMethodName = "/yandex.cloud.loadtesting.api.v1.RegressionDashboardService/Create"
	RegressionDashboardService_Get_FullMethodName    = "/yandex.cloud.loadtesting.api.v1.RegressionDashboardService/Get"
	RegressionDashboardService_List_FullMethodName   = "/yandex.cloud.loadtesting.api.v1.RegressionDashboardService/List"
	RegressionDashboardService_Delete_FullMethodName = "/yandex.cloud.loadtesting.api.v1.RegressionDashboardService/Delete"
	RegressionDashboardService_Update_FullMethodName = "/yandex.cloud.loadtesting.api.v1.RegressionDashboardService/Update"
)

// RegressionDashboardServiceClient is the client API for RegressionDashboardService 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 Load Testing Regression Dashboards.
type RegressionDashboardServiceClient interface {
	// Creates a regression dashboard in the specified folder.
	Create(ctx context.Context, in *CreateRegressionDashboardRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Returns the specified regression dashboard.
	//
	// To get the list of all available regression dashboards, make a [List] request.
	Get(ctx context.Context, in *GetRegressionDashboardRequest, opts ...grpc.CallOption) (*regression.Dashboard, error)
	// Retrieves the list of regression dashboards in the specified folder.
	List(ctx context.Context, in *ListRegressionDashboardsRequest, opts ...grpc.CallOption) (*ListRegressionDashboardsResponse, error)
	// Deletes the specified regression dashboard.
	Delete(ctx context.Context, in *DeleteRegressionDashboardRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the specified regression dashboard.
	Update(ctx context.Context, in *UpdateRegressionDashboardRequest, opts ...grpc.CallOption) (*operation.Operation, error)
}

type regressionDashboardServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRegressionDashboardServiceClient(cc grpc.ClientConnInterface) RegressionDashboardServiceClient {
	return &regressionDashboardServiceClient{cc}
}

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

func (c *regressionDashboardServiceClient) Get(ctx context.Context, in *GetRegressionDashboardRequest, opts ...grpc.CallOption) (*regression.Dashboard, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(regression.Dashboard)
	err := c.cc.Invoke(ctx, RegressionDashboardService_Get_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

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

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

// RegressionDashboardServiceServer is the server API for RegressionDashboardService service.
// All implementations should embed UnimplementedRegressionDashboardServiceServer
// for forward compatibility.
//
// A set of methods for managing Load Testing Regression Dashboards.
type RegressionDashboardServiceServer interface {
	// Creates a regression dashboard in the specified folder.
	Create(context.Context, *CreateRegressionDashboardRequest) (*operation.Operation, error)
	// Returns the specified regression dashboard.
	//
	// To get the list of all available regression dashboards, make a [List] request.
	Get(context.Context, *GetRegressionDashboardRequest) (*regression.Dashboard, error)
	// Retrieves the list of regression dashboards in the specified folder.
	List(context.Context, *ListRegressionDashboardsRequest) (*ListRegressionDashboardsResponse, error)
	// Deletes the specified regression dashboard.
	Delete(context.Context, *DeleteRegressionDashboardRequest) (*operation.Operation, error)
	// Updates the specified regression dashboard.
	Update(context.Context, *UpdateRegressionDashboardRequest) (*operation.Operation, error)
}

// UnimplementedRegressionDashboardServiceServer 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 UnimplementedRegressionDashboardServiceServer struct{}

func (UnimplementedRegressionDashboardServiceServer) Create(context.Context, *CreateRegressionDashboardRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedRegressionDashboardServiceServer) Get(context.Context, *GetRegressionDashboardRequest) (*regression.Dashboard, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedRegressionDashboardServiceServer) List(context.Context, *ListRegressionDashboardsRequest) (*ListRegressionDashboardsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedRegressionDashboardServiceServer) Delete(context.Context, *DeleteRegressionDashboardRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedRegressionDashboardServiceServer) Update(context.Context, *UpdateRegressionDashboardRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedRegressionDashboardServiceServer) testEmbeddedByValue() {}

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

func RegisterRegressionDashboardServiceServer(s grpc.ServiceRegistrar, srv RegressionDashboardServiceServer) {
	// If the following call panics, it indicates UnimplementedRegressionDashboardServiceServer 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(&RegressionDashboardService_ServiceDesc, srv)
}

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

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

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

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

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

// RegressionDashboardService_ServiceDesc is the grpc.ServiceDesc for RegressionDashboardService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RegressionDashboardService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.loadtesting.api.v1.RegressionDashboardService",
	HandlerType: (*RegressionDashboardServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _RegressionDashboardService_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _RegressionDashboardService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _RegressionDashboardService_List_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _RegressionDashboardService_Delete_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _RegressionDashboardService_Update_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/loadtesting/api/v1/regression_dashboard_service.proto",
}
