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

package baremetal

import (
	context "context"
	operation "github.com/yandex-cloud/go-genproto/yandex/cloud/operation"
	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 (
	PublicPrefixPoolService_Get_FullMethodName            = "/yandex.cloud.baremetal.v1alpha.PublicPrefixPoolService/Get"
	PublicPrefixPoolService_List_FullMethodName           = "/yandex.cloud.baremetal.v1alpha.PublicPrefixPoolService/List"
	PublicPrefixPoolService_Update_FullMethodName         = "/yandex.cloud.baremetal.v1alpha.PublicPrefixPoolService/Update"
	PublicPrefixPoolService_ListOperations_FullMethodName = "/yandex.cloud.baremetal.v1alpha.PublicPrefixPoolService/ListOperations"
)

// PublicPrefixPoolServiceClient is the client API for PublicPrefixPoolService 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 PublicPrefixPoolServiceClient interface {
	// Returns the specified public prefix pool.
	Get(ctx context.Context, in *GetPublicPrefixPoolRequest, opts ...grpc.CallOption) (*PublicPrefixPool, error)
	// Lists public prefix pools in the specified folder.
	List(ctx context.Context, in *ListPublicPrefixPoolRequest, opts ...grpc.CallOption) (*ListPublicPrefixPoolResponse, error)
	// Updates the specified public prefix pool.
	Update(ctx context.Context, in *UpdatePublicPrefixPoolRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Lists operations for the specified public prefix pool.
	ListOperations(ctx context.Context, in *ListPublicPrefixPoolOperationsRequest, opts ...grpc.CallOption) (*ListPublicPrefixPoolOperationsResponse, error)
}

type publicPrefixPoolServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewPublicPrefixPoolServiceClient(cc grpc.ClientConnInterface) PublicPrefixPoolServiceClient {
	return &publicPrefixPoolServiceClient{cc}
}

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

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

func (c *publicPrefixPoolServiceClient) Update(ctx context.Context, in *UpdatePublicPrefixPoolRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, PublicPrefixPoolService_Update_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *publicPrefixPoolServiceClient) ListOperations(ctx context.Context, in *ListPublicPrefixPoolOperationsRequest, opts ...grpc.CallOption) (*ListPublicPrefixPoolOperationsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListPublicPrefixPoolOperationsResponse)
	err := c.cc.Invoke(ctx, PublicPrefixPoolService_ListOperations_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PublicPrefixPoolServiceServer is the server API for PublicPrefixPoolService service.
// All implementations should embed UnimplementedPublicPrefixPoolServiceServer
// for forward compatibility.
type PublicPrefixPoolServiceServer interface {
	// Returns the specified public prefix pool.
	Get(context.Context, *GetPublicPrefixPoolRequest) (*PublicPrefixPool, error)
	// Lists public prefix pools in the specified folder.
	List(context.Context, *ListPublicPrefixPoolRequest) (*ListPublicPrefixPoolResponse, error)
	// Updates the specified public prefix pool.
	Update(context.Context, *UpdatePublicPrefixPoolRequest) (*operation.Operation, error)
	// Lists operations for the specified public prefix pool.
	ListOperations(context.Context, *ListPublicPrefixPoolOperationsRequest) (*ListPublicPrefixPoolOperationsResponse, error)
}

// UnimplementedPublicPrefixPoolServiceServer 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 UnimplementedPublicPrefixPoolServiceServer struct{}

func (UnimplementedPublicPrefixPoolServiceServer) Get(context.Context, *GetPublicPrefixPoolRequest) (*PublicPrefixPool, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedPublicPrefixPoolServiceServer) List(context.Context, *ListPublicPrefixPoolRequest) (*ListPublicPrefixPoolResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedPublicPrefixPoolServiceServer) Update(context.Context, *UpdatePublicPrefixPoolRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedPublicPrefixPoolServiceServer) ListOperations(context.Context, *ListPublicPrefixPoolOperationsRequest) (*ListPublicPrefixPoolOperationsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ListOperations not implemented")
}
func (UnimplementedPublicPrefixPoolServiceServer) testEmbeddedByValue() {}

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

func RegisterPublicPrefixPoolServiceServer(s grpc.ServiceRegistrar, srv PublicPrefixPoolServiceServer) {
	// If the following call panics, it indicates UnimplementedPublicPrefixPoolServiceServer 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(&PublicPrefixPoolService_ServiceDesc, srv)
}

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

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

func _PublicPrefixPoolService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdatePublicPrefixPoolRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PublicPrefixPoolServiceServer).Update(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PublicPrefixPoolService_Update_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PublicPrefixPoolServiceServer).Update(ctx, req.(*UpdatePublicPrefixPoolRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PublicPrefixPoolService_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListPublicPrefixPoolOperationsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PublicPrefixPoolServiceServer).ListOperations(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PublicPrefixPoolService_ListOperations_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PublicPrefixPoolServiceServer).ListOperations(ctx, req.(*ListPublicPrefixPoolOperationsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// PublicPrefixPoolService_ServiceDesc is the grpc.ServiceDesc for PublicPrefixPoolService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PublicPrefixPoolService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.baremetal.v1alpha.PublicPrefixPoolService",
	HandlerType: (*PublicPrefixPoolServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _PublicPrefixPoolService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _PublicPrefixPoolService_List_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _PublicPrefixPoolService_Update_Handler,
		},
		{
			MethodName: "ListOperations",
			Handler:    _PublicPrefixPoolService_ListOperations_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/baremetal/v1alpha/public_prefix_pool_service.proto",
}
