1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct GitSource {
4 #[prost(string, tag = "1")]
5 pub url: ::prost::alloc::string::String,
6 #[prost(string, optional, tag = "2")]
7 pub r#ref: ::core::option::Option<::prost::alloc::string::String>,
8 #[prost(string, optional, tag = "3")]
9 pub rev: ::core::option::Option<::prost::alloc::string::String>,
10 #[prost(bool, tag = "4")]
11 pub submodules: bool,
12 #[prost(string, optional, tag = "5")]
13 pub dir: ::core::option::Option<::prost::alloc::string::String>,
14}
15#[derive(Clone, PartialEq, ::prost::Message)]
16pub struct SourcesManifest {
17 #[prost(oneof = "sources_manifest::Source", tags = "1")]
18 pub source: ::core::option::Option<sources_manifest::Source>,
19}
20pub mod sources_manifest {
22 #[derive(Clone, PartialEq, ::prost::Oneof)]
23 pub enum Source {
24 #[prost(message, tag = "1")]
25 Git(super::GitSource),
26 }
27}
28#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct AppManifest {
30 #[prost(string, tag = "1")]
31 pub name: ::prost::alloc::string::String,
32 #[prost(message, optional, tag = "2")]
33 pub sources: ::core::option::Option<SourcesManifest>,
34}
35#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct AppDefinition {
37 #[prost(string, tag = "1")]
38 pub rid: ::prost::alloc::string::String,
39 #[prost(string, tag = "2")]
40 pub workspace_rid: ::prost::alloc::string::String,
41 #[prost(message, optional, tag = "3")]
42 pub manifest: ::core::option::Option<AppManifest>,
43 #[prost(string, tag = "4")]
44 pub bundle_url: ::prost::alloc::string::String,
45 #[prost(string, tag = "5")]
46 pub bundle_sha256: ::prost::alloc::string::String,
47 #[prost(string, tag = "6")]
48 pub created_by_user_rid: ::prost::alloc::string::String,
49 #[prost(message, optional, tag = "7")]
50 pub created_at: ::core::option::Option<
51 super::super::super::google::protobuf::Timestamp,
52 >,
53 #[prost(message, optional, tag = "8")]
54 pub updated_at: ::core::option::Option<
55 super::super::super::google::protobuf::Timestamp,
56 >,
57 #[prost(bool, tag = "9")]
58 pub is_archived: bool,
59}
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct CreateAppRequest {
62 #[prost(string, tag = "1")]
63 pub workspace_rid: ::prost::alloc::string::String,
64 #[prost(message, optional, tag = "2")]
65 pub manifest: ::core::option::Option<AppManifest>,
66 #[prost(string, tag = "3")]
67 pub bundle_upload_path: ::prost::alloc::string::String,
68}
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct CreateAppResponse {
71 #[prost(message, optional, tag = "1")]
72 pub app: ::core::option::Option<AppDefinition>,
73}
74#[derive(Clone, PartialEq, ::prost::Message)]
75pub struct GetAppRequest {
76 #[prost(string, tag = "1")]
77 pub rid: ::prost::alloc::string::String,
78}
79#[derive(Clone, PartialEq, ::prost::Message)]
80pub struct GetAppResponse {
81 #[prost(message, optional, tag = "1")]
82 pub app: ::core::option::Option<AppDefinition>,
83}
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct UpdateAppRequest {
86 #[prost(string, tag = "1")]
87 pub rid: ::prost::alloc::string::String,
88 #[prost(message, optional, tag = "2")]
89 pub manifest: ::core::option::Option<AppManifest>,
90 #[prost(string, optional, tag = "3")]
91 pub bundle_upload_path: ::core::option::Option<::prost::alloc::string::String>,
92}
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct UpdateAppResponse {
95 #[prost(message, optional, tag = "1")]
96 pub app: ::core::option::Option<AppDefinition>,
97}
98#[derive(Clone, PartialEq, ::prost::Message)]
99pub struct ArchiveAppRequest {
100 #[prost(string, tag = "1")]
101 pub rid: ::prost::alloc::string::String,
102}
103#[derive(Clone, PartialEq, ::prost::Message)]
104pub struct ArchiveAppResponse {
105 #[prost(message, optional, tag = "1")]
106 pub app: ::core::option::Option<AppDefinition>,
107}
108#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct UnarchiveAppRequest {
110 #[prost(string, tag = "1")]
111 pub rid: ::prost::alloc::string::String,
112}
113#[derive(Clone, PartialEq, ::prost::Message)]
114pub struct UnarchiveAppResponse {
115 #[prost(message, optional, tag = "1")]
116 pub app: ::core::option::Option<AppDefinition>,
117}
118#[derive(Clone, PartialEq, ::prost::Message)]
119pub struct SearchAppsRequest {
120 #[prost(string, tag = "1")]
121 pub workspace_rid: ::prost::alloc::string::String,
122 #[prost(string, optional, tag = "2")]
123 pub name_contains: ::core::option::Option<::prost::alloc::string::String>,
124 #[prost(bool, optional, tag = "5")]
125 pub include_archived: ::core::option::Option<bool>,
126 #[prost(int32, optional, tag = "3")]
127 pub page_size: ::core::option::Option<i32>,
128 #[prost(string, tag = "4")]
129 pub page_token: ::prost::alloc::string::String,
130}
131#[derive(Clone, PartialEq, ::prost::Message)]
132pub struct SearchAppsResponse {
133 #[prost(message, repeated, tag = "1")]
134 pub apps: ::prost::alloc::vec::Vec<AppDefinition>,
135 #[prost(string, tag = "2")]
136 pub next_page_token: ::prost::alloc::string::String,
137}
138pub mod labs_service_client {
140 #![allow(
141 unused_variables,
142 dead_code,
143 missing_docs,
144 clippy::wildcard_imports,
145 clippy::let_unit_value,
146 )]
147 use tonic::codegen::*;
148 use tonic::codegen::http::Uri;
149 #[derive(Debug, Clone)]
150 pub struct LabsServiceClient<T> {
151 inner: tonic::client::Grpc<T>,
152 }
153 impl LabsServiceClient<tonic::transport::Channel> {
154 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
156 where
157 D: TryInto<tonic::transport::Endpoint>,
158 D::Error: Into<StdError>,
159 {
160 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
161 Ok(Self::new(conn))
162 }
163 }
164 impl<T> LabsServiceClient<T>
165 where
166 T: tonic::client::GrpcService<tonic::body::Body>,
167 T::Error: Into<StdError>,
168 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
169 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
170 {
171 pub fn new(inner: T) -> Self {
172 let inner = tonic::client::Grpc::new(inner);
173 Self { inner }
174 }
175 pub fn with_origin(inner: T, origin: Uri) -> Self {
176 let inner = tonic::client::Grpc::with_origin(inner, origin);
177 Self { inner }
178 }
179 pub fn with_interceptor<F>(
180 inner: T,
181 interceptor: F,
182 ) -> LabsServiceClient<InterceptedService<T, F>>
183 where
184 F: tonic::service::Interceptor,
185 T::ResponseBody: Default,
186 T: tonic::codegen::Service<
187 http::Request<tonic::body::Body>,
188 Response = http::Response<
189 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
190 >,
191 >,
192 <T as tonic::codegen::Service<
193 http::Request<tonic::body::Body>,
194 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
195 {
196 LabsServiceClient::new(InterceptedService::new(inner, interceptor))
197 }
198 #[must_use]
203 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
204 self.inner = self.inner.send_compressed(encoding);
205 self
206 }
207 #[must_use]
209 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
210 self.inner = self.inner.accept_compressed(encoding);
211 self
212 }
213 #[must_use]
217 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
218 self.inner = self.inner.max_decoding_message_size(limit);
219 self
220 }
221 #[must_use]
225 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
226 self.inner = self.inner.max_encoding_message_size(limit);
227 self
228 }
229 pub async fn create_app(
230 &mut self,
231 request: impl tonic::IntoRequest<super::CreateAppRequest>,
232 ) -> std::result::Result<
233 tonic::Response<super::CreateAppResponse>,
234 tonic::Status,
235 > {
236 self.inner
237 .ready()
238 .await
239 .map_err(|e| {
240 tonic::Status::unknown(
241 format!("Service was not ready: {}", e.into()),
242 )
243 })?;
244 let codec = tonic::codec::ProstCodec::default();
245 let path = http::uri::PathAndQuery::from_static(
246 "/nominal.labs.v1.LabsService/CreateApp",
247 );
248 let mut req = request.into_request();
249 req.extensions_mut()
250 .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "CreateApp"));
251 self.inner.unary(req, path, codec).await
252 }
253 pub async fn get_app(
254 &mut self,
255 request: impl tonic::IntoRequest<super::GetAppRequest>,
256 ) -> std::result::Result<tonic::Response<super::GetAppResponse>, tonic::Status> {
257 self.inner
258 .ready()
259 .await
260 .map_err(|e| {
261 tonic::Status::unknown(
262 format!("Service was not ready: {}", e.into()),
263 )
264 })?;
265 let codec = tonic::codec::ProstCodec::default();
266 let path = http::uri::PathAndQuery::from_static(
267 "/nominal.labs.v1.LabsService/GetApp",
268 );
269 let mut req = request.into_request();
270 req.extensions_mut()
271 .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "GetApp"));
272 self.inner.unary(req, path, codec).await
273 }
274 pub async fn update_app(
275 &mut self,
276 request: impl tonic::IntoRequest<super::UpdateAppRequest>,
277 ) -> std::result::Result<
278 tonic::Response<super::UpdateAppResponse>,
279 tonic::Status,
280 > {
281 self.inner
282 .ready()
283 .await
284 .map_err(|e| {
285 tonic::Status::unknown(
286 format!("Service was not ready: {}", e.into()),
287 )
288 })?;
289 let codec = tonic::codec::ProstCodec::default();
290 let path = http::uri::PathAndQuery::from_static(
291 "/nominal.labs.v1.LabsService/UpdateApp",
292 );
293 let mut req = request.into_request();
294 req.extensions_mut()
295 .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "UpdateApp"));
296 self.inner.unary(req, path, codec).await
297 }
298 pub async fn archive_app(
299 &mut self,
300 request: impl tonic::IntoRequest<super::ArchiveAppRequest>,
301 ) -> std::result::Result<
302 tonic::Response<super::ArchiveAppResponse>,
303 tonic::Status,
304 > {
305 self.inner
306 .ready()
307 .await
308 .map_err(|e| {
309 tonic::Status::unknown(
310 format!("Service was not ready: {}", e.into()),
311 )
312 })?;
313 let codec = tonic::codec::ProstCodec::default();
314 let path = http::uri::PathAndQuery::from_static(
315 "/nominal.labs.v1.LabsService/ArchiveApp",
316 );
317 let mut req = request.into_request();
318 req.extensions_mut()
319 .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "ArchiveApp"));
320 self.inner.unary(req, path, codec).await
321 }
322 pub async fn unarchive_app(
323 &mut self,
324 request: impl tonic::IntoRequest<super::UnarchiveAppRequest>,
325 ) -> std::result::Result<
326 tonic::Response<super::UnarchiveAppResponse>,
327 tonic::Status,
328 > {
329 self.inner
330 .ready()
331 .await
332 .map_err(|e| {
333 tonic::Status::unknown(
334 format!("Service was not ready: {}", e.into()),
335 )
336 })?;
337 let codec = tonic::codec::ProstCodec::default();
338 let path = http::uri::PathAndQuery::from_static(
339 "/nominal.labs.v1.LabsService/UnarchiveApp",
340 );
341 let mut req = request.into_request();
342 req.extensions_mut()
343 .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "UnarchiveApp"));
344 self.inner.unary(req, path, codec).await
345 }
346 pub async fn search_apps(
347 &mut self,
348 request: impl tonic::IntoRequest<super::SearchAppsRequest>,
349 ) -> std::result::Result<
350 tonic::Response<super::SearchAppsResponse>,
351 tonic::Status,
352 > {
353 self.inner
354 .ready()
355 .await
356 .map_err(|e| {
357 tonic::Status::unknown(
358 format!("Service was not ready: {}", e.into()),
359 )
360 })?;
361 let codec = tonic::codec::ProstCodec::default();
362 let path = http::uri::PathAndQuery::from_static(
363 "/nominal.labs.v1.LabsService/SearchApps",
364 );
365 let mut req = request.into_request();
366 req.extensions_mut()
367 .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "SearchApps"));
368 self.inner.unary(req, path, codec).await
369 }
370 }
371}