// 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/mdb/kafka/v1/connector_service.proto

package kafka

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 (
	ConnectorService_Get_FullMethodName    = "/yandex.cloud.mdb.kafka.v1.ConnectorService/Get"
	ConnectorService_List_FullMethodName   = "/yandex.cloud.mdb.kafka.v1.ConnectorService/List"
	ConnectorService_Create_FullMethodName = "/yandex.cloud.mdb.kafka.v1.ConnectorService/Create"
	ConnectorService_Update_FullMethodName = "/yandex.cloud.mdb.kafka.v1.ConnectorService/Update"
	ConnectorService_Delete_FullMethodName = "/yandex.cloud.mdb.kafka.v1.ConnectorService/Delete"
	ConnectorService_Resume_FullMethodName = "/yandex.cloud.mdb.kafka.v1.ConnectorService/Resume"
	ConnectorService_Pause_FullMethodName  = "/yandex.cloud.mdb.kafka.v1.ConnectorService/Pause"
)

// ConnectorServiceClient is the client API for ConnectorService 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 Apache Kafka® connectors.
type ConnectorServiceClient interface {
	// Returns information about an Apache Kafka® connector.
	Get(ctx context.Context, in *GetConnectorRequest, opts ...grpc.CallOption) (*Connector, error)
	// Retrieves the list of Apache Kafka® connectors in a cluster.
	List(ctx context.Context, in *ListConnectorsRequest, opts ...grpc.CallOption) (*ListConnectorsResponse, error)
	// Creates a new Apache Kafka® connector in a cluster.
	Create(ctx context.Context, in *CreateConnectorRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates an Apache Kafka® connector.
	Update(ctx context.Context, in *UpdateConnectorRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes an Apache Kafka® connector.
	Delete(ctx context.Context, in *DeleteConnectorRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Resumes an Apache Kafka® connector.
	Resume(ctx context.Context, in *ResumeConnectorRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Pauses an Apache Kafka® connector.
	Pause(ctx context.Context, in *PauseConnectorRequest, opts ...grpc.CallOption) (*operation.Operation, error)
}

type connectorServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewConnectorServiceClient(cc grpc.ClientConnInterface) ConnectorServiceClient {
	return &connectorServiceClient{cc}
}

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

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

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

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

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

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

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

// ConnectorServiceServer is the server API for ConnectorService service.
// All implementations should embed UnimplementedConnectorServiceServer
// for forward compatibility.
//
// A set of methods for managing Apache Kafka® connectors.
type ConnectorServiceServer interface {
	// Returns information about an Apache Kafka® connector.
	Get(context.Context, *GetConnectorRequest) (*Connector, error)
	// Retrieves the list of Apache Kafka® connectors in a cluster.
	List(context.Context, *ListConnectorsRequest) (*ListConnectorsResponse, error)
	// Creates a new Apache Kafka® connector in a cluster.
	Create(context.Context, *CreateConnectorRequest) (*operation.Operation, error)
	// Updates an Apache Kafka® connector.
	Update(context.Context, *UpdateConnectorRequest) (*operation.Operation, error)
	// Deletes an Apache Kafka® connector.
	Delete(context.Context, *DeleteConnectorRequest) (*operation.Operation, error)
	// Resumes an Apache Kafka® connector.
	Resume(context.Context, *ResumeConnectorRequest) (*operation.Operation, error)
	// Pauses an Apache Kafka® connector.
	Pause(context.Context, *PauseConnectorRequest) (*operation.Operation, error)
}

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

func (UnimplementedConnectorServiceServer) Get(context.Context, *GetConnectorRequest) (*Connector, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedConnectorServiceServer) List(context.Context, *ListConnectorsRequest) (*ListConnectorsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedConnectorServiceServer) Create(context.Context, *CreateConnectorRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedConnectorServiceServer) Update(context.Context, *UpdateConnectorRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedConnectorServiceServer) Delete(context.Context, *DeleteConnectorRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedConnectorServiceServer) Resume(context.Context, *ResumeConnectorRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Resume not implemented")
}
func (UnimplementedConnectorServiceServer) Pause(context.Context, *PauseConnectorRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Pause not implemented")
}
func (UnimplementedConnectorServiceServer) testEmbeddedByValue() {}

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

func RegisterConnectorServiceServer(s grpc.ServiceRegistrar, srv ConnectorServiceServer) {
	// If the following call panics, it indicates UnimplementedConnectorServiceServer 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(&ConnectorService_ServiceDesc, srv)
}

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

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

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

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

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

func _ConnectorService_Resume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ResumeConnectorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConnectorServiceServer).Resume(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConnectorService_Resume_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConnectorServiceServer).Resume(ctx, req.(*ResumeConnectorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ConnectorService_Pause_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PauseConnectorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConnectorServiceServer).Pause(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConnectorService_Pause_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConnectorServiceServer).Pause(ctx, req.(*PauseConnectorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ConnectorService_ServiceDesc is the grpc.ServiceDesc for ConnectorService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ConnectorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.mdb.kafka.v1.ConnectorService",
	HandlerType: (*ConnectorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _ConnectorService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _ConnectorService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _ConnectorService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _ConnectorService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _ConnectorService_Delete_Handler,
		},
		{
			MethodName: "Resume",
			Handler:    _ConnectorService_Resume_Handler,
		},
		{
			MethodName: "Pause",
			Handler:    _ConnectorService_Pause_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/mdb/kafka/v1/connector_service.proto",
}
