// 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/vpc/v1/privatelink/private_endpoint_service.proto

package privatelink

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 (
	PrivateEndpointService_Get_FullMethodName            = "/yandex.cloud.vpc.v1.privatelink.PrivateEndpointService/Get"
	PrivateEndpointService_List_FullMethodName           = "/yandex.cloud.vpc.v1.privatelink.PrivateEndpointService/List"
	PrivateEndpointService_Create_FullMethodName         = "/yandex.cloud.vpc.v1.privatelink.PrivateEndpointService/Create"
	PrivateEndpointService_Update_FullMethodName         = "/yandex.cloud.vpc.v1.privatelink.PrivateEndpointService/Update"
	PrivateEndpointService_Delete_FullMethodName         = "/yandex.cloud.vpc.v1.privatelink.PrivateEndpointService/Delete"
	PrivateEndpointService_ListOperations_FullMethodName = "/yandex.cloud.vpc.v1.privatelink.PrivateEndpointService/ListOperations"
)

// PrivateEndpointServiceClient is the client API for PrivateEndpointService 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 PrivateEndpoint resources.
type PrivateEndpointServiceClient interface {
	// Returns the specified Private Endpoint resource.
	//
	// To get the list of all available PrivateEndpoint resources, make a [List]
	// request.
	Get(ctx context.Context, in *GetPrivateEndpointRequest, opts ...grpc.CallOption) (*PrivateEndpoint, error)
	// Retrieves the list of PrivateEndpoint resources in the specified folder.
	List(ctx context.Context, in *ListPrivateEndpointsRequest, opts ...grpc.CallOption) (*ListPrivateEndpointsResponse, error)
	// Creates an private endpoint in the specified folder and network.
	Create(ctx context.Context, in *CreatePrivateEndpointRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the specified private endpoint.
	Update(ctx context.Context, in *UpdatePrivateEndpointRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes the specified private endpoint.
	Delete(ctx context.Context, in *DeletePrivateEndpointRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// List operations for the specified private endpoint.
	ListOperations(ctx context.Context, in *ListPrivateEndpointOperationsRequest, opts ...grpc.CallOption) (*ListPrivateEndpointOperationsResponse, error)
}

type privateEndpointServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewPrivateEndpointServiceClient(cc grpc.ClientConnInterface) PrivateEndpointServiceClient {
	return &privateEndpointServiceClient{cc}
}

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

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

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

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

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

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

// PrivateEndpointServiceServer is the server API for PrivateEndpointService service.
// All implementations should embed UnimplementedPrivateEndpointServiceServer
// for forward compatibility.
//
// A set of methods for managing PrivateEndpoint resources.
type PrivateEndpointServiceServer interface {
	// Returns the specified Private Endpoint resource.
	//
	// To get the list of all available PrivateEndpoint resources, make a [List]
	// request.
	Get(context.Context, *GetPrivateEndpointRequest) (*PrivateEndpoint, error)
	// Retrieves the list of PrivateEndpoint resources in the specified folder.
	List(context.Context, *ListPrivateEndpointsRequest) (*ListPrivateEndpointsResponse, error)
	// Creates an private endpoint in the specified folder and network.
	Create(context.Context, *CreatePrivateEndpointRequest) (*operation.Operation, error)
	// Updates the specified private endpoint.
	Update(context.Context, *UpdatePrivateEndpointRequest) (*operation.Operation, error)
	// Deletes the specified private endpoint.
	Delete(context.Context, *DeletePrivateEndpointRequest) (*operation.Operation, error)
	// List operations for the specified private endpoint.
	ListOperations(context.Context, *ListPrivateEndpointOperationsRequest) (*ListPrivateEndpointOperationsResponse, error)
}

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

func (UnimplementedPrivateEndpointServiceServer) Get(context.Context, *GetPrivateEndpointRequest) (*PrivateEndpoint, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedPrivateEndpointServiceServer) List(context.Context, *ListPrivateEndpointsRequest) (*ListPrivateEndpointsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedPrivateEndpointServiceServer) Create(context.Context, *CreatePrivateEndpointRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedPrivateEndpointServiceServer) Update(context.Context, *UpdatePrivateEndpointRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedPrivateEndpointServiceServer) Delete(context.Context, *DeletePrivateEndpointRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedPrivateEndpointServiceServer) ListOperations(context.Context, *ListPrivateEndpointOperationsRequest) (*ListPrivateEndpointOperationsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented")
}
func (UnimplementedPrivateEndpointServiceServer) testEmbeddedByValue() {}

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

func RegisterPrivateEndpointServiceServer(s grpc.ServiceRegistrar, srv PrivateEndpointServiceServer) {
	// If the following call pancis, it indicates UnimplementedPrivateEndpointServiceServer 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(&PrivateEndpointService_ServiceDesc, srv)
}

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

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

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

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

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

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

// PrivateEndpointService_ServiceDesc is the grpc.ServiceDesc for PrivateEndpointService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PrivateEndpointService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.vpc.v1.privatelink.PrivateEndpointService",
	HandlerType: (*PrivateEndpointServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _PrivateEndpointService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _PrivateEndpointService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _PrivateEndpointService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _PrivateEndpointService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _PrivateEndpointService_Delete_Handler,
		},
		{
			MethodName: "ListOperations",
			Handler:    _PrivateEndpointService_ListOperations_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/vpc/v1/privatelink/private_endpoint_service.proto",
}
