// 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/gpu_cluster_service.proto

package compute

import (
	context "context"
	access "github.com/yandex-cloud/go-genproto/yandex/cloud/access"
	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 (
	GpuClusterService_Get_FullMethodName                  = "/yandex.cloud.compute.v1.GpuClusterService/Get"
	GpuClusterService_List_FullMethodName                 = "/yandex.cloud.compute.v1.GpuClusterService/List"
	GpuClusterService_Create_FullMethodName               = "/yandex.cloud.compute.v1.GpuClusterService/Create"
	GpuClusterService_Update_FullMethodName               = "/yandex.cloud.compute.v1.GpuClusterService/Update"
	GpuClusterService_Delete_FullMethodName               = "/yandex.cloud.compute.v1.GpuClusterService/Delete"
	GpuClusterService_ListOperations_FullMethodName       = "/yandex.cloud.compute.v1.GpuClusterService/ListOperations"
	GpuClusterService_ListInstances_FullMethodName        = "/yandex.cloud.compute.v1.GpuClusterService/ListInstances"
	GpuClusterService_ListAccessBindings_FullMethodName   = "/yandex.cloud.compute.v1.GpuClusterService/ListAccessBindings"
	GpuClusterService_SetAccessBindings_FullMethodName    = "/yandex.cloud.compute.v1.GpuClusterService/SetAccessBindings"
	GpuClusterService_UpdateAccessBindings_FullMethodName = "/yandex.cloud.compute.v1.GpuClusterService/UpdateAccessBindings"
)

// GpuClusterServiceClient is the client API for GpuClusterService 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 GPU clusters.
type GpuClusterServiceClient interface {
	// Returns the specified GPU cluster.
	//
	// To get the list of available GPU clusters, make a [List] request.
	Get(ctx context.Context, in *GetGpuClusterRequest, opts ...grpc.CallOption) (*GpuCluster, error)
	// Retrieves the list of GPU clusters in the specified folder.
	List(ctx context.Context, in *ListGpuClustersRequest, opts ...grpc.CallOption) (*ListGpuClustersResponse, error)
	// Creates a GPU cluster in the specified folder.
	Create(ctx context.Context, in *CreateGpuClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the specified GPU cluster.
	//
	// Currently only name, description and labels can be updated.
	Update(ctx context.Context, in *UpdateGpuClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes the specified GPU cluster.
	//
	// GPU cluster can be deleted only if it doesn't have any instances associated with it.
	Delete(ctx context.Context, in *DeleteGpuClusterRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Lists operations for the specified GPU cluster.
	ListOperations(ctx context.Context, in *ListGpuClusterOperationsRequest, opts ...grpc.CallOption) (*ListGpuClusterOperationsResponse, error)
	// List instances created in this GPU cluster.
	ListInstances(ctx context.Context, in *ListGpuClusterInstancesRequest, opts ...grpc.CallOption) (*ListGpuClusterInstancesResponse, error)
	// Lists access bindings for the GPU cluster.
	ListAccessBindings(ctx context.Context, in *access.ListAccessBindingsRequest, opts ...grpc.CallOption) (*access.ListAccessBindingsResponse, error)
	// Sets access bindings for the GPU cluster.
	SetAccessBindings(ctx context.Context, in *access.SetAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates access bindings for the GPU cluster.
	UpdateAccessBindings(ctx context.Context, in *access.UpdateAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error)
}

type gpuClusterServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewGpuClusterServiceClient(cc grpc.ClientConnInterface) GpuClusterServiceClient {
	return &gpuClusterServiceClient{cc}
}

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

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

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

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

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

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

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

func (c *gpuClusterServiceClient) ListAccessBindings(ctx context.Context, in *access.ListAccessBindingsRequest, opts ...grpc.CallOption) (*access.ListAccessBindingsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(access.ListAccessBindingsResponse)
	err := c.cc.Invoke(ctx, GpuClusterService_ListAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *gpuClusterServiceClient) SetAccessBindings(ctx context.Context, in *access.SetAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, GpuClusterService_SetAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *gpuClusterServiceClient) UpdateAccessBindings(ctx context.Context, in *access.UpdateAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, GpuClusterService_UpdateAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// GpuClusterServiceServer is the server API for GpuClusterService service.
// All implementations should embed UnimplementedGpuClusterServiceServer
// for forward compatibility.
//
// A set of methods for managing GPU clusters.
type GpuClusterServiceServer interface {
	// Returns the specified GPU cluster.
	//
	// To get the list of available GPU clusters, make a [List] request.
	Get(context.Context, *GetGpuClusterRequest) (*GpuCluster, error)
	// Retrieves the list of GPU clusters in the specified folder.
	List(context.Context, *ListGpuClustersRequest) (*ListGpuClustersResponse, error)
	// Creates a GPU cluster in the specified folder.
	Create(context.Context, *CreateGpuClusterRequest) (*operation.Operation, error)
	// Updates the specified GPU cluster.
	//
	// Currently only name, description and labels can be updated.
	Update(context.Context, *UpdateGpuClusterRequest) (*operation.Operation, error)
	// Deletes the specified GPU cluster.
	//
	// GPU cluster can be deleted only if it doesn't have any instances associated with it.
	Delete(context.Context, *DeleteGpuClusterRequest) (*operation.Operation, error)
	// Lists operations for the specified GPU cluster.
	ListOperations(context.Context, *ListGpuClusterOperationsRequest) (*ListGpuClusterOperationsResponse, error)
	// List instances created in this GPU cluster.
	ListInstances(context.Context, *ListGpuClusterInstancesRequest) (*ListGpuClusterInstancesResponse, error)
	// Lists access bindings for the GPU cluster.
	ListAccessBindings(context.Context, *access.ListAccessBindingsRequest) (*access.ListAccessBindingsResponse, error)
	// Sets access bindings for the GPU cluster.
	SetAccessBindings(context.Context, *access.SetAccessBindingsRequest) (*operation.Operation, error)
	// Updates access bindings for the GPU cluster.
	UpdateAccessBindings(context.Context, *access.UpdateAccessBindingsRequest) (*operation.Operation, error)
}

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

func (UnimplementedGpuClusterServiceServer) Get(context.Context, *GetGpuClusterRequest) (*GpuCluster, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedGpuClusterServiceServer) List(context.Context, *ListGpuClustersRequest) (*ListGpuClustersResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedGpuClusterServiceServer) Create(context.Context, *CreateGpuClusterRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedGpuClusterServiceServer) Update(context.Context, *UpdateGpuClusterRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedGpuClusterServiceServer) Delete(context.Context, *DeleteGpuClusterRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedGpuClusterServiceServer) ListOperations(context.Context, *ListGpuClusterOperationsRequest) (*ListGpuClusterOperationsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented")
}
func (UnimplementedGpuClusterServiceServer) ListInstances(context.Context, *ListGpuClusterInstancesRequest) (*ListGpuClusterInstancesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListInstances not implemented")
}
func (UnimplementedGpuClusterServiceServer) ListAccessBindings(context.Context, *access.ListAccessBindingsRequest) (*access.ListAccessBindingsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListAccessBindings not implemented")
}
func (UnimplementedGpuClusterServiceServer) SetAccessBindings(context.Context, *access.SetAccessBindingsRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetAccessBindings not implemented")
}
func (UnimplementedGpuClusterServiceServer) UpdateAccessBindings(context.Context, *access.UpdateAccessBindingsRequest) (*operation.Operation, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateAccessBindings not implemented")
}
func (UnimplementedGpuClusterServiceServer) testEmbeddedByValue() {}

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

func RegisterGpuClusterServiceServer(s grpc.ServiceRegistrar, srv GpuClusterServiceServer) {
	// If the following call pancis, it indicates UnimplementedGpuClusterServiceServer 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(&GpuClusterService_ServiceDesc, srv)
}

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

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

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

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

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

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

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

func _GpuClusterService_ListAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.ListAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GpuClusterServiceServer).ListAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: GpuClusterService_ListAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GpuClusterServiceServer).ListAccessBindings(ctx, req.(*access.ListAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _GpuClusterService_SetAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.SetAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GpuClusterServiceServer).SetAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: GpuClusterService_SetAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GpuClusterServiceServer).SetAccessBindings(ctx, req.(*access.SetAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _GpuClusterService_UpdateAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.UpdateAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GpuClusterServiceServer).UpdateAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: GpuClusterService_UpdateAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GpuClusterServiceServer).UpdateAccessBindings(ctx, req.(*access.UpdateAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// GpuClusterService_ServiceDesc is the grpc.ServiceDesc for GpuClusterService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var GpuClusterService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.compute.v1.GpuClusterService",
	HandlerType: (*GpuClusterServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _GpuClusterService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _GpuClusterService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _GpuClusterService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _GpuClusterService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _GpuClusterService_Delete_Handler,
		},
		{
			MethodName: "ListOperations",
			Handler:    _GpuClusterService_ListOperations_Handler,
		},
		{
			MethodName: "ListInstances",
			Handler:    _GpuClusterService_ListInstances_Handler,
		},
		{
			MethodName: "ListAccessBindings",
			Handler:    _GpuClusterService_ListAccessBindings_Handler,
		},
		{
			MethodName: "SetAccessBindings",
			Handler:    _GpuClusterService_SetAccessBindings_Handler,
		},
		{
			MethodName: "UpdateAccessBindings",
			Handler:    _GpuClusterService_UpdateAccessBindings_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/compute/v1/gpu_cluster_service.proto",
}
