#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAllRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionRequest {
#[prost(message, optional, tag="1")]
pub create_repo: ::std::option::Option<super::pfs::CreateRepoRequest>,
#[prost(message, optional, tag="2")]
pub delete_repo: ::std::option::Option<super::pfs::DeleteRepoRequest>,
#[prost(message, optional, tag="3")]
pub start_commit: ::std::option::Option<super::pfs::StartCommitRequest>,
#[prost(message, optional, tag="4")]
pub finish_commit: ::std::option::Option<super::pfs::FinishCommitRequest>,
#[prost(message, optional, tag="5")]
pub delete_commit: ::std::option::Option<super::pfs::DeleteCommitRequest>,
#[prost(message, optional, tag="6")]
pub create_branch: ::std::option::Option<super::pfs::CreateBranchRequest>,
#[prost(message, optional, tag="7")]
pub delete_branch: ::std::option::Option<super::pfs::DeleteBranchRequest>,
#[prost(message, optional, tag="11")]
pub update_job_state: ::std::option::Option<super::pps::UpdateJobStateRequest>,
#[prost(message, optional, tag="10")]
pub delete_all: ::std::option::Option<DeleteAllRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionResponse {
#[prost(message, optional, tag="2")]
pub commit: ::std::option::Option<super::pfs::Commit>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Transaction {
#[prost(string, tag="1")]
pub id: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionInfo {
#[prost(message, optional, tag="1")]
pub transaction: ::std::option::Option<Transaction>,
#[prost(message, repeated, tag="2")]
pub requests: ::std::vec::Vec<TransactionRequest>,
#[prost(message, repeated, tag="3")]
pub responses: ::std::vec::Vec<TransactionResponse>,
#[prost(message, optional, tag="4")]
pub started: ::std::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionInfos {
#[prost(message, repeated, tag="1")]
pub transaction_info: ::std::vec::Vec<TransactionInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchTransactionRequest {
#[prost(message, repeated, tag="1")]
pub requests: ::std::vec::Vec<TransactionRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartTransactionRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InspectTransactionRequest {
#[prost(message, optional, tag="1")]
pub transaction: ::std::option::Option<Transaction>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteTransactionRequest {
#[prost(message, optional, tag="1")]
pub transaction: ::std::option::Option<Transaction>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTransactionRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinishTransactionRequest {
#[prost(message, optional, tag="1")]
pub transaction: ::std::option::Option<Transaction>,
}
# [ doc = r" Generated client implementations." ] pub mod api_client { # ! [ allow ( unused_variables , dead_code , missing_docs ) ] use tonic :: codegen :: * ; pub struct ApiClient < T > { inner : tonic :: client :: Grpc < T > , } impl ApiClient < tonic :: transport :: Channel > { # [ doc = r" Attempt to create a new client by connecting to a given endpoint." ] pub async fn connect < D > ( dst : D ) -> Result < Self , tonic :: transport :: Error > where D : std :: convert :: TryInto < tonic :: transport :: Endpoint > , D :: Error : Into < StdError > , { let conn = tonic :: transport :: Endpoint :: new ( dst ) ? . connect ( ) . await ? ; Ok ( Self :: new ( conn ) ) } } impl < T > ApiClient < T > where T : tonic :: client :: GrpcService < tonic :: body :: BoxBody > , T :: ResponseBody : Body + HttpBody + Send + 'static , T :: Error : Into < StdError > , < T :: ResponseBody as HttpBody > :: Error : Into < StdError > + Send , { pub fn new ( inner : T ) -> Self { let inner = tonic :: client :: Grpc :: new ( inner ) ; Self { inner } } pub fn with_interceptor ( inner : T , interceptor : impl Into < tonic :: Interceptor > ) -> Self { let inner = tonic :: client :: Grpc :: with_interceptor ( inner , interceptor ) ; Self { inner } } # [ doc = " Transaction rpcs" ] pub async fn batch_transaction ( & mut self , request : impl tonic :: IntoRequest < super :: BatchTransactionRequest > , ) -> Result < tonic :: Response < super :: TransactionInfo > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/transaction.API/BatchTransaction" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn start_transaction ( & mut self , request : impl tonic :: IntoRequest < super :: StartTransactionRequest > , ) -> Result < tonic :: Response < super :: Transaction > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/transaction.API/StartTransaction" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn inspect_transaction ( & mut self , request : impl tonic :: IntoRequest < super :: InspectTransactionRequest > , ) -> Result < tonic :: Response < super :: TransactionInfo > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/transaction.API/InspectTransaction" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn delete_transaction ( & mut self , request : impl tonic :: IntoRequest < super :: DeleteTransactionRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/transaction.API/DeleteTransaction" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn list_transaction ( & mut self , request : impl tonic :: IntoRequest < super :: ListTransactionRequest > , ) -> Result < tonic :: Response < super :: TransactionInfos > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/transaction.API/ListTransaction" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn finish_transaction ( & mut self , request : impl tonic :: IntoRequest < super :: FinishTransactionRequest > , ) -> Result < tonic :: Response < super :: TransactionInfo > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/transaction.API/FinishTransaction" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn delete_all ( & mut self , request : impl tonic :: IntoRequest < super :: DeleteAllRequest > , ) -> Result < tonic :: Response < ( ) > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( "Service was not ready: {}" , e . into ( ) ) ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( "/transaction.API/DeleteAll" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } } impl < T : Clone > Clone for ApiClient < T > { fn clone ( & self ) -> Self { Self { inner : self . inner . clone ( ) , } } } impl < T > std :: fmt :: Debug for ApiClient < T > { fn fmt ( & self , f : & mut std :: fmt :: Formatter < '_ > ) -> std :: fmt :: Result { write ! ( f , "ApiClient {{ ... }}" ) } } }