// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v3.21.12
// source: yandex/cloud/baremetal/v1alpha/hardware_pool_service.proto

package baremetal

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	HardwarePoolService_Get_FullMethodName  = "/yandex.cloud.baremetal.v1alpha.HardwarePoolService/Get"
	HardwarePoolService_List_FullMethodName = "/yandex.cloud.baremetal.v1alpha.HardwarePoolService/List"
)

// HardwarePoolServiceClient is the client API for HardwarePoolService 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.
//
// A set of methods to retrieve information about HardwarePool resources.
type HardwarePoolServiceClient interface {
	// Returns the specific HardwarePool resource.
	//
	// To get the list of available HardwarePool resource, make a [List] request.
	Get(ctx context.Context, in *GetHardwarePoolRequest, opts ...grpc.CallOption) (*HardwarePool, error)
	// Retrieves the list of HardwarePool resources.
	List(ctx context.Context, in *ListHardwarePoolsRequest, opts ...grpc.CallOption) (*ListHardwarePoolsResponse, error)
}

type hardwarePoolServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewHardwarePoolServiceClient(cc grpc.ClientConnInterface) HardwarePoolServiceClient {
	return &hardwarePoolServiceClient{cc}
}

func (c *hardwarePoolServiceClient) Get(ctx context.Context, in *GetHardwarePoolRequest, opts ...grpc.CallOption) (*HardwarePool, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(HardwarePool)
	err := c.cc.Invoke(ctx, HardwarePoolService_Get_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hardwarePoolServiceClient) List(ctx context.Context, in *ListHardwarePoolsRequest, opts ...grpc.CallOption) (*ListHardwarePoolsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListHardwarePoolsResponse)
	err := c.cc.Invoke(ctx, HardwarePoolService_List_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// HardwarePoolServiceServer is the server API for HardwarePoolService service.
// All implementations should embed UnimplementedHardwarePoolServiceServer
// for forward compatibility.
//
// A set of methods to retrieve information about HardwarePool resources.
type HardwarePoolServiceServer interface {
	// Returns the specific HardwarePool resource.
	//
	// To get the list of available HardwarePool resource, make a [List] request.
	Get(context.Context, *GetHardwarePoolRequest) (*HardwarePool, error)
	// Retrieves the list of HardwarePool resources.
	List(context.Context, *ListHardwarePoolsRequest) (*ListHardwarePoolsResponse, error)
}

// UnimplementedHardwarePoolServiceServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedHardwarePoolServiceServer struct{}

func (UnimplementedHardwarePoolServiceServer) Get(context.Context, *GetHardwarePoolRequest) (*HardwarePool, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedHardwarePoolServiceServer) List(context.Context, *ListHardwarePoolsRequest) (*ListHardwarePoolsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedHardwarePoolServiceServer) testEmbeddedByValue() {}

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

func RegisterHardwarePoolServiceServer(s grpc.ServiceRegistrar, srv HardwarePoolServiceServer) {
	// If the following call pancis, it indicates UnimplementedHardwarePoolServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&HardwarePoolService_ServiceDesc, srv)
}

func _HardwarePoolService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetHardwarePoolRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HardwarePoolServiceServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: HardwarePoolService_Get_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HardwarePoolServiceServer).Get(ctx, req.(*GetHardwarePoolRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HardwarePoolService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListHardwarePoolsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HardwarePoolServiceServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: HardwarePoolService_List_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HardwarePoolServiceServer).List(ctx, req.(*ListHardwarePoolsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// HardwarePoolService_ServiceDesc is the grpc.ServiceDesc for HardwarePoolService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var HardwarePoolService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.baremetal.v1alpha.HardwarePoolService",
	HandlerType: (*HardwarePoolServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _HardwarePoolService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _HardwarePoolService_List_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/baremetal/v1alpha/hardware_pool_service.proto",
}
