// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package v1

import (
	context "context"
	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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// AgentServiceClient is the client API for AgentService 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 AgentServiceClient interface {
	// RunningURLs - ручка возвращает все выполняющиеся URl с домолнительной информацией
	RunningURLs(ctx context.Context, in *RunningURLsRequest, opts ...grpc.CallOption) (*RunningURLsResponse, error)
	Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error)
	GetAllTasks(ctx context.Context, in *GetAllTasksRequest, opts ...grpc.CallOption) (*GetAllTasksResponse, error)
	GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*GetTaskResponse, error)
	GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error)
	GetTaskLogs(ctx context.Context, in *GetTaskLogsRequest, opts ...grpc.CallOption) (*GetTaskLogsResponse, error)
	// SaveScript saves test script to s3 bucket
	// deprecated
	// TODO: move to backend
	SaveScript(ctx context.Context, in *SaveScriptRequest, opts ...grpc.CallOption) (*SaveScriptResponse, error)
	Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error)
	// Start starts a test script
	// TODO: fix params after moving SaveScript
	Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error)
	// RemoveLogs Удаление логов
	RemoveLogs(ctx context.Context, in *RemoveLogsRequest, opts ...grpc.CallOption) (*RemoveLogsResponse, error)
	// SetToken установить access token
	SetToken(ctx context.Context, in *SetTokenRequest, opts ...grpc.CallOption) (*SetTokenResponse, error)
}

type agentServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewAgentServiceClient(cc grpc.ClientConnInterface) AgentServiceClient {
	return &agentServiceClient{cc}
}

func (c *agentServiceClient) RunningURLs(ctx context.Context, in *RunningURLsRequest, opts ...grpc.CallOption) (*RunningURLsResponse, error) {
	out := new(RunningURLsResponse)
	err := c.cc.Invoke(ctx, "/qa.loadtesting.alilo.agent.v1.AgentService/RunningURLs", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *agentServiceClient) Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) {
	out := new(MetricsResponse)
	err := c.cc.Invoke(ctx, "/qa.loadtesting.alilo.agent.v1.AgentService/Metrics", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *agentServiceClient) GetAllTasks(ctx context.Context, in *GetAllTasksRequest, opts ...grpc.CallOption) (*GetAllTasksResponse, error) {
	out := new(GetAllTasksResponse)
	err := c.cc.Invoke(ctx, "/qa.loadtesting.alilo.agent.v1.AgentService/GetAllTasks", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *agentServiceClient) GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*GetTaskResponse, error) {
	out := new(GetTaskResponse)
	err := c.cc.Invoke(ctx, "/qa.loadtesting.alilo.agent.v1.AgentService/GetTask", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *agentServiceClient) GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) {
	out := new(GetStatusResponse)
	err := c.cc.Invoke(ctx, "/qa.loadtesting.alilo.agent.v1.AgentService/GetStatus", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *agentServiceClient) GetTaskLogs(ctx context.Context, in *GetTaskLogsRequest, opts ...grpc.CallOption) (*GetTaskLogsResponse, error) {
	out := new(GetTaskLogsResponse)
	err := c.cc.Invoke(ctx, "/qa.loadtesting.alilo.agent.v1.AgentService/GetTaskLogs", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *agentServiceClient) SaveScript(ctx context.Context, in *SaveScriptRequest, opts ...grpc.CallOption) (*SaveScriptResponse, error) {
	out := new(SaveScriptResponse)
	err := c.cc.Invoke(ctx, "/qa.loadtesting.alilo.agent.v1.AgentService/SaveScript", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *agentServiceClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) {
	out := new(StopResponse)
	err := c.cc.Invoke(ctx, "/qa.loadtesting.alilo.agent.v1.AgentService/Stop", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *agentServiceClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error) {
	out := new(StartResponse)
	err := c.cc.Invoke(ctx, "/qa.loadtesting.alilo.agent.v1.AgentService/Start", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *agentServiceClient) RemoveLogs(ctx context.Context, in *RemoveLogsRequest, opts ...grpc.CallOption) (*RemoveLogsResponse, error) {
	out := new(RemoveLogsResponse)
	err := c.cc.Invoke(ctx, "/qa.loadtesting.alilo.agent.v1.AgentService/RemoveLogs", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *agentServiceClient) SetToken(ctx context.Context, in *SetTokenRequest, opts ...grpc.CallOption) (*SetTokenResponse, error) {
	out := new(SetTokenResponse)
	err := c.cc.Invoke(ctx, "/qa.loadtesting.alilo.agent.v1.AgentService/SetToken", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AgentServiceServer is the server API for AgentService service.
// All implementations should embed UnimplementedAgentServiceServer
// for forward compatibility
type AgentServiceServer interface {
	// RunningURLs - ручка возвращает все выполняющиеся URl с домолнительной информацией
	RunningURLs(context.Context, *RunningURLsRequest) (*RunningURLsResponse, error)
	Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error)
	GetAllTasks(context.Context, *GetAllTasksRequest) (*GetAllTasksResponse, error)
	GetTask(context.Context, *GetTaskRequest) (*GetTaskResponse, error)
	GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error)
	GetTaskLogs(context.Context, *GetTaskLogsRequest) (*GetTaskLogsResponse, error)
	// SaveScript saves test script to s3 bucket
	// deprecated
	// TODO: move to backend
	SaveScript(context.Context, *SaveScriptRequest) (*SaveScriptResponse, error)
	Stop(context.Context, *StopRequest) (*StopResponse, error)
	// Start starts a test script
	// TODO: fix params after moving SaveScript
	Start(context.Context, *StartRequest) (*StartResponse, error)
	// RemoveLogs Удаление логов
	RemoveLogs(context.Context, *RemoveLogsRequest) (*RemoveLogsResponse, error)
	// SetToken установить access token
	SetToken(context.Context, *SetTokenRequest) (*SetTokenResponse, error)
}

// UnimplementedAgentServiceServer should be embedded to have forward compatible implementations.
type UnimplementedAgentServiceServer struct {
}

func (UnimplementedAgentServiceServer) RunningURLs(context.Context, *RunningURLsRequest) (*RunningURLsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RunningURLs not implemented")
}
func (UnimplementedAgentServiceServer) Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Metrics not implemented")
}
func (UnimplementedAgentServiceServer) GetAllTasks(context.Context, *GetAllTasksRequest) (*GetAllTasksResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAllTasks not implemented")
}
func (UnimplementedAgentServiceServer) GetTask(context.Context, *GetTaskRequest) (*GetTaskResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTask not implemented")
}
func (UnimplementedAgentServiceServer) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented")
}
func (UnimplementedAgentServiceServer) GetTaskLogs(context.Context, *GetTaskLogsRequest) (*GetTaskLogsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTaskLogs not implemented")
}
func (UnimplementedAgentServiceServer) SaveScript(context.Context, *SaveScriptRequest) (*SaveScriptResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SaveScript not implemented")
}
func (UnimplementedAgentServiceServer) Stop(context.Context, *StopRequest) (*StopResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
}
func (UnimplementedAgentServiceServer) Start(context.Context, *StartRequest) (*StartResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Start not implemented")
}
func (UnimplementedAgentServiceServer) RemoveLogs(context.Context, *RemoveLogsRequest) (*RemoveLogsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RemoveLogs not implemented")
}
func (UnimplementedAgentServiceServer) SetToken(context.Context, *SetTokenRequest) (*SetTokenResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetToken not implemented")
}

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

func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer) {
	s.RegisterService(&AgentService_ServiceDesc, srv)
}

func _AgentService_RunningURLs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RunningURLsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AgentServiceServer).RunningURLs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/qa.loadtesting.alilo.agent.v1.AgentService/RunningURLs",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AgentServiceServer).RunningURLs(ctx, req.(*RunningURLsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AgentService_Metrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MetricsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AgentServiceServer).Metrics(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/qa.loadtesting.alilo.agent.v1.AgentService/Metrics",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AgentServiceServer).Metrics(ctx, req.(*MetricsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AgentService_GetAllTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetAllTasksRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AgentServiceServer).GetAllTasks(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/qa.loadtesting.alilo.agent.v1.AgentService/GetAllTasks",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AgentServiceServer).GetAllTasks(ctx, req.(*GetAllTasksRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AgentService_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetTaskRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AgentServiceServer).GetTask(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/qa.loadtesting.alilo.agent.v1.AgentService/GetTask",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AgentServiceServer).GetTask(ctx, req.(*GetTaskRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AgentService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetStatusRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AgentServiceServer).GetStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/qa.loadtesting.alilo.agent.v1.AgentService/GetStatus",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AgentServiceServer).GetStatus(ctx, req.(*GetStatusRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AgentService_GetTaskLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetTaskLogsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AgentServiceServer).GetTaskLogs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/qa.loadtesting.alilo.agent.v1.AgentService/GetTaskLogs",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AgentServiceServer).GetTaskLogs(ctx, req.(*GetTaskLogsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AgentService_SaveScript_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SaveScriptRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AgentServiceServer).SaveScript(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/qa.loadtesting.alilo.agent.v1.AgentService/SaveScript",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AgentServiceServer).SaveScript(ctx, req.(*SaveScriptRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AgentService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StopRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AgentServiceServer).Stop(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/qa.loadtesting.alilo.agent.v1.AgentService/Stop",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AgentServiceServer).Stop(ctx, req.(*StopRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AgentService_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StartRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AgentServiceServer).Start(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/qa.loadtesting.alilo.agent.v1.AgentService/Start",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AgentServiceServer).Start(ctx, req.(*StartRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AgentService_RemoveLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemoveLogsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AgentServiceServer).RemoveLogs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/qa.loadtesting.alilo.agent.v1.AgentService/RemoveLogs",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AgentServiceServer).RemoveLogs(ctx, req.(*RemoveLogsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AgentService_SetToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetTokenRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AgentServiceServer).SetToken(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/qa.loadtesting.alilo.agent.v1.AgentService/SetToken",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AgentServiceServer).SetToken(ctx, req.(*SetTokenRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AgentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "qa.loadtesting.alilo.agent.v1.AgentService",
	HandlerType: (*AgentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RunningURLs",
			Handler:    _AgentService_RunningURLs_Handler,
		},
		{
			MethodName: "Metrics",
			Handler:    _AgentService_Metrics_Handler,
		},
		{
			MethodName: "GetAllTasks",
			Handler:    _AgentService_GetAllTasks_Handler,
		},
		{
			MethodName: "GetTask",
			Handler:    _AgentService_GetTask_Handler,
		},
		{
			MethodName: "GetStatus",
			Handler:    _AgentService_GetStatus_Handler,
		},
		{
			MethodName: "GetTaskLogs",
			Handler:    _AgentService_GetTaskLogs_Handler,
		},
		{
			MethodName: "SaveScript",
			Handler:    _AgentService_SaveScript_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _AgentService_Stop_Handler,
		},
		{
			MethodName: "Start",
			Handler:    _AgentService_Start_Handler,
		},
		{
			MethodName: "RemoveLogs",
			Handler:    _AgentService_RemoveLogs_Handler,
		},
		{
			MethodName: "SetToken",
			Handler:    _AgentService_SetToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/qa/loadtesting/alilo/agent-v2/agent/api/qa/loadtesting/alilo/agent/v1/agent.proto",
}
