//
//Сервис реализует функционал взаимодействия с внешними партнёрами IoT

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v4.23.1
// source: keyapis/iot_connect/v1/keyapis_iot_connect_callback_v1.proto

package keyapis_iot_connect_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 (
	IotConnectCallbackService_GetCallbackUser_FullMethodName     = "/keyapis.iot_connect.v1.IotConnectCallbackService/GetCallbackUser"
	IotConnectCallbackService_GetCallbackDevices_FullMethodName  = "/keyapis.iot_connect.v1.IotConnectCallbackService/GetCallbackDevices"
	IotConnectCallbackService_PostCallbackStatus_FullMethodName  = "/keyapis.iot_connect.v1.IotConnectCallbackService/PostCallbackStatus"
	IotConnectCallbackService_PostCallbackCommand_FullMethodName = "/keyapis.iot_connect.v1.IotConnectCallbackService/PostCallbackCommand"
	IotConnectCallbackService_PostCallbackUnlink_FullMethodName  = "/keyapis.iot_connect.v1.IotConnectCallbackService/PostCallbackUnlink"
)

// IotConnectCallbackServiceClient is the client API for IotConnectCallbackService 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 IotConnectCallbackServiceClient interface {
	// Метод получения пользователя.
	// Метод доступен для: TokenACF: Scope: iot
	GetCallbackUser(ctx context.Context, in *GetCallbackUserRequest, opts ...grpc.CallOption) (*GetCallbackUserResponse, error)
	// Метод получения устройств, доступных пользователю.
	// Метод доступен для: TokenACF: Scope: iot
	GetCallbackDevices(ctx context.Context, in *GetCallbackDevicesRequest, opts ...grpc.CallOption) (*GetCallbackDevicesResponse, error)
	// Метод получения внешним партнёром состояния устройства.
	// Метод доступен для: TokenACF: Scope: iot
	PostCallbackStatus(ctx context.Context, in *PostCallbackStatusRequest, opts ...grpc.CallOption) (*PostCallbackStatusResponse, error)
	// Метод запроса внешнего IoT партнёра на изменение состояния устройства.
	// Поддерживается только открытие домофона.
	// Метод доступен для: TokenACF: Scope: iot
	PostCallbackCommand(ctx context.Context, in *PostCallbackCommandRequest, opts ...grpc.CallOption) (*PostCallbackCommandResponse, error)
	// Метод сообщения от внешнего IoT партнёра о разъединении аккаунтов.
	// Метод доступен для: TokenACF: Scope: iot
	PostCallbackUnlink(ctx context.Context, in *PostCallbackUnlinkRequest, opts ...grpc.CallOption) (*PostCallbackUnlinkResponse, error)
}

type iotConnectCallbackServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewIotConnectCallbackServiceClient(cc grpc.ClientConnInterface) IotConnectCallbackServiceClient {
	return &iotConnectCallbackServiceClient{cc}
}

func (c *iotConnectCallbackServiceClient) GetCallbackUser(ctx context.Context, in *GetCallbackUserRequest, opts ...grpc.CallOption) (*GetCallbackUserResponse, error) {
	out := new(GetCallbackUserResponse)
	err := c.cc.Invoke(ctx, IotConnectCallbackService_GetCallbackUser_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *iotConnectCallbackServiceClient) GetCallbackDevices(ctx context.Context, in *GetCallbackDevicesRequest, opts ...grpc.CallOption) (*GetCallbackDevicesResponse, error) {
	out := new(GetCallbackDevicesResponse)
	err := c.cc.Invoke(ctx, IotConnectCallbackService_GetCallbackDevices_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *iotConnectCallbackServiceClient) PostCallbackStatus(ctx context.Context, in *PostCallbackStatusRequest, opts ...grpc.CallOption) (*PostCallbackStatusResponse, error) {
	out := new(PostCallbackStatusResponse)
	err := c.cc.Invoke(ctx, IotConnectCallbackService_PostCallbackStatus_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *iotConnectCallbackServiceClient) PostCallbackCommand(ctx context.Context, in *PostCallbackCommandRequest, opts ...grpc.CallOption) (*PostCallbackCommandResponse, error) {
	out := new(PostCallbackCommandResponse)
	err := c.cc.Invoke(ctx, IotConnectCallbackService_PostCallbackCommand_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *iotConnectCallbackServiceClient) PostCallbackUnlink(ctx context.Context, in *PostCallbackUnlinkRequest, opts ...grpc.CallOption) (*PostCallbackUnlinkResponse, error) {
	out := new(PostCallbackUnlinkResponse)
	err := c.cc.Invoke(ctx, IotConnectCallbackService_PostCallbackUnlink_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// IotConnectCallbackServiceServer is the server API for IotConnectCallbackService service.
// All implementations should embed UnimplementedIotConnectCallbackServiceServer
// for forward compatibility
type IotConnectCallbackServiceServer interface {
	// Метод получения пользователя.
	// Метод доступен для: TokenACF: Scope: iot
	GetCallbackUser(context.Context, *GetCallbackUserRequest) (*GetCallbackUserResponse, error)
	// Метод получения устройств, доступных пользователю.
	// Метод доступен для: TokenACF: Scope: iot
	GetCallbackDevices(context.Context, *GetCallbackDevicesRequest) (*GetCallbackDevicesResponse, error)
	// Метод получения внешним партнёром состояния устройства.
	// Метод доступен для: TokenACF: Scope: iot
	PostCallbackStatus(context.Context, *PostCallbackStatusRequest) (*PostCallbackStatusResponse, error)
	// Метод запроса внешнего IoT партнёра на изменение состояния устройства.
	// Поддерживается только открытие домофона.
	// Метод доступен для: TokenACF: Scope: iot
	PostCallbackCommand(context.Context, *PostCallbackCommandRequest) (*PostCallbackCommandResponse, error)
	// Метод сообщения от внешнего IoT партнёра о разъединении аккаунтов.
	// Метод доступен для: TokenACF: Scope: iot
	PostCallbackUnlink(context.Context, *PostCallbackUnlinkRequest) (*PostCallbackUnlinkResponse, error)
}

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

func (UnimplementedIotConnectCallbackServiceServer) GetCallbackUser(context.Context, *GetCallbackUserRequest) (*GetCallbackUserResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCallbackUser not implemented")
}
func (UnimplementedIotConnectCallbackServiceServer) GetCallbackDevices(context.Context, *GetCallbackDevicesRequest) (*GetCallbackDevicesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCallbackDevices not implemented")
}
func (UnimplementedIotConnectCallbackServiceServer) PostCallbackStatus(context.Context, *PostCallbackStatusRequest) (*PostCallbackStatusResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PostCallbackStatus not implemented")
}
func (UnimplementedIotConnectCallbackServiceServer) PostCallbackCommand(context.Context, *PostCallbackCommandRequest) (*PostCallbackCommandResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PostCallbackCommand not implemented")
}
func (UnimplementedIotConnectCallbackServiceServer) PostCallbackUnlink(context.Context, *PostCallbackUnlinkRequest) (*PostCallbackUnlinkResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PostCallbackUnlink not implemented")
}

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

func RegisterIotConnectCallbackServiceServer(s grpc.ServiceRegistrar, srv IotConnectCallbackServiceServer) {
	s.RegisterService(&IotConnectCallbackService_ServiceDesc, srv)
}

func _IotConnectCallbackService_GetCallbackUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetCallbackUserRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IotConnectCallbackServiceServer).GetCallbackUser(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: IotConnectCallbackService_GetCallbackUser_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IotConnectCallbackServiceServer).GetCallbackUser(ctx, req.(*GetCallbackUserRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _IotConnectCallbackService_GetCallbackDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetCallbackDevicesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IotConnectCallbackServiceServer).GetCallbackDevices(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: IotConnectCallbackService_GetCallbackDevices_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IotConnectCallbackServiceServer).GetCallbackDevices(ctx, req.(*GetCallbackDevicesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _IotConnectCallbackService_PostCallbackStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PostCallbackStatusRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IotConnectCallbackServiceServer).PostCallbackStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: IotConnectCallbackService_PostCallbackStatus_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IotConnectCallbackServiceServer).PostCallbackStatus(ctx, req.(*PostCallbackStatusRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _IotConnectCallbackService_PostCallbackCommand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PostCallbackCommandRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IotConnectCallbackServiceServer).PostCallbackCommand(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: IotConnectCallbackService_PostCallbackCommand_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IotConnectCallbackServiceServer).PostCallbackCommand(ctx, req.(*PostCallbackCommandRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _IotConnectCallbackService_PostCallbackUnlink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PostCallbackUnlinkRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IotConnectCallbackServiceServer).PostCallbackUnlink(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: IotConnectCallbackService_PostCallbackUnlink_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IotConnectCallbackServiceServer).PostCallbackUnlink(ctx, req.(*PostCallbackUnlinkRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// IotConnectCallbackService_ServiceDesc is the grpc.ServiceDesc for IotConnectCallbackService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var IotConnectCallbackService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "keyapis.iot_connect.v1.IotConnectCallbackService",
	HandlerType: (*IotConnectCallbackServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCallbackUser",
			Handler:    _IotConnectCallbackService_GetCallbackUser_Handler,
		},
		{
			MethodName: "GetCallbackDevices",
			Handler:    _IotConnectCallbackService_GetCallbackDevices_Handler,
		},
		{
			MethodName: "PostCallbackStatus",
			Handler:    _IotConnectCallbackService_PostCallbackStatus_Handler,
		},
		{
			MethodName: "PostCallbackCommand",
			Handler:    _IotConnectCallbackService_PostCallbackCommand_Handler,
		},
		{
			MethodName: "PostCallbackUnlink",
			Handler:    _IotConnectCallbackService_PostCallbackUnlink_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "keyapis/iot_connect/v1/keyapis_iot_connect_callback_v1.proto",
}
