//
//Сервис массового оповещения через домофоны

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

package keyapis_access_control_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 (
	BroadcastAlertService_PostBroadcastAlertStart_FullMethodName = "/keyapis.access_control.v1.BroadcastAlertService/PostBroadcastAlertStart"
	BroadcastAlertService_PostBroadcastAlertStop_FullMethodName  = "/keyapis.access_control.v1.BroadcastAlertService/PostBroadcastAlertStop"
)

// BroadcastAlertServiceClient is the client API for BroadcastAlertService 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 BroadcastAlertServiceClient interface {
	// Метод запуска массового оповещения через домофоны.
	// Метод доступен для: ApiKey
	PostBroadcastAlertStart(ctx context.Context, in *PostBroadcastAlertStartRequest, opts ...grpc.CallOption) (*PostBroadcastAlertStartResponse, error)
	// Метод прекращения массового оповещения через домофоны.
	// Метод доступен для: ApiKey
	PostBroadcastAlertStop(ctx context.Context, in *PostBroadcastAlertStopRequest, opts ...grpc.CallOption) (*PostBroadcastAlertStopResponse, error)
}

type broadcastAlertServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewBroadcastAlertServiceClient(cc grpc.ClientConnInterface) BroadcastAlertServiceClient {
	return &broadcastAlertServiceClient{cc}
}

func (c *broadcastAlertServiceClient) PostBroadcastAlertStart(ctx context.Context, in *PostBroadcastAlertStartRequest, opts ...grpc.CallOption) (*PostBroadcastAlertStartResponse, error) {
	out := new(PostBroadcastAlertStartResponse)
	err := c.cc.Invoke(ctx, BroadcastAlertService_PostBroadcastAlertStart_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *broadcastAlertServiceClient) PostBroadcastAlertStop(ctx context.Context, in *PostBroadcastAlertStopRequest, opts ...grpc.CallOption) (*PostBroadcastAlertStopResponse, error) {
	out := new(PostBroadcastAlertStopResponse)
	err := c.cc.Invoke(ctx, BroadcastAlertService_PostBroadcastAlertStop_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// BroadcastAlertServiceServer is the server API for BroadcastAlertService service.
// All implementations should embed UnimplementedBroadcastAlertServiceServer
// for forward compatibility
type BroadcastAlertServiceServer interface {
	// Метод запуска массового оповещения через домофоны.
	// Метод доступен для: ApiKey
	PostBroadcastAlertStart(context.Context, *PostBroadcastAlertStartRequest) (*PostBroadcastAlertStartResponse, error)
	// Метод прекращения массового оповещения через домофоны.
	// Метод доступен для: ApiKey
	PostBroadcastAlertStop(context.Context, *PostBroadcastAlertStopRequest) (*PostBroadcastAlertStopResponse, error)
}

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

func (UnimplementedBroadcastAlertServiceServer) PostBroadcastAlertStart(context.Context, *PostBroadcastAlertStartRequest) (*PostBroadcastAlertStartResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PostBroadcastAlertStart not implemented")
}
func (UnimplementedBroadcastAlertServiceServer) PostBroadcastAlertStop(context.Context, *PostBroadcastAlertStopRequest) (*PostBroadcastAlertStopResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PostBroadcastAlertStop not implemented")
}

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

func RegisterBroadcastAlertServiceServer(s grpc.ServiceRegistrar, srv BroadcastAlertServiceServer) {
	s.RegisterService(&BroadcastAlertService_ServiceDesc, srv)
}

func _BroadcastAlertService_PostBroadcastAlertStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PostBroadcastAlertStartRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BroadcastAlertServiceServer).PostBroadcastAlertStart(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BroadcastAlertService_PostBroadcastAlertStart_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BroadcastAlertServiceServer).PostBroadcastAlertStart(ctx, req.(*PostBroadcastAlertStartRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _BroadcastAlertService_PostBroadcastAlertStop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PostBroadcastAlertStopRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BroadcastAlertServiceServer).PostBroadcastAlertStop(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BroadcastAlertService_PostBroadcastAlertStop_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BroadcastAlertServiceServer).PostBroadcastAlertStop(ctx, req.(*PostBroadcastAlertStopRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// BroadcastAlertService_ServiceDesc is the grpc.ServiceDesc for BroadcastAlertService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BroadcastAlertService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "keyapis.access_control.v1.BroadcastAlertService",
	HandlerType: (*BroadcastAlertServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PostBroadcastAlertStart",
			Handler:    _BroadcastAlertService_PostBroadcastAlertStart_Handler,
		},
		{
			MethodName: "PostBroadcastAlertStop",
			Handler:    _BroadcastAlertService_PostBroadcastAlertStop_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "keyapis/access_control/v1/keyapis_access_control_broadcast_alert_v1.proto",
}
