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

require 'grpc'
require 'transferd_pb'

module Transferd
  module Api
    module TransferService
      #
      # Transfer service definition. This service enables users to start, manage and monitor transfers.
      # You can also  get information about the transfer service settings and confirm the availability of
      # communication between the engine and a remote transfer server.
      class Service

        include ::GRPC::GenericService

        self.marshal_class_method = :encode
        self.unmarshal_class_method = :decode
        self.service_name = 'transferd.api.TransferService'

        #
        # Validate accepts a transfer spec string and a transfer type, and returns the validation result.
        rpc :Validate, ::Transferd::Api::ValidationRequest, ::Transferd::Api::ValidationResponse
        #
        # StartTransfer starts a new transfer and returns the transfer information required to manage and monitor the transfer.
        # This request doesn't close until the transfer is terminated or the request is canceled by the client.
        rpc :StartTransfer, ::Transferd::Api::TransferRequest, ::Transferd::Api::StartTransferResponse
        #
        # StartTransferWithMonitor starts a new transfer and streams back the transfer events.
        # The request doesn't return immediately, as it continues streaming responses to the client until the transfer is terminated or the request is canceled
        # by the client.
        rpc :StartTransferWithMonitor, ::Transferd::Api::TransferRequest, stream(::Transferd::Api::TransferResponse)
        #
        # QueryTransfer requests transfer data.
        rpc :QueryTransfer, ::Transferd::Api::TransferInfoRequest, ::Transferd::Api::QueryTransferResponse
        #
        # ModifyTransfer modifies an existing transfer.
        rpc :ModifyTransfer, ::Transferd::Api::TransferModificationRequest, ::Transferd::Api::TransferModificationResponse
        #
        # AddTransferPaths can be used with persistent transfer to add paths to an existing transfer.
        # (type TransferType.FILE_PERSISTENT).
        rpc :AddTransferPaths, ::Transferd::Api::TransferPathRequest, ::Transferd::Api::TransferPathResponse
        #
        # LockPersistentTransfer, used with persistent transfer, marks an existing persistent transfer as done.
        # Once the method is called, any subsequent call to AddTransferPaths results in an error.
        # (type TransferType.FILE_PERSISTENT).
        rpc :LockPersistentTransfer, ::Transferd::Api::LockPersistentTransferRequest, ::Transferd::Api::LockPersistentTransferResponse
        #
        # StopTransfer stops a transfer.
        rpc :StopTransfer, ::Transferd::Api::StopTransferRequest, ::Transferd::Api::StopTransferResponse
        #
        # MonitorTransfers monitors transfers matching the defined filters and streams back the transfer events.
        # The request doesn't return an immediate response because MonitorTransfers continues streaming
        # responses to the client until the client cancels the request.
        rpc :MonitorTransfers, ::Transferd::Api::RegistrationRequest, stream(::Transferd::Api::TransferResponse)
        #
        # GetAPIVersion gets the API version.
        rpc :GetAPIVersion, ::Transferd::Api::APIVersionRequest, ::Transferd::Api::APIVersionResponse
        #
        # GetInfo gets data about the TransferD service instance.
        rpc :GetInfo, ::Transferd::Api::InstanceInfoRequest, ::Transferd::Api::InstanceInfoResponse
        #
        # IsPeerReachable confirms whether or not the peer endpoint is reachable.
        rpc :IsPeerReachable, ::Transferd::Api::PeerCheckRequest, ::Transferd::Api::PeerCheckResponse
        #
        # WriteStreamChunk writes chunks of streaming data for the specified in-progress
        # transfer of type PERSISTENT_STREAM_UPLOAD, at a specific offset.
        # When StopTransfer is called on the transfer, subsequent calls to this function will fail.
        rpc :WriteStreamChunk, stream(::Transferd::Api::WriteStreamChunkRequest), ::Transferd::Api::WriteStreamChunkResponse
        #
        # WriteStream writes chunks of streaming data for the specified in-progress transfer of type STREAM_TO_FILE_UPLOAD.
        # Once StopTransfer is called on the transfer, subsequent calls to this function will fail.
        rpc :WriteStream, stream(::Transferd::Api::WriteStreamRequest), ::Transferd::Api::WriteStreamResponse
        #
        # ReadStream reads chunks of streaming data from a specified in-progress transfer of type FILE_TO_STREAM_DOWNLOAD.
        # Once StopTransfer is called on this transfer, subsequent calls to this function will fail.
        rpc :ReadStream, ::Transferd::Api::ReadStreamRequest, stream(::Transferd::Api::ReadStreamResponse)
      end

      Stub = Service.rpc_stub_class
    end
  end
end
