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

// 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_dtmf_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 (
	DtmfSettingsService_EditDtmfSettings_FullMethodName = "/deviceapis.device.v1.DtmfSettingsService/EditDtmfSettings"
	DtmfSettingsService_GetDtmfSettings_FullMethodName  = "/deviceapis.device.v1.DtmfSettingsService/GetDtmfSettings"
)

// DtmfSettingsServiceClient is the client API for DtmfSettingsService 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 DtmfSettingsServiceClient interface {
	// Метод редактирования настроек DTMF
	EditDtmfSettings(ctx context.Context, in *EditDtmfSettingsRequest, opts ...grpc.CallOption) (*EditDtmfSettingsResponse, error)
	// Метод получения настроек DTMF
	GetDtmfSettings(ctx context.Context, in *GetDtmfSettingsRequest, opts ...grpc.CallOption) (*GetDtmfSettingsResponse, error)
}

type dtmfSettingsServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewDtmfSettingsServiceClient(cc grpc.ClientConnInterface) DtmfSettingsServiceClient {
	return &dtmfSettingsServiceClient{cc}
}

func (c *dtmfSettingsServiceClient) EditDtmfSettings(ctx context.Context, in *EditDtmfSettingsRequest, opts ...grpc.CallOption) (*EditDtmfSettingsResponse, error) {
	out := new(EditDtmfSettingsResponse)
	err := c.cc.Invoke(ctx, DtmfSettingsService_EditDtmfSettings_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dtmfSettingsServiceClient) GetDtmfSettings(ctx context.Context, in *GetDtmfSettingsRequest, opts ...grpc.CallOption) (*GetDtmfSettingsResponse, error) {
	out := new(GetDtmfSettingsResponse)
	err := c.cc.Invoke(ctx, DtmfSettingsService_GetDtmfSettings_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// DtmfSettingsServiceServer is the server API for DtmfSettingsService service.
// All implementations should embed UnimplementedDtmfSettingsServiceServer
// for forward compatibility
type DtmfSettingsServiceServer interface {
	// Метод редактирования настроек DTMF
	EditDtmfSettings(context.Context, *EditDtmfSettingsRequest) (*EditDtmfSettingsResponse, error)
	// Метод получения настроек DTMF
	GetDtmfSettings(context.Context, *GetDtmfSettingsRequest) (*GetDtmfSettingsResponse, error)
}

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

func (UnimplementedDtmfSettingsServiceServer) EditDtmfSettings(context.Context, *EditDtmfSettingsRequest) (*EditDtmfSettingsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method EditDtmfSettings not implemented")
}
func (UnimplementedDtmfSettingsServiceServer) GetDtmfSettings(context.Context, *GetDtmfSettingsRequest) (*GetDtmfSettingsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDtmfSettings not implemented")
}

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

func RegisterDtmfSettingsServiceServer(s grpc.ServiceRegistrar, srv DtmfSettingsServiceServer) {
	s.RegisterService(&DtmfSettingsService_ServiceDesc, srv)
}

func _DtmfSettingsService_EditDtmfSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EditDtmfSettingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DtmfSettingsServiceServer).EditDtmfSettings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DtmfSettingsService_EditDtmfSettings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DtmfSettingsServiceServer).EditDtmfSettings(ctx, req.(*EditDtmfSettingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DtmfSettingsService_GetDtmfSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetDtmfSettingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DtmfSettingsServiceServer).GetDtmfSettings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DtmfSettingsService_GetDtmfSettings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DtmfSettingsServiceServer).GetDtmfSettings(ctx, req.(*GetDtmfSettingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// DtmfSettingsService_ServiceDesc is the grpc.ServiceDesc for DtmfSettingsService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DtmfSettingsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "deviceapis.device.v1.DtmfSettingsService",
	HandlerType: (*DtmfSettingsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "EditDtmfSettings",
			Handler:    _DtmfSettingsService_EditDtmfSettings_Handler,
		},
		{
			MethodName: "GetDtmfSettings",
			Handler:    _DtmfSettingsService_GetDtmfSettings_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "deviceapis/device/v1/deviceapis_device_dtmf_v1.proto",
}
