# Generated by the protocol buffer compiler.  DO NOT EDIT!
# Source: api/brisk-api.proto for package 'api'

require 'grpc'
require 'api/brisk-api_pb'

module Api
  module Infra
    class Service

      include ::GRPC::GenericService

      self.marshal_class_method = :encode
      self.unmarshal_class_method = :decode
      self.service_name = 'api.Infra'

      rpc :RegisterMachine, ::Api::MachineReq, ::Api::MachineResponse
      rpc :DeRegisterMachine, ::Api::MachineReq, ::Api::MachineResponse
      rpc :DrainMachine, ::Api::MachineReq, ::Api::MachineResponse
    end

    Stub = Service.rpc_stub_class
  end
  module Users
    class Service

      include ::GRPC::GenericService

      self.marshal_class_method = :encode
      self.unmarshal_class_method = :decode
      self.service_name = 'api.Users'

      rpc :Login, ::Api::LoginRequest, stream(::Api::LoginResponse)
    end

    Stub = Service.rpc_stub_class
  end
  module Projects
    # message GetCredentialsRequest {
    #     string nonce = 1 ;
    # }
    # message GetCredentialsResponse{
    #     string auth_token = 1 ;
    # }
    #
    class Service

      include ::GRPC::GenericService

      self.marshal_class_method = :encode
      self.unmarshal_class_method = :decode
      self.service_name = 'api.Projects'

      rpc :FinishRun, ::Api::FinishRunRequest, ::Api::FinishRunResponse
      rpc :GetProject, ::Api::GetProjectReq, ::Api::GetProjectResp
      # Get workers to run against
      rpc :GetWorkersForProject, ::Api::GetWorkersReq, ::Api::GetWorkersResp
      rpc :GetSuperForProject, ::Api::GetSuperReq, ::Api::GetSuperResp
      # used when one of our workers fails
      rpc :GetAdditionalWorkersForProject, ::Api::GetWorkersReq, ::Api::GetWorkersResp
      rpc :ClearWorkersForProject, ::Api::ClearWorkersReq, ::Api::ClearWorkersResp
      rpc :InitProject, ::Api::InitProjectReq, ::Api::InitProjectResp
      rpc :GetAllProjects, ::Api::GetAllProjectsReq, ::Api::GetAllProjectsResp
    end

    Stub = Service.rpc_stub_class
  end
  module Workers
    class Service

      include ::GRPC::GenericService

      self.marshal_class_method = :encode
      self.unmarshal_class_method = :decode
      self.service_name = 'api.Workers'

      rpc :Finished, ::Api::WorkerReq, ::Api::WorkerResponse
      rpc :BuildCommandsRun, ::Api::CommandsRunReq, ::Api::WorkerResponse
      rpc :Register, ::Api::WorkerRegReq, ::Api::WorkerResponse
      rpc :DeRegister, ::Api::WorkerReq, ::Api::WorkerResponse
      rpc :GetRecentlyDeregistered, ::Api::WorkersReq, ::Api::WorkersResp
    end

    Stub = Service.rpc_stub_class
  end
  module Supers
    class Service

      include ::GRPC::GenericService

      self.marshal_class_method = :encode
      self.unmarshal_class_method = :decode
      self.service_name = 'api.Supers'

      rpc :Finished, ::Api::SuperReq, ::Api::SuperResponse
      rpc :Register, ::Api::SuperRegReq, ::Api::SuperResponse
      rpc :DeRegister, ::Api::SuperReq, ::Api::SuperResponse
      rpc :MarkSuperAsUnreachable, ::Api::UnreacheableReq, ::Api::UnreachableResp
      rpc :RecordSetup, ::Api::SuperReq, ::Api::SuperResponse
    end

    Stub = Service.rpc_stub_class
  end
end
