1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Op17 {
    #[prost(message, optional, tag="2")]
    pub object: ::std::option::Option<super::pfs_1_7::PutObjectRequest>,
    #[prost(message, optional, tag="3")]
    pub tag: ::std::option::Option<super::pfs_1_7::TagObjectRequest>,
    #[prost(message, optional, tag="4")]
    pub repo: ::std::option::Option<super::pfs_1_7::CreateRepoRequest>,
    #[prost(message, optional, tag="5")]
    pub commit: ::std::option::Option<super::pfs_1_7::BuildCommitRequest>,
    #[prost(message, optional, tag="6")]
    pub branch: ::std::option::Option<super::pfs_1_7::CreateBranchRequest>,
    #[prost(message, optional, tag="7")]
    pub pipeline: ::std::option::Option<super::pps_1_7::CreatePipelineRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Op18 {
    #[prost(message, optional, tag="2")]
    pub object: ::std::option::Option<super::pfs_1_8::PutObjectRequest>,
    #[prost(message, optional, tag="3")]
    pub tag: ::std::option::Option<super::pfs_1_8::TagObjectRequest>,
    #[prost(message, optional, tag="4")]
    pub repo: ::std::option::Option<super::pfs_1_8::CreateRepoRequest>,
    #[prost(message, optional, tag="5")]
    pub commit: ::std::option::Option<super::pfs_1_8::BuildCommitRequest>,
    #[prost(message, optional, tag="6")]
    pub branch: ::std::option::Option<super::pfs_1_8::CreateBranchRequest>,
    #[prost(message, optional, tag="7")]
    pub pipeline: ::std::option::Option<super::pps_1_8::CreatePipelineRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Op19 {
    #[prost(message, optional, tag="2")]
    pub object: ::std::option::Option<super::pfs_1_9::PutObjectRequest>,
    #[prost(message, optional, tag="9")]
    pub create_object: ::std::option::Option<super::pfs_1_9::CreateObjectRequest>,
    #[prost(message, optional, tag="3")]
    pub tag: ::std::option::Option<super::pfs_1_9::TagObjectRequest>,
    #[prost(message, optional, tag="10")]
    pub block: ::std::option::Option<super::pfs_1_9::PutBlockRequest>,
    #[prost(message, optional, tag="4")]
    pub repo: ::std::option::Option<super::pfs_1_9::CreateRepoRequest>,
    #[prost(message, optional, tag="5")]
    pub commit: ::std::option::Option<super::pfs_1_9::BuildCommitRequest>,
    #[prost(message, optional, tag="6")]
    pub branch: ::std::option::Option<super::pfs_1_9::CreateBranchRequest>,
    #[prost(message, optional, tag="7")]
    pub pipeline: ::std::option::Option<super::pps_1_9::CreatePipelineRequest>,
    #[prost(message, optional, tag="8")]
    pub job: ::std::option::Option<super::pps_1_9::CreateJobRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Op110 {
    #[prost(message, optional, tag="2")]
    pub object: ::std::option::Option<super::pfs_1_10::PutObjectRequest>,
    #[prost(message, optional, tag="9")]
    pub create_object: ::std::option::Option<super::pfs_1_10::CreateObjectRequest>,
    #[prost(message, optional, tag="3")]
    pub tag: ::std::option::Option<super::pfs_1_10::TagObjectRequest>,
    #[prost(message, optional, tag="10")]
    pub block: ::std::option::Option<super::pfs_1_10::PutBlockRequest>,
    #[prost(message, optional, tag="4")]
    pub repo: ::std::option::Option<super::pfs_1_10::CreateRepoRequest>,
    #[prost(message, optional, tag="5")]
    pub commit: ::std::option::Option<super::pfs_1_10::BuildCommitRequest>,
    #[prost(message, optional, tag="6")]
    pub branch: ::std::option::Option<super::pfs_1_10::CreateBranchRequest>,
    #[prost(message, optional, tag="7")]
    pub pipeline: ::std::option::Option<super::pps_1_10::CreatePipelineRequest>,
    #[prost(message, optional, tag="8")]
    pub job: ::std::option::Option<super::pps_1_10::CreateJobRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Op111 {
    #[prost(message, optional, tag="2")]
    pub object: ::std::option::Option<super::pfs::PutObjectRequest>,
    #[prost(message, optional, tag="9")]
    pub create_object: ::std::option::Option<super::pfs::CreateObjectRequest>,
    #[prost(message, optional, tag="3")]
    pub tag: ::std::option::Option<super::pfs::TagObjectRequest>,
    #[prost(message, optional, tag="10")]
    pub block: ::std::option::Option<super::pfs::PutBlockRequest>,
    #[prost(message, optional, tag="4")]
    pub repo: ::std::option::Option<super::pfs::CreateRepoRequest>,
    #[prost(message, optional, tag="5")]
    pub commit: ::std::option::Option<super::pfs::BuildCommitRequest>,
    #[prost(message, optional, tag="6")]
    pub branch: ::std::option::Option<super::pfs::CreateBranchRequest>,
    #[prost(message, optional, tag="7")]
    pub pipeline: ::std::option::Option<super::pps::CreatePipelineRequest>,
    #[prost(message, optional, tag="8")]
    pub job: ::std::option::Option<super::pps::CreateJobRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Op {
    #[prost(message, optional, tag="1")]
    pub op1_7: ::std::option::Option<Op17>,
    #[prost(message, optional, tag="2")]
    pub op1_8: ::std::option::Option<Op18>,
    #[prost(message, optional, tag="3")]
    pub op1_9: ::std::option::Option<Op19>,
    #[prost(message, optional, tag="4")]
    pub op1_10: ::std::option::Option<Op110>,
    #[prost(message, optional, tag="5")]
    pub op1_11: ::std::option::Option<Op111>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExtractRequest {
    /// URL is an object storage URL, if it's not "" data will be extracted to
    /// this URL rather than returned.
    #[prost(string, tag="1")]
    pub url: std::string::String,
    /// NoObjects, if true, will cause extract to omit objects (and tags)
    #[prost(bool, tag="2")]
    pub no_objects: bool,
    /// NoRepos, if true, will cause extract to omit repos, commits and branches.
    #[prost(bool, tag="3")]
    pub no_repos: bool,
    /// NoPipelines, if true, will cause extract to omit pipelines.
    #[prost(bool, tag="4")]
    pub no_pipelines: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExtractPipelineRequest {
    #[prost(message, optional, tag="1")]
    pub pipeline: ::std::option::Option<super::pps::Pipeline>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreRequest {
    #[prost(message, optional, tag="1")]
    pub op: ::std::option::Option<Op>,
    /// URL is an object storage URL, if it's not "" data will be restored from
    /// this URL.
    #[prost(string, tag="2")]
    pub url: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterInfo {
    #[prost(string, tag="1")]
    pub id: std::string::String,
    #[prost(string, tag="2")]
    pub deployment_id: std::string::String,
}
# [ 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 } } pub async fn extract ( & mut self , request : impl tonic :: IntoRequest < super :: ExtractRequest > , ) -> Result < tonic :: Response < tonic :: codec :: Streaming < super :: Op >> , 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 ( "/admin.API/Extract" ) ; self . inner . server_streaming ( request . into_request ( ) , path , codec ) . await } pub async fn extract_pipeline ( & mut self , request : impl tonic :: IntoRequest < super :: ExtractPipelineRequest > , ) -> Result < tonic :: Response < super :: Op > , 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 ( "/admin.API/ExtractPipeline" ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await } pub async fn restore ( & mut self , request : impl tonic :: IntoStreamingRequest < Message = super :: RestoreRequest > ) -> 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 ( "/admin.API/Restore" ) ; self . inner . client_streaming ( request . into_streaming_request ( ) , path , codec ) . await } pub async fn inspect_cluster ( & mut self , request : impl tonic :: IntoRequest < ( ) > , ) -> Result < tonic :: Response < super :: ClusterInfo > , 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 ( "/admin.API/InspectCluster" ) ; 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 {{ ... }}" ) } } }