// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             (unknown)
// source: internal/plugin/grpc_controller.proto

package plugin

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 (
	GRPCController_Shutdown_FullMethodName = "/plugin.GRPCController/Shutdown"
)

// GRPCControllerClient is the client API for GRPCController 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 GRPCControllerClient interface {
	Shutdown(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
}

type gRPCControllerClient struct {
	cc grpc.ClientConnInterface
}

func NewGRPCControllerClient(cc grpc.ClientConnInterface) GRPCControllerClient {
	return &gRPCControllerClient{cc}
}

func (c *gRPCControllerClient) Shutdown(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
	out := new(Empty)
	err := c.cc.Invoke(ctx, GRPCController_Shutdown_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// GRPCControllerServer is the server API for GRPCController service.
// All implementations should embed UnimplementedGRPCControllerServer
// for forward compatibility
type GRPCControllerServer interface {
	Shutdown(context.Context, *Empty) (*Empty, error)
}

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

func (UnimplementedGRPCControllerServer) Shutdown(context.Context, *Empty) (*Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Shutdown not implemented")
}

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

func RegisterGRPCControllerServer(s grpc.ServiceRegistrar, srv GRPCControllerServer) {
	s.RegisterService(&GRPCController_ServiceDesc, srv)
}

func _GRPCController_Shutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GRPCControllerServer).Shutdown(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: GRPCController_Shutdown_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GRPCControllerServer).Shutdown(ctx, req.(*Empty))
	}
	return interceptor(ctx, in, info, handler)
}

// GRPCController_ServiceDesc is the grpc.ServiceDesc for GRPCController service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var GRPCController_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "plugin.GRPCController",
	HandlerType: (*GRPCControllerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Shutdown",
			Handler:    _GRPCController_Shutdown_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/plugin/grpc_controller.proto",
}
