// 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/private_cloud_connection_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 (
	PrivateCloudConnectionService_Get_FullMethodName    = "/yandex.cloud.baremetal.v1alpha.PrivateCloudConnectionService/Get"
	PrivateCloudConnectionService_List_FullMethodName   = "/yandex.cloud.baremetal.v1alpha.PrivateCloudConnectionService/List"
	PrivateCloudConnectionService_Create_FullMethodName = "/yandex.cloud.baremetal.v1alpha.PrivateCloudConnectionService/Create"
	PrivateCloudConnectionService_Update_FullMethodName = "/yandex.cloud.baremetal.v1alpha.PrivateCloudConnectionService/Update"
	PrivateCloudConnectionService_Delete_FullMethodName = "/yandex.cloud.baremetal.v1alpha.PrivateCloudConnectionService/Delete"
)

// PrivateCloudConnectionServiceClient is the client API for PrivateCloudConnectionService 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 Private cloud connection resources.
type PrivateCloudConnectionServiceClient interface {
	// Returns the specific Private cloud connection resource.
	// To get the list of available Private cloud connection resources, make a [List] request.
	Get(ctx context.Context, in *GetPrivateCloudConnectionRequest, opts ...grpc.CallOption) (*PrivateCloudConnection, error)
	// Retrieves the list of Private cloud connection resources in the specified folder.
	List(ctx context.Context, in *ListPrivateCloudConnectionRequest, opts ...grpc.CallOption) (*ListPrivateCloudConnectionResponse, error)
	// Creates a private cloud connection in the specified folder.
	Create(ctx context.Context, in *CreatePrivateCloudConnectionRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the routing_instance_id in a private cloud connection.
	Update(ctx context.Context, in *UpdatePrivateCloudConnectionRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Removes a private cloud connection and all allocated network resouces
	Delete(ctx context.Context, in *DeletePrivateCloudConnectionRequest, opts ...grpc.CallOption) (*operation.Operation, error)
}

type privateCloudConnectionServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewPrivateCloudConnectionServiceClient(cc grpc.ClientConnInterface) PrivateCloudConnectionServiceClient {
	return &privateCloudConnectionServiceClient{cc}
}

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

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

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

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

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

// PrivateCloudConnectionServiceServer is the server API for PrivateCloudConnectionService service.
// All implementations should embed UnimplementedPrivateCloudConnectionServiceServer
// for forward compatibility.
//
// A set of methods for managing Private cloud connection resources.
type PrivateCloudConnectionServiceServer interface {
	// Returns the specific Private cloud connection resource.
	// To get the list of available Private cloud connection resources, make a [List] request.
	Get(context.Context, *GetPrivateCloudConnectionRequest) (*PrivateCloudConnection, error)
	// Retrieves the list of Private cloud connection resources in the specified folder.
	List(context.Context, *ListPrivateCloudConnectionRequest) (*ListPrivateCloudConnectionResponse, error)
	// Creates a private cloud connection in the specified folder.
	Create(context.Context, *CreatePrivateCloudConnectionRequest) (*operation.Operation, error)
	// Updates the routing_instance_id in a private cloud connection.
	Update(context.Context, *UpdatePrivateCloudConnectionRequest) (*operation.Operation, error)
	// Removes a private cloud connection and all allocated network resouces
	Delete(context.Context, *DeletePrivateCloudConnectionRequest) (*operation.Operation, error)
}

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

func (UnimplementedPrivateCloudConnectionServiceServer) Get(context.Context, *GetPrivateCloudConnectionRequest) (*PrivateCloudConnection, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedPrivateCloudConnectionServiceServer) List(context.Context, *ListPrivateCloudConnectionRequest) (*ListPrivateCloudConnectionResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedPrivateCloudConnectionServiceServer) Create(context.Context, *CreatePrivateCloudConnectionRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedPrivateCloudConnectionServiceServer) Update(context.Context, *UpdatePrivateCloudConnectionRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedPrivateCloudConnectionServiceServer) Delete(context.Context, *DeletePrivateCloudConnectionRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedPrivateCloudConnectionServiceServer) testEmbeddedByValue() {}

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

func RegisterPrivateCloudConnectionServiceServer(s grpc.ServiceRegistrar, srv PrivateCloudConnectionServiceServer) {
	// If the following call panics, it indicates UnimplementedPrivateCloudConnectionServiceServer 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(&PrivateCloudConnectionService_ServiceDesc, srv)
}

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

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

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

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

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

// PrivateCloudConnectionService_ServiceDesc is the grpc.ServiceDesc for PrivateCloudConnectionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PrivateCloudConnectionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.baremetal.v1alpha.PrivateCloudConnectionService",
	HandlerType: (*PrivateCloudConnectionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _PrivateCloudConnectionService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _PrivateCloudConnectionService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _PrivateCloudConnectionService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _PrivateCloudConnectionService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _PrivateCloudConnectionService_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/baremetal/v1alpha/private_cloud_connection_service.proto",
}
