1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct App {
4 #[prost(string, tag = "1")]
5 pub rid: ::prost::alloc::string::String,
6 #[prost(string, tag = "2")]
7 pub workspace_rid: ::prost::alloc::string::String,
8 #[prost(string, tag = "3")]
9 pub name: ::prost::alloc::string::String,
10 #[prost(string, tag = "4")]
11 pub title: ::prost::alloc::string::String,
12 #[prost(string, tag = "5")]
13 pub description: ::prost::alloc::string::String,
14 #[prost(string, repeated, tag = "6")]
15 pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
16 #[prost(map = "string, string", tag = "7")]
17 pub properties: ::std::collections::HashMap<
18 ::prost::alloc::string::String,
19 ::prost::alloc::string::String,
20 >,
21 #[prost(string, tag = "8")]
22 pub created_by_user_rid: ::prost::alloc::string::String,
23 #[prost(message, optional, tag = "9")]
24 pub created_at: ::core::option::Option<
25 super::super::super::google::protobuf::Timestamp,
26 >,
27 #[prost(message, optional, tag = "10")]
28 pub updated_at: ::core::option::Option<
29 super::super::super::google::protobuf::Timestamp,
30 >,
31 #[prost(bool, optional, tag = "11")]
32 pub is_archived: ::core::option::Option<bool>,
33 #[prost(string, optional, tag = "12")]
34 pub embed_path: ::core::option::Option<::prost::alloc::string::String>,
35 #[prost(string, optional, tag = "13")]
36 pub archive_sha256: ::core::option::Option<::prost::alloc::string::String>,
37}
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct CreateAppRequest {
40 #[prost(message, optional, tag = "1")]
41 pub app: ::core::option::Option<App>,
42}
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct CreateAppResponse {
45 #[prost(message, optional, tag = "1")]
46 pub app: ::core::option::Option<App>,
47}
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct GetAppRequest {
50 #[prost(string, tag = "1")]
51 pub app_rid: ::prost::alloc::string::String,
52}
53#[derive(Clone, PartialEq, ::prost::Message)]
54pub struct GetAppResponse {
55 #[prost(message, optional, tag = "1")]
56 pub app: ::core::option::Option<App>,
57}
58#[derive(Clone, PartialEq, ::prost::Message)]
59pub struct UpdateAppRequest {
60 #[prost(string, tag = "1")]
61 pub app_rid: ::prost::alloc::string::String,
62 #[prost(message, optional, tag = "2")]
63 pub app: ::core::option::Option<App>,
64}
65#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct UpdateAppResponse {
67 #[prost(message, optional, tag = "1")]
68 pub app: ::core::option::Option<App>,
69}
70#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct DeleteAppRequest {
72 #[prost(string, tag = "1")]
73 pub app_rid: ::prost::alloc::string::String,
74}
75#[derive(Clone, Copy, PartialEq, ::prost::Message)]
76pub struct DeleteAppResponse {}
77#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct AppSearchFilter {
79 #[prost(string, optional, tag = "1")]
80 pub name_contains: ::core::option::Option<::prost::alloc::string::String>,
81 #[prost(bool, optional, tag = "2")]
82 pub include_archived: ::core::option::Option<bool>,
83 #[prost(string, repeated, tag = "3")]
84 pub created_by_user_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
85 #[prost(string, repeated, tag = "4")]
86 pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
87}
88#[derive(Clone, PartialEq, ::prost::Message)]
89pub struct SearchAppsRequest {
90 #[prost(string, tag = "1")]
91 pub workspace_rid: ::prost::alloc::string::String,
92 #[prost(message, optional, tag = "2")]
93 pub filter: ::core::option::Option<AppSearchFilter>,
94 #[prost(enumeration = "SearchAppsSortField", tag = "3")]
95 pub sort_field: i32,
96 #[prost(bool, tag = "4")]
97 pub descending: bool,
98 #[prost(int32, optional, tag = "5")]
99 pub page_size: ::core::option::Option<i32>,
100 #[prost(string, optional, tag = "6")]
101 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
102}
103#[derive(Clone, PartialEq, ::prost::Message)]
104pub struct SearchAppsResponse {
105 #[prost(message, repeated, tag = "1")]
106 pub apps: ::prost::alloc::vec::Vec<App>,
107 #[prost(string, optional, tag = "2")]
108 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
109}
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct SearchAppLabelsRequest {
112 #[prost(string, tag = "1")]
113 pub workspace_rid: ::prost::alloc::string::String,
114 #[prost(int32, optional, tag = "2")]
115 pub page_size: ::core::option::Option<i32>,
116 #[prost(string, optional, tag = "3")]
117 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
118}
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct SearchAppLabelsResponse {
121 #[prost(string, repeated, tag = "1")]
122 pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
123 #[prost(string, optional, tag = "2")]
124 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
125}
126#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
127#[repr(i32)]
128pub enum NovaError {
129 AppNotFound = 0,
130 AppNameTaken = 1,
131 AppNameImmutable = 2,
132 ServerAssignedFieldSet = 3,
133 InvalidPageToken = 4,
134}
135impl NovaError {
136 pub fn as_str_name(&self) -> &'static str {
141 match self {
142 Self::AppNotFound => "NOVA_ERROR_APP_NOT_FOUND",
143 Self::AppNameTaken => "NOVA_ERROR_APP_NAME_TAKEN",
144 Self::AppNameImmutable => "NOVA_ERROR_APP_NAME_IMMUTABLE",
145 Self::ServerAssignedFieldSet => "NOVA_ERROR_SERVER_ASSIGNED_FIELD_SET",
146 Self::InvalidPageToken => "NOVA_ERROR_INVALID_PAGE_TOKEN",
147 }
148 }
149 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
151 match value {
152 "NOVA_ERROR_APP_NOT_FOUND" => Some(Self::AppNotFound),
153 "NOVA_ERROR_APP_NAME_TAKEN" => Some(Self::AppNameTaken),
154 "NOVA_ERROR_APP_NAME_IMMUTABLE" => Some(Self::AppNameImmutable),
155 "NOVA_ERROR_SERVER_ASSIGNED_FIELD_SET" => Some(Self::ServerAssignedFieldSet),
156 "NOVA_ERROR_INVALID_PAGE_TOKEN" => Some(Self::InvalidPageToken),
157 _ => None,
158 }
159 }
160}
161#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
162#[repr(i32)]
163pub enum SearchAppsSortField {
164 Unspecified = 0,
165 Title = 1,
166 CreatedAt = 2,
167 UpdatedAt = 3,
168}
169impl SearchAppsSortField {
170 pub fn as_str_name(&self) -> &'static str {
175 match self {
176 Self::Unspecified => "SEARCH_APPS_SORT_FIELD_UNSPECIFIED",
177 Self::Title => "SEARCH_APPS_SORT_FIELD_TITLE",
178 Self::CreatedAt => "SEARCH_APPS_SORT_FIELD_CREATED_AT",
179 Self::UpdatedAt => "SEARCH_APPS_SORT_FIELD_UPDATED_AT",
180 }
181 }
182 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
184 match value {
185 "SEARCH_APPS_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
186 "SEARCH_APPS_SORT_FIELD_TITLE" => Some(Self::Title),
187 "SEARCH_APPS_SORT_FIELD_CREATED_AT" => Some(Self::CreatedAt),
188 "SEARCH_APPS_SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
189 _ => None,
190 }
191 }
192}
193pub mod nova_service_client {
195 #![allow(
196 unused_variables,
197 dead_code,
198 missing_docs,
199 clippy::wildcard_imports,
200 clippy::let_unit_value,
201 )]
202 use tonic::codegen::*;
203 use tonic::codegen::http::Uri;
204 #[derive(Debug, Clone)]
205 pub struct NovaServiceClient<T> {
206 inner: tonic::client::Grpc<T>,
207 }
208 impl NovaServiceClient<tonic::transport::Channel> {
209 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
211 where
212 D: TryInto<tonic::transport::Endpoint>,
213 D::Error: Into<StdError>,
214 {
215 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
216 Ok(Self::new(conn))
217 }
218 }
219 impl<T> NovaServiceClient<T>
220 where
221 T: tonic::client::GrpcService<tonic::body::Body>,
222 T::Error: Into<StdError>,
223 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
224 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
225 {
226 pub fn new(inner: T) -> Self {
227 let inner = tonic::client::Grpc::new(inner);
228 Self { inner }
229 }
230 pub fn with_origin(inner: T, origin: Uri) -> Self {
231 let inner = tonic::client::Grpc::with_origin(inner, origin);
232 Self { inner }
233 }
234 pub fn with_interceptor<F>(
235 inner: T,
236 interceptor: F,
237 ) -> NovaServiceClient<InterceptedService<T, F>>
238 where
239 F: tonic::service::Interceptor,
240 T::ResponseBody: Default,
241 T: tonic::codegen::Service<
242 http::Request<tonic::body::Body>,
243 Response = http::Response<
244 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
245 >,
246 >,
247 <T as tonic::codegen::Service<
248 http::Request<tonic::body::Body>,
249 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
250 {
251 NovaServiceClient::new(InterceptedService::new(inner, interceptor))
252 }
253 #[must_use]
258 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
259 self.inner = self.inner.send_compressed(encoding);
260 self
261 }
262 #[must_use]
264 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
265 self.inner = self.inner.accept_compressed(encoding);
266 self
267 }
268 #[must_use]
272 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
273 self.inner = self.inner.max_decoding_message_size(limit);
274 self
275 }
276 #[must_use]
280 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
281 self.inner = self.inner.max_encoding_message_size(limit);
282 self
283 }
284 pub async fn create_app(
285 &mut self,
286 request: impl tonic::IntoRequest<super::CreateAppRequest>,
287 ) -> std::result::Result<
288 tonic::Response<super::CreateAppResponse>,
289 tonic::Status,
290 > {
291 self.inner
292 .ready()
293 .await
294 .map_err(|e| {
295 tonic::Status::unknown(
296 format!("Service was not ready: {}", e.into()),
297 )
298 })?;
299 let codec = tonic::codec::ProstCodec::default();
300 let path = http::uri::PathAndQuery::from_static(
301 "/nominal.nova.v1.NovaService/CreateApp",
302 );
303 let mut req = request.into_request();
304 req.extensions_mut()
305 .insert(GrpcMethod::new("nominal.nova.v1.NovaService", "CreateApp"));
306 self.inner.unary(req, path, codec).await
307 }
308 pub async fn get_app(
309 &mut self,
310 request: impl tonic::IntoRequest<super::GetAppRequest>,
311 ) -> std::result::Result<tonic::Response<super::GetAppResponse>, tonic::Status> {
312 self.inner
313 .ready()
314 .await
315 .map_err(|e| {
316 tonic::Status::unknown(
317 format!("Service was not ready: {}", e.into()),
318 )
319 })?;
320 let codec = tonic::codec::ProstCodec::default();
321 let path = http::uri::PathAndQuery::from_static(
322 "/nominal.nova.v1.NovaService/GetApp",
323 );
324 let mut req = request.into_request();
325 req.extensions_mut()
326 .insert(GrpcMethod::new("nominal.nova.v1.NovaService", "GetApp"));
327 self.inner.unary(req, path, codec).await
328 }
329 pub async fn update_app(
330 &mut self,
331 request: impl tonic::IntoRequest<super::UpdateAppRequest>,
332 ) -> std::result::Result<
333 tonic::Response<super::UpdateAppResponse>,
334 tonic::Status,
335 > {
336 self.inner
337 .ready()
338 .await
339 .map_err(|e| {
340 tonic::Status::unknown(
341 format!("Service was not ready: {}", e.into()),
342 )
343 })?;
344 let codec = tonic::codec::ProstCodec::default();
345 let path = http::uri::PathAndQuery::from_static(
346 "/nominal.nova.v1.NovaService/UpdateApp",
347 );
348 let mut req = request.into_request();
349 req.extensions_mut()
350 .insert(GrpcMethod::new("nominal.nova.v1.NovaService", "UpdateApp"));
351 self.inner.unary(req, path, codec).await
352 }
353 pub async fn delete_app(
354 &mut self,
355 request: impl tonic::IntoRequest<super::DeleteAppRequest>,
356 ) -> std::result::Result<
357 tonic::Response<super::DeleteAppResponse>,
358 tonic::Status,
359 > {
360 self.inner
361 .ready()
362 .await
363 .map_err(|e| {
364 tonic::Status::unknown(
365 format!("Service was not ready: {}", e.into()),
366 )
367 })?;
368 let codec = tonic::codec::ProstCodec::default();
369 let path = http::uri::PathAndQuery::from_static(
370 "/nominal.nova.v1.NovaService/DeleteApp",
371 );
372 let mut req = request.into_request();
373 req.extensions_mut()
374 .insert(GrpcMethod::new("nominal.nova.v1.NovaService", "DeleteApp"));
375 self.inner.unary(req, path, codec).await
376 }
377 pub async fn search_apps(
378 &mut self,
379 request: impl tonic::IntoRequest<super::SearchAppsRequest>,
380 ) -> std::result::Result<
381 tonic::Response<super::SearchAppsResponse>,
382 tonic::Status,
383 > {
384 self.inner
385 .ready()
386 .await
387 .map_err(|e| {
388 tonic::Status::unknown(
389 format!("Service was not ready: {}", e.into()),
390 )
391 })?;
392 let codec = tonic::codec::ProstCodec::default();
393 let path = http::uri::PathAndQuery::from_static(
394 "/nominal.nova.v1.NovaService/SearchApps",
395 );
396 let mut req = request.into_request();
397 req.extensions_mut()
398 .insert(GrpcMethod::new("nominal.nova.v1.NovaService", "SearchApps"));
399 self.inner.unary(req, path, codec).await
400 }
401 pub async fn search_app_labels(
402 &mut self,
403 request: impl tonic::IntoRequest<super::SearchAppLabelsRequest>,
404 ) -> std::result::Result<
405 tonic::Response<super::SearchAppLabelsResponse>,
406 tonic::Status,
407 > {
408 self.inner
409 .ready()
410 .await
411 .map_err(|e| {
412 tonic::Status::unknown(
413 format!("Service was not ready: {}", e.into()),
414 )
415 })?;
416 let codec = tonic::codec::ProstCodec::default();
417 let path = http::uri::PathAndQuery::from_static(
418 "/nominal.nova.v1.NovaService/SearchAppLabels",
419 );
420 let mut req = request.into_request();
421 req.extensions_mut()
422 .insert(
423 GrpcMethod::new("nominal.nova.v1.NovaService", "SearchAppLabels"),
424 );
425 self.inner.unary(req, path, codec).await
426 }
427 }
428}