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

// 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_sos_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 (
	SosService_EditSos_FullMethodName = "/deviceapis.device.v1.SosService/EditSos"
	SosService_GetSos_FullMethodName  = "/deviceapis.device.v1.SosService/GetSos"
)

// SosServiceClient is the client API for SosService 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 SosServiceClient interface {
	// Метод редактирования настроек SOS
	EditSos(ctx context.Context, in *EditSosRequest, opts ...grpc.CallOption) (*EditSosResponse, error)
	// Метод получения настроек SOS
	GetSos(ctx context.Context, in *GetSosRequest, opts ...grpc.CallOption) (*GetSosResponse, error)
}

type sosServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSosServiceClient(cc grpc.ClientConnInterface) SosServiceClient {
	return &sosServiceClient{cc}
}

func (c *sosServiceClient) EditSos(ctx context.Context, in *EditSosRequest, opts ...grpc.CallOption) (*EditSosResponse, error) {
	out := new(EditSosResponse)
	err := c.cc.Invoke(ctx, SosService_EditSos_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sosServiceClient) GetSos(ctx context.Context, in *GetSosRequest, opts ...grpc.CallOption) (*GetSosResponse, error) {
	out := new(GetSosResponse)
	err := c.cc.Invoke(ctx, SosService_GetSos_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SosServiceServer is the server API for SosService service.
// All implementations should embed UnimplementedSosServiceServer
// for forward compatibility
type SosServiceServer interface {
	// Метод редактирования настроек SOS
	EditSos(context.Context, *EditSosRequest) (*EditSosResponse, error)
	// Метод получения настроек SOS
	GetSos(context.Context, *GetSosRequest) (*GetSosResponse, error)
}

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

func (UnimplementedSosServiceServer) EditSos(context.Context, *EditSosRequest) (*EditSosResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method EditSos not implemented")
}
func (UnimplementedSosServiceServer) GetSos(context.Context, *GetSosRequest) (*GetSosResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetSos not implemented")
}

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

func RegisterSosServiceServer(s grpc.ServiceRegistrar, srv SosServiceServer) {
	s.RegisterService(&SosService_ServiceDesc, srv)
}

func _SosService_EditSos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EditSosRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SosServiceServer).EditSos(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SosService_EditSos_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SosServiceServer).EditSos(ctx, req.(*EditSosRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SosService_GetSos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetSosRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SosServiceServer).GetSos(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SosService_GetSos_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SosServiceServer).GetSos(ctx, req.(*GetSosRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SosService_ServiceDesc is the grpc.ServiceDesc for SosService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SosService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "deviceapis.device.v1.SosService",
	HandlerType: (*SosServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "EditSos",
			Handler:    _SosService_EditSos_Handler,
		},
		{
			MethodName: "GetSos",
			Handler:    _SosService_GetSos_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "deviceapis/device/v1/deviceapis_device_sos_v1.proto",
}
