// 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/logging/v1/export_service.proto

package logging

import (
	context "context"
	access "github.com/yandex-cloud/go-genproto/yandex/cloud/access"
	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 (
	ExportService_Run_FullMethodName                  = "/yandex.cloud.logging.v1.ExportService/Run"
	ExportService_Get_FullMethodName                  = "/yandex.cloud.logging.v1.ExportService/Get"
	ExportService_List_FullMethodName                 = "/yandex.cloud.logging.v1.ExportService/List"
	ExportService_Create_FullMethodName               = "/yandex.cloud.logging.v1.ExportService/Create"
	ExportService_Update_FullMethodName               = "/yandex.cloud.logging.v1.ExportService/Update"
	ExportService_Delete_FullMethodName               = "/yandex.cloud.logging.v1.ExportService/Delete"
	ExportService_ListOperations_FullMethodName       = "/yandex.cloud.logging.v1.ExportService/ListOperations"
	ExportService_ListAccessBindings_FullMethodName   = "/yandex.cloud.logging.v1.ExportService/ListAccessBindings"
	ExportService_SetAccessBindings_FullMethodName    = "/yandex.cloud.logging.v1.ExportService/SetAccessBindings"
	ExportService_UpdateAccessBindings_FullMethodName = "/yandex.cloud.logging.v1.ExportService/UpdateAccessBindings"
)

// ExportServiceClient is the client API for ExportService 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 log exports.
type ExportServiceClient interface {
	// Run new logs export from log group to sink
	Run(ctx context.Context, in *RunExportRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Returns the specified export.
	//
	// To get the list of all available exports, make a [List] request.
	Get(ctx context.Context, in *GetExportRequest, opts ...grpc.CallOption) (*Export, error)
	// Retrieves the list of exports in the specified folder.
	List(ctx context.Context, in *ListExportsRequest, opts ...grpc.CallOption) (*ListExportsResponse, error)
	// Creates a export in the specified folder.
	Create(ctx context.Context, in *CreateExportRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the specified export.
	Update(ctx context.Context, in *UpdateExportRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes the specified export.
	Delete(ctx context.Context, in *DeleteExportRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Lists operations for the specified export.
	ListOperations(ctx context.Context, in *ListExportOperationsRequest, opts ...grpc.CallOption) (*ListExportOperationsResponse, error)
	// Lists existing access bindings for the specified export.
	ListAccessBindings(ctx context.Context, in *access.ListAccessBindingsRequest, opts ...grpc.CallOption) (*access.ListAccessBindingsResponse, error)
	// Sets access bindings for the specified export.
	SetAccessBindings(ctx context.Context, in *access.SetAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates access bindings for the specified export.
	UpdateAccessBindings(ctx context.Context, in *access.UpdateAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error)
}

type exportServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewExportServiceClient(cc grpc.ClientConnInterface) ExportServiceClient {
	return &exportServiceClient{cc}
}

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

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

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

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

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

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

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

func (c *exportServiceClient) ListAccessBindings(ctx context.Context, in *access.ListAccessBindingsRequest, opts ...grpc.CallOption) (*access.ListAccessBindingsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(access.ListAccessBindingsResponse)
	err := c.cc.Invoke(ctx, ExportService_ListAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *exportServiceClient) SetAccessBindings(ctx context.Context, in *access.SetAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, ExportService_SetAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *exportServiceClient) UpdateAccessBindings(ctx context.Context, in *access.UpdateAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, ExportService_UpdateAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ExportServiceServer is the server API for ExportService service.
// All implementations should embed UnimplementedExportServiceServer
// for forward compatibility.
//
// A set of methods for managing log exports.
type ExportServiceServer interface {
	// Run new logs export from log group to sink
	Run(context.Context, *RunExportRequest) (*operation.Operation, error)
	// Returns the specified export.
	//
	// To get the list of all available exports, make a [List] request.
	Get(context.Context, *GetExportRequest) (*Export, error)
	// Retrieves the list of exports in the specified folder.
	List(context.Context, *ListExportsRequest) (*ListExportsResponse, error)
	// Creates a export in the specified folder.
	Create(context.Context, *CreateExportRequest) (*operation.Operation, error)
	// Updates the specified export.
	Update(context.Context, *UpdateExportRequest) (*operation.Operation, error)
	// Deletes the specified export.
	Delete(context.Context, *DeleteExportRequest) (*operation.Operation, error)
	// Lists operations for the specified export.
	ListOperations(context.Context, *ListExportOperationsRequest) (*ListExportOperationsResponse, error)
	// Lists existing access bindings for the specified export.
	ListAccessBindings(context.Context, *access.ListAccessBindingsRequest) (*access.ListAccessBindingsResponse, error)
	// Sets access bindings for the specified export.
	SetAccessBindings(context.Context, *access.SetAccessBindingsRequest) (*operation.Operation, error)
	// Updates access bindings for the specified export.
	UpdateAccessBindings(context.Context, *access.UpdateAccessBindingsRequest) (*operation.Operation, error)
}

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

func (UnimplementedExportServiceServer) Run(context.Context, *RunExportRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Run not implemented")
}
func (UnimplementedExportServiceServer) Get(context.Context, *GetExportRequest) (*Export, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedExportServiceServer) List(context.Context, *ListExportsRequest) (*ListExportsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedExportServiceServer) Create(context.Context, *CreateExportRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedExportServiceServer) Update(context.Context, *UpdateExportRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedExportServiceServer) Delete(context.Context, *DeleteExportRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedExportServiceServer) ListOperations(context.Context, *ListExportOperationsRequest) (*ListExportOperationsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented")
}
func (UnimplementedExportServiceServer) ListAccessBindings(context.Context, *access.ListAccessBindingsRequest) (*access.ListAccessBindingsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListAccessBindings not implemented")
}
func (UnimplementedExportServiceServer) SetAccessBindings(context.Context, *access.SetAccessBindingsRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetAccessBindings not implemented")
}
func (UnimplementedExportServiceServer) UpdateAccessBindings(context.Context, *access.UpdateAccessBindingsRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateAccessBindings not implemented")
}
func (UnimplementedExportServiceServer) testEmbeddedByValue() {}

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

func RegisterExportServiceServer(s grpc.ServiceRegistrar, srv ExportServiceServer) {
	// If the following call pancis, it indicates UnimplementedExportServiceServer 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(&ExportService_ServiceDesc, srv)
}

func _ExportService_Run_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RunExportRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExportServiceServer).Run(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExportService_Run_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExportServiceServer).Run(ctx, req.(*RunExportRequest))
	}
	return interceptor(ctx, in, info, handler)
}

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

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

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

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

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

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

func _ExportService_ListAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.ListAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExportServiceServer).ListAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExportService_ListAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExportServiceServer).ListAccessBindings(ctx, req.(*access.ListAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExportService_SetAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.SetAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExportServiceServer).SetAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExportService_SetAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExportServiceServer).SetAccessBindings(ctx, req.(*access.SetAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExportService_UpdateAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.UpdateAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExportServiceServer).UpdateAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExportService_UpdateAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExportServiceServer).UpdateAccessBindings(ctx, req.(*access.UpdateAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ExportService_ServiceDesc is the grpc.ServiceDesc for ExportService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ExportService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.logging.v1.ExportService",
	HandlerType: (*ExportServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Run",
			Handler:    _ExportService_Run_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _ExportService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _ExportService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _ExportService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _ExportService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _ExportService_Delete_Handler,
		},
		{
			MethodName: "ListOperations",
			Handler:    _ExportService_ListOperations_Handler,
		},
		{
			MethodName: "ListAccessBindings",
			Handler:    _ExportService_ListAccessBindings_Handler,
		},
		{
			MethodName: "SetAccessBindings",
			Handler:    _ExportService_SetAccessBindings_Handler,
		},
		{
			MethodName: "UpdateAccessBindings",
			Handler:    _ExportService_UpdateAccessBindings_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/logging/v1/export_service.proto",
}
