// 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/compute/v1/reserved_instance_pool_service.proto

package compute

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 (
	ReservedInstancePoolService_Get_FullMethodName            = "/yandex.cloud.compute.v1.ReservedInstancePoolService/Get"
	ReservedInstancePoolService_List_FullMethodName           = "/yandex.cloud.compute.v1.ReservedInstancePoolService/List"
	ReservedInstancePoolService_Create_FullMethodName         = "/yandex.cloud.compute.v1.ReservedInstancePoolService/Create"
	ReservedInstancePoolService_Update_FullMethodName         = "/yandex.cloud.compute.v1.ReservedInstancePoolService/Update"
	ReservedInstancePoolService_Delete_FullMethodName         = "/yandex.cloud.compute.v1.ReservedInstancePoolService/Delete"
	ReservedInstancePoolService_ListOperations_FullMethodName = "/yandex.cloud.compute.v1.ReservedInstancePoolService/ListOperations"
	ReservedInstancePoolService_ListInstances_FullMethodName  = "/yandex.cloud.compute.v1.ReservedInstancePoolService/ListInstances"
)

// ReservedInstancePoolServiceClient is the client API for ReservedInstancePoolService 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 for managing reserved instance pool resources.
type ReservedInstancePoolServiceClient interface {
	// Returns the specified reserved instance pool resource.
	//
	// To get the list of available reserved instance pool resources, make a [List] request.
	Get(ctx context.Context, in *GetReservedInstancePoolRequest, opts ...grpc.CallOption) (*ReservedInstancePool, error)
	// Retrieves the list of reserved instance pool resources in the specified folder.
	List(ctx context.Context, in *ListReservedInstancePoolsRequest, opts ...grpc.CallOption) (*ListReservedInstancePoolsResponse, error)
	// Creates an reserved instance pool in the specified folder.
	// Method starts an asynchronous operation that can be cancelled while it is in progress.
	Create(ctx context.Context, in *CreateReservedInstancePoolRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the specified reserved instance pool.
	Update(ctx context.Context, in *UpdateReservedInstancePoolRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes the specified reserved instance pool.
	Delete(ctx context.Context, in *DeleteReservedInstancePoolRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Lists operations for the specified reserved instance pool.
	ListOperations(ctx context.Context, in *ListReservedInstancePoolOperationsRequest, opts ...grpc.CallOption) (*ListReservedInstancePoolOperationsResponse, error)
	// Retrieves the list of instances, using the specified reserved instance pool.
	ListInstances(ctx context.Context, in *ListReservedInstancePoolInstancesRequest, opts ...grpc.CallOption) (*ListReservedInstancePoolInstancesResponse, error)
}

type reservedInstancePoolServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewReservedInstancePoolServiceClient(cc grpc.ClientConnInterface) ReservedInstancePoolServiceClient {
	return &reservedInstancePoolServiceClient{cc}
}

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

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

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

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

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

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

func (c *reservedInstancePoolServiceClient) ListInstances(ctx context.Context, in *ListReservedInstancePoolInstancesRequest, opts ...grpc.CallOption) (*ListReservedInstancePoolInstancesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListReservedInstancePoolInstancesResponse)
	err := c.cc.Invoke(ctx, ReservedInstancePoolService_ListInstances_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ReservedInstancePoolServiceServer is the server API for ReservedInstancePoolService service.
// All implementations should embed UnimplementedReservedInstancePoolServiceServer
// for forward compatibility.
//
// A set of methods for managing reserved instance pool resources.
type ReservedInstancePoolServiceServer interface {
	// Returns the specified reserved instance pool resource.
	//
	// To get the list of available reserved instance pool resources, make a [List] request.
	Get(context.Context, *GetReservedInstancePoolRequest) (*ReservedInstancePool, error)
	// Retrieves the list of reserved instance pool resources in the specified folder.
	List(context.Context, *ListReservedInstancePoolsRequest) (*ListReservedInstancePoolsResponse, error)
	// Creates an reserved instance pool in the specified folder.
	// Method starts an asynchronous operation that can be cancelled while it is in progress.
	Create(context.Context, *CreateReservedInstancePoolRequest) (*operation.Operation, error)
	// Updates the specified reserved instance pool.
	Update(context.Context, *UpdateReservedInstancePoolRequest) (*operation.Operation, error)
	// Deletes the specified reserved instance pool.
	Delete(context.Context, *DeleteReservedInstancePoolRequest) (*operation.Operation, error)
	// Lists operations for the specified reserved instance pool.
	ListOperations(context.Context, *ListReservedInstancePoolOperationsRequest) (*ListReservedInstancePoolOperationsResponse, error)
	// Retrieves the list of instances, using the specified reserved instance pool.
	ListInstances(context.Context, *ListReservedInstancePoolInstancesRequest) (*ListReservedInstancePoolInstancesResponse, error)
}

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

func (UnimplementedReservedInstancePoolServiceServer) Get(context.Context, *GetReservedInstancePoolRequest) (*ReservedInstancePool, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedReservedInstancePoolServiceServer) List(context.Context, *ListReservedInstancePoolsRequest) (*ListReservedInstancePoolsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedReservedInstancePoolServiceServer) Create(context.Context, *CreateReservedInstancePoolRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedReservedInstancePoolServiceServer) Update(context.Context, *UpdateReservedInstancePoolRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedReservedInstancePoolServiceServer) Delete(context.Context, *DeleteReservedInstancePoolRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedReservedInstancePoolServiceServer) ListOperations(context.Context, *ListReservedInstancePoolOperationsRequest) (*ListReservedInstancePoolOperationsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented")
}
func (UnimplementedReservedInstancePoolServiceServer) ListInstances(context.Context, *ListReservedInstancePoolInstancesRequest) (*ListReservedInstancePoolInstancesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListInstances not implemented")
}
func (UnimplementedReservedInstancePoolServiceServer) testEmbeddedByValue() {}

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

func RegisterReservedInstancePoolServiceServer(s grpc.ServiceRegistrar, srv ReservedInstancePoolServiceServer) {
	// If the following call pancis, it indicates UnimplementedReservedInstancePoolServiceServer 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(&ReservedInstancePoolService_ServiceDesc, srv)
}

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

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

func _ReservedInstancePoolService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateReservedInstancePoolRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ReservedInstancePoolServiceServer).Create(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ReservedInstancePoolService_Create_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ReservedInstancePoolServiceServer).Create(ctx, req.(*CreateReservedInstancePoolRequest))
	}
	return interceptor(ctx, in, info, handler)
}

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

func _ReservedInstancePoolService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteReservedInstancePoolRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ReservedInstancePoolServiceServer).Delete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ReservedInstancePoolService_Delete_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ReservedInstancePoolServiceServer).Delete(ctx, req.(*DeleteReservedInstancePoolRequest))
	}
	return interceptor(ctx, in, info, handler)
}

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

func _ReservedInstancePoolService_ListInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListReservedInstancePoolInstancesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ReservedInstancePoolServiceServer).ListInstances(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ReservedInstancePoolService_ListInstances_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ReservedInstancePoolServiceServer).ListInstances(ctx, req.(*ListReservedInstancePoolInstancesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ReservedInstancePoolService_ServiceDesc is the grpc.ServiceDesc for ReservedInstancePoolService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ReservedInstancePoolService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.compute.v1.ReservedInstancePoolService",
	HandlerType: (*ReservedInstancePoolServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _ReservedInstancePoolService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _ReservedInstancePoolService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _ReservedInstancePoolService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _ReservedInstancePoolService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _ReservedInstancePoolService_Delete_Handler,
		},
		{
			MethodName: "ListOperations",
			Handler:    _ReservedInstancePoolService_ListOperations_Handler,
		},
		{
			MethodName: "ListInstances",
			Handler:    _ReservedInstancePoolService_ListInstances_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/compute/v1/reserved_instance_pool_service.proto",
}
