// 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/organizationmanager/v1/user_ssh_key_service.proto

package organizationmanager

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 (
	UserSshKeyService_Get_FullMethodName    = "/yandex.cloud.organizationmanager.v1.UserSshKeyService/Get"
	UserSshKeyService_List_FullMethodName   = "/yandex.cloud.organizationmanager.v1.UserSshKeyService/List"
	UserSshKeyService_Create_FullMethodName = "/yandex.cloud.organizationmanager.v1.UserSshKeyService/Create"
	UserSshKeyService_Update_FullMethodName = "/yandex.cloud.organizationmanager.v1.UserSshKeyService/Update"
	UserSshKeyService_Delete_FullMethodName = "/yandex.cloud.organizationmanager.v1.UserSshKeyService/Delete"
)

// UserSshKeyServiceClient is the client API for UserSshKeyService 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.
type UserSshKeyServiceClient interface {
	Get(ctx context.Context, in *GetUserSshKeyRequest, opts ...grpc.CallOption) (*UserSshKey, error)
	List(ctx context.Context, in *ListUserSshKeysRequest, opts ...grpc.CallOption) (*ListUserSshKeysResponse, error)
	Create(ctx context.Context, in *CreateUserSshKeyRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	Update(ctx context.Context, in *UpdateUserSshKeyRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	Delete(ctx context.Context, in *DeleteUserSshKeyRequest, opts ...grpc.CallOption) (*operation.Operation, error)
}

type userSshKeyServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewUserSshKeyServiceClient(cc grpc.ClientConnInterface) UserSshKeyServiceClient {
	return &userSshKeyServiceClient{cc}
}

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

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

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

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

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

// UserSshKeyServiceServer is the server API for UserSshKeyService service.
// All implementations should embed UnimplementedUserSshKeyServiceServer
// for forward compatibility.
type UserSshKeyServiceServer interface {
	Get(context.Context, *GetUserSshKeyRequest) (*UserSshKey, error)
	List(context.Context, *ListUserSshKeysRequest) (*ListUserSshKeysResponse, error)
	Create(context.Context, *CreateUserSshKeyRequest) (*operation.Operation, error)
	Update(context.Context, *UpdateUserSshKeyRequest) (*operation.Operation, error)
	Delete(context.Context, *DeleteUserSshKeyRequest) (*operation.Operation, error)
}

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

func (UnimplementedUserSshKeyServiceServer) Get(context.Context, *GetUserSshKeyRequest) (*UserSshKey, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedUserSshKeyServiceServer) List(context.Context, *ListUserSshKeysRequest) (*ListUserSshKeysResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedUserSshKeyServiceServer) Create(context.Context, *CreateUserSshKeyRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedUserSshKeyServiceServer) Update(context.Context, *UpdateUserSshKeyRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedUserSshKeyServiceServer) Delete(context.Context, *DeleteUserSshKeyRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedUserSshKeyServiceServer) testEmbeddedByValue() {}

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

func RegisterUserSshKeyServiceServer(s grpc.ServiceRegistrar, srv UserSshKeyServiceServer) {
	// If the following call panics, it indicates UnimplementedUserSshKeyServiceServer 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(&UserSshKeyService_ServiceDesc, srv)
}

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

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

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

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

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

// UserSshKeyService_ServiceDesc is the grpc.ServiceDesc for UserSshKeyService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserSshKeyService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.organizationmanager.v1.UserSshKeyService",
	HandlerType: (*UserSshKeyServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _UserSshKeyService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _UserSshKeyService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _UserSshKeyService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _UserSshKeyService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _UserSshKeyService_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/organizationmanager/v1/user_ssh_key_service.proto",
}
