//
//Сервис управления настройками Ticker

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v4.23.1
// source: deviceapis/device/v1/deviceapis_device_ticker_v1.proto

package deviceapis_device_v1

import (
	context "context"
	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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

const (
	TickerService_EditTicker_FullMethodName = "/deviceapis.device.v1.TickerService/EditTicker"
	TickerService_GetTicker_FullMethodName  = "/deviceapis.device.v1.TickerService/GetTicker"
)

// TickerServiceClient is the client API for TickerService 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.
type TickerServiceClient interface {
	// Метод редактирования настроек Ticker
	EditTicker(ctx context.Context, in *EditTickerRequest, opts ...grpc.CallOption) (*EditTickerResponse, error)
	// Метод получения настроек Ticker
	GetTicker(ctx context.Context, in *GetTickerRequest, opts ...grpc.CallOption) (*GetTickerResponse, error)
}

type tickerServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewTickerServiceClient(cc grpc.ClientConnInterface) TickerServiceClient {
	return &tickerServiceClient{cc}
}

func (c *tickerServiceClient) EditTicker(ctx context.Context, in *EditTickerRequest, opts ...grpc.CallOption) (*EditTickerResponse, error) {
	out := new(EditTickerResponse)
	err := c.cc.Invoke(ctx, TickerService_EditTicker_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tickerServiceClient) GetTicker(ctx context.Context, in *GetTickerRequest, opts ...grpc.CallOption) (*GetTickerResponse, error) {
	out := new(GetTickerResponse)
	err := c.cc.Invoke(ctx, TickerService_GetTicker_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// TickerServiceServer is the server API for TickerService service.
// All implementations should embed UnimplementedTickerServiceServer
// for forward compatibility
type TickerServiceServer interface {
	// Метод редактирования настроек Ticker
	EditTicker(context.Context, *EditTickerRequest) (*EditTickerResponse, error)
	// Метод получения настроек Ticker
	GetTicker(context.Context, *GetTickerRequest) (*GetTickerResponse, error)
}

// UnimplementedTickerServiceServer should be embedded to have forward compatible implementations.
type UnimplementedTickerServiceServer struct {
}

func (UnimplementedTickerServiceServer) EditTicker(context.Context, *EditTickerRequest) (*EditTickerResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method EditTicker not implemented")
}
func (UnimplementedTickerServiceServer) GetTicker(context.Context, *GetTickerRequest) (*GetTickerResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTicker not implemented")
}

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

func RegisterTickerServiceServer(s grpc.ServiceRegistrar, srv TickerServiceServer) {
	s.RegisterService(&TickerService_ServiceDesc, srv)
}

func _TickerService_EditTicker_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EditTickerRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TickerServiceServer).EditTicker(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TickerService_EditTicker_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TickerServiceServer).EditTicker(ctx, req.(*EditTickerRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TickerService_GetTicker_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetTickerRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TickerServiceServer).GetTicker(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TickerService_GetTicker_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TickerServiceServer).GetTicker(ctx, req.(*GetTickerRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// TickerService_ServiceDesc is the grpc.ServiceDesc for TickerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TickerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "deviceapis.device.v1.TickerService",
	HandlerType: (*TickerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "EditTicker",
			Handler:    _TickerService_EditTicker_Handler,
		},
		{
			MethodName: "GetTicker",
			Handler:    _TickerService_GetTicker_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "deviceapis/device/v1/deviceapis_device_ticker_v1.proto",
}
