// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v4.23.4
// source: wandb/proto/wandb_system_monitor.proto

package service_go_proto

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// 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 (
	SystemMonitor_GetStats_FullMethodName    = "/wandb_internal.SystemMonitor/GetStats"
	SystemMonitor_GetMetadata_FullMethodName = "/wandb_internal.SystemMonitor/GetMetadata"
	SystemMonitor_TearDown_FullMethodName    = "/wandb_internal.SystemMonitor/TearDown"
)

// SystemMonitorClient is the client API for SystemMonitor 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.
//
// SystemMonitor gRPC service.
//
// This service is used to collect system metrics from the host machine.
type SystemMonitorClient interface {
	// GetStats samples system metrics.
	GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*Record, error)
	// GetMetadata returns static metadata about the system.
	GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*Record, error)
	// TearDown tears down the system monitor.
	TearDown(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type systemMonitorClient struct {
	cc grpc.ClientConnInterface
}

func NewSystemMonitorClient(cc grpc.ClientConnInterface) SystemMonitorClient {
	return &systemMonitorClient{cc}
}

func (c *systemMonitorClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*Record, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Record)
	err := c.cc.Invoke(ctx, SystemMonitor_GetStats_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *systemMonitorClient) GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*Record, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Record)
	err := c.cc.Invoke(ctx, SystemMonitor_GetMetadata_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *systemMonitorClient) TearDown(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, SystemMonitor_TearDown_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SystemMonitorServer is the server API for SystemMonitor service.
// All implementations must embed UnimplementedSystemMonitorServer
// for forward compatibility.
//
// SystemMonitor gRPC service.
//
// This service is used to collect system metrics from the host machine.
type SystemMonitorServer interface {
	// GetStats samples system metrics.
	GetStats(context.Context, *GetStatsRequest) (*Record, error)
	// GetMetadata returns static metadata about the system.
	GetMetadata(context.Context, *GetMetadataRequest) (*Record, error)
	// TearDown tears down the system monitor.
	TearDown(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	mustEmbedUnimplementedSystemMonitorServer()
}

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

func (UnimplementedSystemMonitorServer) GetStats(context.Context, *GetStatsRequest) (*Record, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
}
func (UnimplementedSystemMonitorServer) GetMetadata(context.Context, *GetMetadataRequest) (*Record, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented")
}
func (UnimplementedSystemMonitorServer) TearDown(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method TearDown not implemented")
}
func (UnimplementedSystemMonitorServer) mustEmbedUnimplementedSystemMonitorServer() {}
func (UnimplementedSystemMonitorServer) testEmbeddedByValue()                       {}

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

func RegisterSystemMonitorServer(s grpc.ServiceRegistrar, srv SystemMonitorServer) {
	// If the following call pancis, it indicates UnimplementedSystemMonitorServer 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(&SystemMonitor_ServiceDesc, srv)
}

func _SystemMonitor_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetStatsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SystemMonitorServer).GetStats(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SystemMonitor_GetStats_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SystemMonitorServer).GetStats(ctx, req.(*GetStatsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SystemMonitor_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetMetadataRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SystemMonitorServer).GetMetadata(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SystemMonitor_GetMetadata_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SystemMonitorServer).GetMetadata(ctx, req.(*GetMetadataRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SystemMonitor_TearDown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SystemMonitorServer).TearDown(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SystemMonitor_TearDown_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SystemMonitorServer).TearDown(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

// SystemMonitor_ServiceDesc is the grpc.ServiceDesc for SystemMonitor service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SystemMonitor_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "wandb_internal.SystemMonitor",
	HandlerType: (*SystemMonitorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetStats",
			Handler:    _SystemMonitor_GetStats_Handler,
		},
		{
			MethodName: "GetMetadata",
			Handler:    _SystemMonitor_GetMetadata_Handler,
		},
		{
			MethodName: "TearDown",
			Handler:    _SystemMonitor_TearDown_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "wandb/proto/wandb_system_monitor.proto",
}
