// 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_subnet_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 (
	PrivateSubnetService_Get_FullMethodName            = "/yandex.cloud.baremetal.v1alpha.PrivateSubnetService/Get"
	PrivateSubnetService_List_FullMethodName           = "/yandex.cloud.baremetal.v1alpha.PrivateSubnetService/List"
	PrivateSubnetService_Create_FullMethodName         = "/yandex.cloud.baremetal.v1alpha.PrivateSubnetService/Create"
	PrivateSubnetService_Update_FullMethodName         = "/yandex.cloud.baremetal.v1alpha.PrivateSubnetService/Update"
	PrivateSubnetService_Delete_FullMethodName         = "/yandex.cloud.baremetal.v1alpha.PrivateSubnetService/Delete"
	PrivateSubnetService_ListOperations_FullMethodName = "/yandex.cloud.baremetal.v1alpha.PrivateSubnetService/ListOperations"
)

// PrivateSubnetServiceClient is the client API for PrivateSubnetService 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 PrivateSubnet resources.
type PrivateSubnetServiceClient interface {
	// Returns the specific PrivateSubnet resource.
	//
	// To get the list of available PrivateSubnet resources, make a [List] request.
	Get(ctx context.Context, in *GetPrivateSubnetRequest, opts ...grpc.CallOption) (*PrivateSubnet, error)
	// Retrieves the list of PrivateSubnet resources in the specified folder.
	List(ctx context.Context, in *ListPrivateSubnetRequest, opts ...grpc.CallOption) (*ListPrivateSubnetResponse, error)
	// Creates a private subnet in the specified folder.
	Create(ctx context.Context, in *CreatePrivateSubnetRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the specified private subnet.
	Update(ctx context.Context, in *UpdatePrivateSubnetRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes the specified private subnet.
	//
	// Deleting a private subnet removes its data permanently and is irreversible.
	Delete(ctx context.Context, in *DeletePrivateSubnetRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Lists operations for the specified private subnet.
	ListOperations(ctx context.Context, in *ListPrivateSubnetOperationsRequest, opts ...grpc.CallOption) (*ListPrivateSubnetOperationsResponse, error)
}

type privateSubnetServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewPrivateSubnetServiceClient(cc grpc.ClientConnInterface) PrivateSubnetServiceClient {
	return &privateSubnetServiceClient{cc}
}

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

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

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

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

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

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

// PrivateSubnetServiceServer is the server API for PrivateSubnetService service.
// All implementations should embed UnimplementedPrivateSubnetServiceServer
// for forward compatibility.
//
// A set of methods for managing PrivateSubnet resources.
type PrivateSubnetServiceServer interface {
	// Returns the specific PrivateSubnet resource.
	//
	// To get the list of available PrivateSubnet resources, make a [List] request.
	Get(context.Context, *GetPrivateSubnetRequest) (*PrivateSubnet, error)
	// Retrieves the list of PrivateSubnet resources in the specified folder.
	List(context.Context, *ListPrivateSubnetRequest) (*ListPrivateSubnetResponse, error)
	// Creates a private subnet in the specified folder.
	Create(context.Context, *CreatePrivateSubnetRequest) (*operation.Operation, error)
	// Updates the specified private subnet.
	Update(context.Context, *UpdatePrivateSubnetRequest) (*operation.Operation, error)
	// Deletes the specified private subnet.
	//
	// Deleting a private subnet removes its data permanently and is irreversible.
	Delete(context.Context, *DeletePrivateSubnetRequest) (*operation.Operation, error)
	// Lists operations for the specified private subnet.
	ListOperations(context.Context, *ListPrivateSubnetOperationsRequest) (*ListPrivateSubnetOperationsResponse, error)
}

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

func (UnimplementedPrivateSubnetServiceServer) Get(context.Context, *GetPrivateSubnetRequest) (*PrivateSubnet, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedPrivateSubnetServiceServer) List(context.Context, *ListPrivateSubnetRequest) (*ListPrivateSubnetResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedPrivateSubnetServiceServer) Create(context.Context, *CreatePrivateSubnetRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedPrivateSubnetServiceServer) Update(context.Context, *UpdatePrivateSubnetRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedPrivateSubnetServiceServer) Delete(context.Context, *DeletePrivateSubnetRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedPrivateSubnetServiceServer) ListOperations(context.Context, *ListPrivateSubnetOperationsRequest) (*ListPrivateSubnetOperationsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ListOperations not implemented")
}
func (UnimplementedPrivateSubnetServiceServer) testEmbeddedByValue() {}

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

func RegisterPrivateSubnetServiceServer(s grpc.ServiceRegistrar, srv PrivateSubnetServiceServer) {
	// If the following call panics, it indicates UnimplementedPrivateSubnetServiceServer 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(&PrivateSubnetService_ServiceDesc, srv)
}

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

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

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

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

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

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

// PrivateSubnetService_ServiceDesc is the grpc.ServiceDesc for PrivateSubnetService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PrivateSubnetService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.baremetal.v1alpha.PrivateSubnetService",
	HandlerType: (*PrivateSubnetServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _PrivateSubnetService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _PrivateSubnetService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _PrivateSubnetService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _PrivateSubnetService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _PrivateSubnetService_Delete_Handler,
		},
		{
			MethodName: "ListOperations",
			Handler:    _PrivateSubnetService_ListOperations_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/baremetal/v1alpha/private_subnet_service.proto",
}
