// 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/vrf_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 (
	VrfService_Get_FullMethodName            = "/yandex.cloud.baremetal.v1alpha.VrfService/Get"
	VrfService_List_FullMethodName           = "/yandex.cloud.baremetal.v1alpha.VrfService/List"
	VrfService_Create_FullMethodName         = "/yandex.cloud.baremetal.v1alpha.VrfService/Create"
	VrfService_Update_FullMethodName         = "/yandex.cloud.baremetal.v1alpha.VrfService/Update"
	VrfService_Delete_FullMethodName         = "/yandex.cloud.baremetal.v1alpha.VrfService/Delete"
	VrfService_ListOperations_FullMethodName = "/yandex.cloud.baremetal.v1alpha.VrfService/ListOperations"
)

// VrfServiceClient is the client API for VrfService 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 VRF resources.
type VrfServiceClient interface {
	// Returns the specific VRF resource.
	//
	// To get the list of available VRFs, make a [List] request.
	Get(ctx context.Context, in *GetVrfRequest, opts ...grpc.CallOption) (*Vrf, error)
	// Retrieves the list of VRF resources in the specified folder.
	List(ctx context.Context, in *ListVrfRequest, opts ...grpc.CallOption) (*ListVrfResponse, error)
	// Creates a VRF in the specified folder.
	Create(ctx context.Context, in *CreateVrfRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the specified VRF resource.
	Update(ctx context.Context, in *UpdateVrfRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes the specified VRF resource.
	//
	// Deleting a VRF removes its data permanently and is irreversible.
	Delete(ctx context.Context, in *DeleteVrfRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Lists operations for the specified VRF.
	ListOperations(ctx context.Context, in *ListVrfOperationsRequest, opts ...grpc.CallOption) (*ListVrfOperationsResponse, error)
}

type vrfServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewVrfServiceClient(cc grpc.ClientConnInterface) VrfServiceClient {
	return &vrfServiceClient{cc}
}

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

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

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

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

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

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

// VrfServiceServer is the server API for VrfService service.
// All implementations should embed UnimplementedVrfServiceServer
// for forward compatibility.
//
// A set of methods for managing VRF resources.
type VrfServiceServer interface {
	// Returns the specific VRF resource.
	//
	// To get the list of available VRFs, make a [List] request.
	Get(context.Context, *GetVrfRequest) (*Vrf, error)
	// Retrieves the list of VRF resources in the specified folder.
	List(context.Context, *ListVrfRequest) (*ListVrfResponse, error)
	// Creates a VRF in the specified folder.
	Create(context.Context, *CreateVrfRequest) (*operation.Operation, error)
	// Updates the specified VRF resource.
	Update(context.Context, *UpdateVrfRequest) (*operation.Operation, error)
	// Deletes the specified VRF resource.
	//
	// Deleting a VRF removes its data permanently and is irreversible.
	Delete(context.Context, *DeleteVrfRequest) (*operation.Operation, error)
	// Lists operations for the specified VRF.
	ListOperations(context.Context, *ListVrfOperationsRequest) (*ListVrfOperationsResponse, error)
}

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

func (UnimplementedVrfServiceServer) Get(context.Context, *GetVrfRequest) (*Vrf, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedVrfServiceServer) List(context.Context, *ListVrfRequest) (*ListVrfResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedVrfServiceServer) Create(context.Context, *CreateVrfRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedVrfServiceServer) Update(context.Context, *UpdateVrfRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedVrfServiceServer) Delete(context.Context, *DeleteVrfRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedVrfServiceServer) ListOperations(context.Context, *ListVrfOperationsRequest) (*ListVrfOperationsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented")
}
func (UnimplementedVrfServiceServer) testEmbeddedByValue() {}

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

func RegisterVrfServiceServer(s grpc.ServiceRegistrar, srv VrfServiceServer) {
	// If the following call pancis, it indicates UnimplementedVrfServiceServer 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(&VrfService_ServiceDesc, srv)
}

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

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

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

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

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

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

// VrfService_ServiceDesc is the grpc.ServiceDesc for VrfService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var VrfService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.baremetal.v1alpha.VrfService",
	HandlerType: (*VrfServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _VrfService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _VrfService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _VrfService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _VrfService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _VrfService_Delete_Handler,
		},
		{
			MethodName: "ListOperations",
			Handler:    _VrfService_ListOperations_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/baremetal/v1alpha/vrf_service.proto",
}
