1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct ApiProxy {
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 base_url: ::prost::alloc::string::String,
12 #[prost(enumeration = "ApiProxyProtocol", tag = "5")]
13 pub protocol: i32,
14 #[prost(enumeration = "ApiProxyInteraction", tag = "6")]
15 pub interaction: i32,
16 #[prost(enumeration = "ApiProxyBodyFormat", tag = "7")]
17 pub body_format: i32,
18 #[prost(enumeration = "ApiProxyAuthKind", tag = "8")]
19 pub auth_kind: i32,
20 #[prost(string, tag = "9")]
21 pub created_by_user_rid: ::prost::alloc::string::String,
22 #[prost(message, optional, tag = "10")]
23 pub created_at: ::core::option::Option<
24 super::super::super::google::protobuf::Timestamp,
25 >,
26 #[prost(message, optional, tag = "11")]
27 pub updated_at: ::core::option::Option<
28 super::super::super::google::protobuf::Timestamp,
29 >,
30}
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct CreateApiProxyRequest {
33 #[prost(string, tag = "1")]
34 pub workspace_rid: ::prost::alloc::string::String,
35 #[prost(string, tag = "2")]
36 pub name: ::prost::alloc::string::String,
37 #[prost(string, tag = "3")]
38 pub base_url: ::prost::alloc::string::String,
39 #[prost(enumeration = "ApiProxyProtocol", tag = "4")]
40 pub protocol: i32,
41 #[prost(enumeration = "ApiProxyInteraction", tag = "5")]
42 pub interaction: i32,
43 #[prost(enumeration = "ApiProxyBodyFormat", tag = "6")]
44 pub body_format: i32,
45 #[prost(enumeration = "ApiProxyAuthKind", tag = "7")]
46 pub auth_kind: i32,
47 #[prost(string, optional, tag = "8")]
48 pub auth_secret_rid: ::core::option::Option<::prost::alloc::string::String>,
49}
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct CreateApiProxyResponse {
52 #[prost(message, optional, tag = "1")]
53 pub api_proxy: ::core::option::Option<ApiProxy>,
54}
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct GetApiProxyRequest {
57 #[prost(string, tag = "1")]
58 pub api_proxy_rid: ::prost::alloc::string::String,
59}
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct GetApiProxyResponse {
62 #[prost(message, optional, tag = "1")]
63 pub api_proxy: ::core::option::Option<ApiProxy>,
64}
65#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct DeleteApiProxyRequest {
67 #[prost(string, tag = "1")]
68 pub api_proxy_rid: ::prost::alloc::string::String,
69}
70#[derive(Clone, Copy, PartialEq, ::prost::Message)]
71pub struct DeleteApiProxyResponse {}
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct ListApiProxiesRequest {
74 #[prost(string, tag = "1")]
75 pub workspace_rid: ::prost::alloc::string::String,
76 #[prost(int32, optional, tag = "2")]
77 pub page_size: ::core::option::Option<i32>,
78 #[prost(string, optional, tag = "3")]
79 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
80}
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct ListApiProxiesResponse {
83 #[prost(message, repeated, tag = "1")]
84 pub api_proxies: ::prost::alloc::vec::Vec<ApiProxy>,
85 #[prost(string, optional, tag = "2")]
86 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
87}
88#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
89#[repr(i32)]
90pub enum ApiProxyProtocol {
91 Unspecified = 0,
92 Http = 1,
93}
94impl ApiProxyProtocol {
95 pub fn as_str_name(&self) -> &'static str {
100 match self {
101 Self::Unspecified => "API_PROXY_PROTOCOL_UNSPECIFIED",
102 Self::Http => "API_PROXY_PROTOCOL_HTTP",
103 }
104 }
105 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
107 match value {
108 "API_PROXY_PROTOCOL_UNSPECIFIED" => Some(Self::Unspecified),
109 "API_PROXY_PROTOCOL_HTTP" => Some(Self::Http),
110 _ => None,
111 }
112 }
113}
114#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
115#[repr(i32)]
116pub enum ApiProxyInteraction {
117 Unspecified = 0,
118 Unary = 1,
119}
120impl ApiProxyInteraction {
121 pub fn as_str_name(&self) -> &'static str {
126 match self {
127 Self::Unspecified => "API_PROXY_INTERACTION_UNSPECIFIED",
128 Self::Unary => "API_PROXY_INTERACTION_UNARY",
129 }
130 }
131 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
133 match value {
134 "API_PROXY_INTERACTION_UNSPECIFIED" => Some(Self::Unspecified),
135 "API_PROXY_INTERACTION_UNARY" => Some(Self::Unary),
136 _ => None,
137 }
138 }
139}
140#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
141#[repr(i32)]
142pub enum ApiProxyBodyFormat {
143 Unspecified = 0,
144 Json = 1,
145}
146impl ApiProxyBodyFormat {
147 pub fn as_str_name(&self) -> &'static str {
152 match self {
153 Self::Unspecified => "API_PROXY_BODY_FORMAT_UNSPECIFIED",
154 Self::Json => "API_PROXY_BODY_FORMAT_JSON",
155 }
156 }
157 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
159 match value {
160 "API_PROXY_BODY_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
161 "API_PROXY_BODY_FORMAT_JSON" => Some(Self::Json),
162 _ => None,
163 }
164 }
165}
166#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
167#[repr(i32)]
168pub enum ApiProxyAuthKind {
169 Unspecified = 0,
170 None = 1,
171 BearerToken = 2,
172 Basic = 3,
173}
174impl ApiProxyAuthKind {
175 pub fn as_str_name(&self) -> &'static str {
180 match self {
181 Self::Unspecified => "API_PROXY_AUTH_KIND_UNSPECIFIED",
182 Self::None => "API_PROXY_AUTH_KIND_NONE",
183 Self::BearerToken => "API_PROXY_AUTH_KIND_BEARER_TOKEN",
184 Self::Basic => "API_PROXY_AUTH_KIND_BASIC",
185 }
186 }
187 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
189 match value {
190 "API_PROXY_AUTH_KIND_UNSPECIFIED" => Some(Self::Unspecified),
191 "API_PROXY_AUTH_KIND_NONE" => Some(Self::None),
192 "API_PROXY_AUTH_KIND_BEARER_TOKEN" => Some(Self::BearerToken),
193 "API_PROXY_AUTH_KIND_BASIC" => Some(Self::Basic),
194 _ => None,
195 }
196 }
197}
198pub mod api_proxy_service_client {
200 #![allow(
201 unused_variables,
202 dead_code,
203 missing_docs,
204 clippy::wildcard_imports,
205 clippy::let_unit_value,
206 )]
207 use tonic::codegen::*;
208 use tonic::codegen::http::Uri;
209 #[derive(Debug, Clone)]
210 pub struct ApiProxyServiceClient<T> {
211 inner: tonic::client::Grpc<T>,
212 }
213 impl ApiProxyServiceClient<tonic::transport::Channel> {
214 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
216 where
217 D: TryInto<tonic::transport::Endpoint>,
218 D::Error: Into<StdError>,
219 {
220 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
221 Ok(Self::new(conn))
222 }
223 }
224 impl<T> ApiProxyServiceClient<T>
225 where
226 T: tonic::client::GrpcService<tonic::body::Body>,
227 T::Error: Into<StdError>,
228 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
229 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
230 {
231 pub fn new(inner: T) -> Self {
232 let inner = tonic::client::Grpc::new(inner);
233 Self { inner }
234 }
235 pub fn with_origin(inner: T, origin: Uri) -> Self {
236 let inner = tonic::client::Grpc::with_origin(inner, origin);
237 Self { inner }
238 }
239 pub fn with_interceptor<F>(
240 inner: T,
241 interceptor: F,
242 ) -> ApiProxyServiceClient<InterceptedService<T, F>>
243 where
244 F: tonic::service::Interceptor,
245 T::ResponseBody: Default,
246 T: tonic::codegen::Service<
247 http::Request<tonic::body::Body>,
248 Response = http::Response<
249 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
250 >,
251 >,
252 <T as tonic::codegen::Service<
253 http::Request<tonic::body::Body>,
254 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
255 {
256 ApiProxyServiceClient::new(InterceptedService::new(inner, interceptor))
257 }
258 #[must_use]
263 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
264 self.inner = self.inner.send_compressed(encoding);
265 self
266 }
267 #[must_use]
269 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
270 self.inner = self.inner.accept_compressed(encoding);
271 self
272 }
273 #[must_use]
277 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
278 self.inner = self.inner.max_decoding_message_size(limit);
279 self
280 }
281 #[must_use]
285 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
286 self.inner = self.inner.max_encoding_message_size(limit);
287 self
288 }
289 pub async fn create_api_proxy(
290 &mut self,
291 request: impl tonic::IntoRequest<super::CreateApiProxyRequest>,
292 ) -> std::result::Result<
293 tonic::Response<super::CreateApiProxyResponse>,
294 tonic::Status,
295 > {
296 self.inner
297 .ready()
298 .await
299 .map_err(|e| {
300 tonic::Status::unknown(
301 format!("Service was not ready: {}", e.into()),
302 )
303 })?;
304 let codec = tonic::codec::ProstCodec::default();
305 let path = http::uri::PathAndQuery::from_static(
306 "/nominal.nova.v1.ApiProxyService/CreateApiProxy",
307 );
308 let mut req = request.into_request();
309 req.extensions_mut()
310 .insert(
311 GrpcMethod::new("nominal.nova.v1.ApiProxyService", "CreateApiProxy"),
312 );
313 self.inner.unary(req, path, codec).await
314 }
315 pub async fn get_api_proxy(
316 &mut self,
317 request: impl tonic::IntoRequest<super::GetApiProxyRequest>,
318 ) -> std::result::Result<
319 tonic::Response<super::GetApiProxyResponse>,
320 tonic::Status,
321 > {
322 self.inner
323 .ready()
324 .await
325 .map_err(|e| {
326 tonic::Status::unknown(
327 format!("Service was not ready: {}", e.into()),
328 )
329 })?;
330 let codec = tonic::codec::ProstCodec::default();
331 let path = http::uri::PathAndQuery::from_static(
332 "/nominal.nova.v1.ApiProxyService/GetApiProxy",
333 );
334 let mut req = request.into_request();
335 req.extensions_mut()
336 .insert(
337 GrpcMethod::new("nominal.nova.v1.ApiProxyService", "GetApiProxy"),
338 );
339 self.inner.unary(req, path, codec).await
340 }
341 pub async fn list_api_proxies(
342 &mut self,
343 request: impl tonic::IntoRequest<super::ListApiProxiesRequest>,
344 ) -> std::result::Result<
345 tonic::Response<super::ListApiProxiesResponse>,
346 tonic::Status,
347 > {
348 self.inner
349 .ready()
350 .await
351 .map_err(|e| {
352 tonic::Status::unknown(
353 format!("Service was not ready: {}", e.into()),
354 )
355 })?;
356 let codec = tonic::codec::ProstCodec::default();
357 let path = http::uri::PathAndQuery::from_static(
358 "/nominal.nova.v1.ApiProxyService/ListApiProxies",
359 );
360 let mut req = request.into_request();
361 req.extensions_mut()
362 .insert(
363 GrpcMethod::new("nominal.nova.v1.ApiProxyService", "ListApiProxies"),
364 );
365 self.inner.unary(req, path, codec).await
366 }
367 pub async fn delete_api_proxy(
368 &mut self,
369 request: impl tonic::IntoRequest<super::DeleteApiProxyRequest>,
370 ) -> std::result::Result<
371 tonic::Response<super::DeleteApiProxyResponse>,
372 tonic::Status,
373 > {
374 self.inner
375 .ready()
376 .await
377 .map_err(|e| {
378 tonic::Status::unknown(
379 format!("Service was not ready: {}", e.into()),
380 )
381 })?;
382 let codec = tonic::codec::ProstCodec::default();
383 let path = http::uri::PathAndQuery::from_static(
384 "/nominal.nova.v1.ApiProxyService/DeleteApiProxy",
385 );
386 let mut req = request.into_request();
387 req.extensions_mut()
388 .insert(
389 GrpcMethod::new("nominal.nova.v1.ApiProxyService", "DeleteApiProxy"),
390 );
391 self.inner.unary(req, path, codec).await
392 }
393 }
394}
395#[derive(Clone, PartialEq, ::prost::Message)]
396pub struct App {
397 #[prost(string, tag = "1")]
398 pub rid: ::prost::alloc::string::String,
399 #[prost(string, tag = "2")]
400 pub workspace_rid: ::prost::alloc::string::String,
401 #[prost(string, tag = "3")]
402 pub name: ::prost::alloc::string::String,
403 #[prost(string, tag = "4")]
404 pub title: ::prost::alloc::string::String,
405 #[prost(string, tag = "5")]
406 pub description: ::prost::alloc::string::String,
407 #[prost(string, repeated, tag = "6")]
408 pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
409 #[prost(map = "string, string", tag = "7")]
410 pub properties: ::std::collections::HashMap<
411 ::prost::alloc::string::String,
412 ::prost::alloc::string::String,
413 >,
414 #[prost(string, tag = "8")]
415 pub created_by_user_rid: ::prost::alloc::string::String,
416 #[prost(message, optional, tag = "9")]
417 pub created_at: ::core::option::Option<
418 super::super::super::google::protobuf::Timestamp,
419 >,
420 #[prost(message, optional, tag = "10")]
421 pub updated_at: ::core::option::Option<
422 super::super::super::google::protobuf::Timestamp,
423 >,
424 #[prost(bool, optional, tag = "11")]
425 pub is_archived: ::core::option::Option<bool>,
426 #[prost(string, optional, tag = "12")]
427 pub embed_path: ::core::option::Option<::prost::alloc::string::String>,
428 #[prost(string, optional, tag = "13")]
429 pub archive_sha256: ::core::option::Option<::prost::alloc::string::String>,
430}
431#[derive(Clone, PartialEq, ::prost::Message)]
432pub struct BundleSignature {
433 #[prost(string, tag = "1")]
434 pub key_id: ::prost::alloc::string::String,
435 #[prost(bytes = "vec", tag = "2")]
436 pub signature: ::prost::alloc::vec::Vec<u8>,
437}
438#[derive(Clone, PartialEq, ::prost::Message)]
439pub struct SignedAppBundle {
440 #[prost(string, tag = "1")]
441 pub upload_object_key: ::prost::alloc::string::String,
442 #[prost(message, optional, tag = "2")]
443 pub signature: ::core::option::Option<BundleSignature>,
444}
445#[derive(Clone, PartialEq, ::prost::Message)]
446pub struct CreateAppRequest {
447 #[prost(message, optional, tag = "1")]
448 pub app: ::core::option::Option<App>,
449 #[prost(message, optional, tag = "2")]
450 pub signed_bundle: ::core::option::Option<SignedAppBundle>,
451}
452#[derive(Clone, PartialEq, ::prost::Message)]
453pub struct CreateAppResponse {
454 #[prost(message, optional, tag = "1")]
455 pub app: ::core::option::Option<App>,
456}
457#[derive(Clone, PartialEq, ::prost::Message)]
458pub struct GetAppRequest {
459 #[prost(string, tag = "1")]
460 pub app_rid: ::prost::alloc::string::String,
461}
462#[derive(Clone, PartialEq, ::prost::Message)]
463pub struct GetAppResponse {
464 #[prost(message, optional, tag = "1")]
465 pub app: ::core::option::Option<App>,
466}
467#[derive(Clone, PartialEq, ::prost::Message)]
468pub struct UpdateAppRequest {
469 #[prost(string, tag = "1")]
470 pub app_rid: ::prost::alloc::string::String,
471 #[prost(message, optional, tag = "2")]
472 pub app: ::core::option::Option<App>,
473 #[prost(message, optional, tag = "3")]
474 pub signed_bundle: ::core::option::Option<SignedAppBundle>,
475}
476#[derive(Clone, PartialEq, ::prost::Message)]
477pub struct UpdateAppResponse {
478 #[prost(message, optional, tag = "1")]
479 pub app: ::core::option::Option<App>,
480}
481#[derive(Clone, PartialEq, ::prost::Message)]
482pub struct DeleteAppRequest {
483 #[prost(string, tag = "1")]
484 pub app_rid: ::prost::alloc::string::String,
485}
486#[derive(Clone, Copy, PartialEq, ::prost::Message)]
487pub struct DeleteAppResponse {}
488#[derive(Clone, PartialEq, ::prost::Message)]
489pub struct AppSearchFilter {
490 #[prost(string, optional, tag = "1")]
491 pub name_contains: ::core::option::Option<::prost::alloc::string::String>,
492 #[prost(bool, optional, tag = "2")]
493 pub include_archived: ::core::option::Option<bool>,
494 #[prost(string, repeated, tag = "3")]
495 pub created_by_user_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
496 #[prost(string, repeated, tag = "4")]
497 pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
498}
499#[derive(Clone, PartialEq, ::prost::Message)]
500pub struct SearchAppsRequest {
501 #[prost(string, tag = "1")]
502 pub workspace_rid: ::prost::alloc::string::String,
503 #[prost(message, optional, tag = "2")]
504 pub filter: ::core::option::Option<AppSearchFilter>,
505 #[prost(enumeration = "SearchAppsSortField", tag = "3")]
506 pub sort_field: i32,
507 #[prost(bool, tag = "4")]
508 pub descending: bool,
509 #[prost(int32, optional, tag = "5")]
510 pub page_size: ::core::option::Option<i32>,
511 #[prost(string, optional, tag = "6")]
512 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
513}
514#[derive(Clone, PartialEq, ::prost::Message)]
515pub struct SearchAppsResponse {
516 #[prost(message, repeated, tag = "1")]
517 pub apps: ::prost::alloc::vec::Vec<App>,
518 #[prost(string, optional, tag = "2")]
519 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
520}
521#[derive(Clone, PartialEq, ::prost::Message)]
522pub struct SearchAppLabelsRequest {
523 #[prost(string, tag = "1")]
524 pub workspace_rid: ::prost::alloc::string::String,
525 #[prost(int32, optional, tag = "2")]
526 pub page_size: ::core::option::Option<i32>,
527 #[prost(string, optional, tag = "3")]
528 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
529}
530#[derive(Clone, PartialEq, ::prost::Message)]
531pub struct SearchAppLabelsResponse {
532 #[prost(string, repeated, tag = "1")]
533 pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
534 #[prost(string, optional, tag = "2")]
535 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
536}
537#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
538#[repr(i32)]
539pub enum NovaError {
540 AppNotFound = 0,
541 AppNameTaken = 1,
542 AppNameImmutable = 2,
543 ServerAssignedFieldSet = 3,
544 InvalidPageToken = 4,
545 InvalidBundle = 5,
546 BundleVerificationFailed = 6,
547 AppUpdateConflict = 7,
548 ApiProxyNotFound = 8,
549 ApiProxyNameTaken = 9,
550 ApiProxyInUse = 10,
551 AppProxyExists = 11,
552 AppArchived = 12,
553}
554impl NovaError {
555 pub fn as_str_name(&self) -> &'static str {
560 match self {
561 Self::AppNotFound => "NOVA_ERROR_APP_NOT_FOUND",
562 Self::AppNameTaken => "NOVA_ERROR_APP_NAME_TAKEN",
563 Self::AppNameImmutable => "NOVA_ERROR_APP_NAME_IMMUTABLE",
564 Self::ServerAssignedFieldSet => "NOVA_ERROR_SERVER_ASSIGNED_FIELD_SET",
565 Self::InvalidPageToken => "NOVA_ERROR_INVALID_PAGE_TOKEN",
566 Self::InvalidBundle => "NOVA_ERROR_INVALID_BUNDLE",
567 Self::BundleVerificationFailed => "NOVA_ERROR_BUNDLE_VERIFICATION_FAILED",
568 Self::AppUpdateConflict => "NOVA_ERROR_APP_UPDATE_CONFLICT",
569 Self::ApiProxyNotFound => "NOVA_ERROR_API_PROXY_NOT_FOUND",
570 Self::ApiProxyNameTaken => "NOVA_ERROR_API_PROXY_NAME_TAKEN",
571 Self::ApiProxyInUse => "NOVA_ERROR_API_PROXY_IN_USE",
572 Self::AppProxyExists => "NOVA_ERROR_APP_PROXY_EXISTS",
573 Self::AppArchived => "NOVA_ERROR_APP_ARCHIVED",
574 }
575 }
576 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
578 match value {
579 "NOVA_ERROR_APP_NOT_FOUND" => Some(Self::AppNotFound),
580 "NOVA_ERROR_APP_NAME_TAKEN" => Some(Self::AppNameTaken),
581 "NOVA_ERROR_APP_NAME_IMMUTABLE" => Some(Self::AppNameImmutable),
582 "NOVA_ERROR_SERVER_ASSIGNED_FIELD_SET" => Some(Self::ServerAssignedFieldSet),
583 "NOVA_ERROR_INVALID_PAGE_TOKEN" => Some(Self::InvalidPageToken),
584 "NOVA_ERROR_INVALID_BUNDLE" => Some(Self::InvalidBundle),
585 "NOVA_ERROR_BUNDLE_VERIFICATION_FAILED" => {
586 Some(Self::BundleVerificationFailed)
587 }
588 "NOVA_ERROR_APP_UPDATE_CONFLICT" => Some(Self::AppUpdateConflict),
589 "NOVA_ERROR_API_PROXY_NOT_FOUND" => Some(Self::ApiProxyNotFound),
590 "NOVA_ERROR_API_PROXY_NAME_TAKEN" => Some(Self::ApiProxyNameTaken),
591 "NOVA_ERROR_API_PROXY_IN_USE" => Some(Self::ApiProxyInUse),
592 "NOVA_ERROR_APP_PROXY_EXISTS" => Some(Self::AppProxyExists),
593 "NOVA_ERROR_APP_ARCHIVED" => Some(Self::AppArchived),
594 _ => None,
595 }
596 }
597}
598#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
599#[repr(i32)]
600pub enum SearchAppsSortField {
601 Unspecified = 0,
602 Title = 1,
603 CreatedAt = 2,
604 UpdatedAt = 3,
605}
606impl SearchAppsSortField {
607 pub fn as_str_name(&self) -> &'static str {
612 match self {
613 Self::Unspecified => "SEARCH_APPS_SORT_FIELD_UNSPECIFIED",
614 Self::Title => "SEARCH_APPS_SORT_FIELD_TITLE",
615 Self::CreatedAt => "SEARCH_APPS_SORT_FIELD_CREATED_AT",
616 Self::UpdatedAt => "SEARCH_APPS_SORT_FIELD_UPDATED_AT",
617 }
618 }
619 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
621 match value {
622 "SEARCH_APPS_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
623 "SEARCH_APPS_SORT_FIELD_TITLE" => Some(Self::Title),
624 "SEARCH_APPS_SORT_FIELD_CREATED_AT" => Some(Self::CreatedAt),
625 "SEARCH_APPS_SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
626 _ => None,
627 }
628 }
629}
630pub mod nova_service_client {
632 #![allow(
633 unused_variables,
634 dead_code,
635 missing_docs,
636 clippy::wildcard_imports,
637 clippy::let_unit_value,
638 )]
639 use tonic::codegen::*;
640 use tonic::codegen::http::Uri;
641 #[derive(Debug, Clone)]
642 pub struct NovaServiceClient<T> {
643 inner: tonic::client::Grpc<T>,
644 }
645 impl NovaServiceClient<tonic::transport::Channel> {
646 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
648 where
649 D: TryInto<tonic::transport::Endpoint>,
650 D::Error: Into<StdError>,
651 {
652 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
653 Ok(Self::new(conn))
654 }
655 }
656 impl<T> NovaServiceClient<T>
657 where
658 T: tonic::client::GrpcService<tonic::body::Body>,
659 T::Error: Into<StdError>,
660 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
661 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
662 {
663 pub fn new(inner: T) -> Self {
664 let inner = tonic::client::Grpc::new(inner);
665 Self { inner }
666 }
667 pub fn with_origin(inner: T, origin: Uri) -> Self {
668 let inner = tonic::client::Grpc::with_origin(inner, origin);
669 Self { inner }
670 }
671 pub fn with_interceptor<F>(
672 inner: T,
673 interceptor: F,
674 ) -> NovaServiceClient<InterceptedService<T, F>>
675 where
676 F: tonic::service::Interceptor,
677 T::ResponseBody: Default,
678 T: tonic::codegen::Service<
679 http::Request<tonic::body::Body>,
680 Response = http::Response<
681 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
682 >,
683 >,
684 <T as tonic::codegen::Service<
685 http::Request<tonic::body::Body>,
686 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
687 {
688 NovaServiceClient::new(InterceptedService::new(inner, interceptor))
689 }
690 #[must_use]
695 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
696 self.inner = self.inner.send_compressed(encoding);
697 self
698 }
699 #[must_use]
701 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
702 self.inner = self.inner.accept_compressed(encoding);
703 self
704 }
705 #[must_use]
709 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
710 self.inner = self.inner.max_decoding_message_size(limit);
711 self
712 }
713 #[must_use]
717 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
718 self.inner = self.inner.max_encoding_message_size(limit);
719 self
720 }
721 pub async fn create_app(
722 &mut self,
723 request: impl tonic::IntoRequest<super::CreateAppRequest>,
724 ) -> std::result::Result<
725 tonic::Response<super::CreateAppResponse>,
726 tonic::Status,
727 > {
728 self.inner
729 .ready()
730 .await
731 .map_err(|e| {
732 tonic::Status::unknown(
733 format!("Service was not ready: {}", e.into()),
734 )
735 })?;
736 let codec = tonic::codec::ProstCodec::default();
737 let path = http::uri::PathAndQuery::from_static(
738 "/nominal.nova.v1.NovaService/CreateApp",
739 );
740 let mut req = request.into_request();
741 req.extensions_mut()
742 .insert(GrpcMethod::new("nominal.nova.v1.NovaService", "CreateApp"));
743 self.inner.unary(req, path, codec).await
744 }
745 pub async fn get_app(
746 &mut self,
747 request: impl tonic::IntoRequest<super::GetAppRequest>,
748 ) -> std::result::Result<tonic::Response<super::GetAppResponse>, tonic::Status> {
749 self.inner
750 .ready()
751 .await
752 .map_err(|e| {
753 tonic::Status::unknown(
754 format!("Service was not ready: {}", e.into()),
755 )
756 })?;
757 let codec = tonic::codec::ProstCodec::default();
758 let path = http::uri::PathAndQuery::from_static(
759 "/nominal.nova.v1.NovaService/GetApp",
760 );
761 let mut req = request.into_request();
762 req.extensions_mut()
763 .insert(GrpcMethod::new("nominal.nova.v1.NovaService", "GetApp"));
764 self.inner.unary(req, path, codec).await
765 }
766 pub async fn update_app(
767 &mut self,
768 request: impl tonic::IntoRequest<super::UpdateAppRequest>,
769 ) -> std::result::Result<
770 tonic::Response<super::UpdateAppResponse>,
771 tonic::Status,
772 > {
773 self.inner
774 .ready()
775 .await
776 .map_err(|e| {
777 tonic::Status::unknown(
778 format!("Service was not ready: {}", e.into()),
779 )
780 })?;
781 let codec = tonic::codec::ProstCodec::default();
782 let path = http::uri::PathAndQuery::from_static(
783 "/nominal.nova.v1.NovaService/UpdateApp",
784 );
785 let mut req = request.into_request();
786 req.extensions_mut()
787 .insert(GrpcMethod::new("nominal.nova.v1.NovaService", "UpdateApp"));
788 self.inner.unary(req, path, codec).await
789 }
790 pub async fn delete_app(
791 &mut self,
792 request: impl tonic::IntoRequest<super::DeleteAppRequest>,
793 ) -> std::result::Result<
794 tonic::Response<super::DeleteAppResponse>,
795 tonic::Status,
796 > {
797 self.inner
798 .ready()
799 .await
800 .map_err(|e| {
801 tonic::Status::unknown(
802 format!("Service was not ready: {}", e.into()),
803 )
804 })?;
805 let codec = tonic::codec::ProstCodec::default();
806 let path = http::uri::PathAndQuery::from_static(
807 "/nominal.nova.v1.NovaService/DeleteApp",
808 );
809 let mut req = request.into_request();
810 req.extensions_mut()
811 .insert(GrpcMethod::new("nominal.nova.v1.NovaService", "DeleteApp"));
812 self.inner.unary(req, path, codec).await
813 }
814 pub async fn search_apps(
815 &mut self,
816 request: impl tonic::IntoRequest<super::SearchAppsRequest>,
817 ) -> std::result::Result<
818 tonic::Response<super::SearchAppsResponse>,
819 tonic::Status,
820 > {
821 self.inner
822 .ready()
823 .await
824 .map_err(|e| {
825 tonic::Status::unknown(
826 format!("Service was not ready: {}", e.into()),
827 )
828 })?;
829 let codec = tonic::codec::ProstCodec::default();
830 let path = http::uri::PathAndQuery::from_static(
831 "/nominal.nova.v1.NovaService/SearchApps",
832 );
833 let mut req = request.into_request();
834 req.extensions_mut()
835 .insert(GrpcMethod::new("nominal.nova.v1.NovaService", "SearchApps"));
836 self.inner.unary(req, path, codec).await
837 }
838 pub async fn search_app_labels(
839 &mut self,
840 request: impl tonic::IntoRequest<super::SearchAppLabelsRequest>,
841 ) -> std::result::Result<
842 tonic::Response<super::SearchAppLabelsResponse>,
843 tonic::Status,
844 > {
845 self.inner
846 .ready()
847 .await
848 .map_err(|e| {
849 tonic::Status::unknown(
850 format!("Service was not ready: {}", e.into()),
851 )
852 })?;
853 let codec = tonic::codec::ProstCodec::default();
854 let path = http::uri::PathAndQuery::from_static(
855 "/nominal.nova.v1.NovaService/SearchAppLabels",
856 );
857 let mut req = request.into_request();
858 req.extensions_mut()
859 .insert(
860 GrpcMethod::new("nominal.nova.v1.NovaService", "SearchAppLabels"),
861 );
862 self.inner.unary(req, path, codec).await
863 }
864 }
865}
866#[derive(Clone, PartialEq, ::prost::Message)]
867pub struct AppProxy {
868 #[prost(string, tag = "1")]
869 pub app_rid: ::prost::alloc::string::String,
870 #[prost(string, tag = "2")]
871 pub api_proxy_rid: ::prost::alloc::string::String,
872 #[prost(message, optional, tag = "3")]
873 pub created_at: ::core::option::Option<
874 super::super::super::google::protobuf::Timestamp,
875 >,
876}
877#[derive(Clone, PartialEq, ::prost::Message)]
878pub struct CreateAppProxyRequest {
879 #[prost(string, tag = "1")]
880 pub app_rid: ::prost::alloc::string::String,
881 #[prost(string, tag = "2")]
882 pub api_proxy_rid: ::prost::alloc::string::String,
883}
884#[derive(Clone, PartialEq, ::prost::Message)]
885pub struct CreateAppProxyResponse {
886 #[prost(message, optional, tag = "1")]
887 pub app_proxy: ::core::option::Option<AppProxy>,
888}
889#[derive(Clone, PartialEq, ::prost::Message)]
890pub struct DeleteAppProxyRequest {
891 #[prost(string, tag = "1")]
892 pub app_rid: ::prost::alloc::string::String,
893 #[prost(string, tag = "2")]
894 pub api_proxy_rid: ::prost::alloc::string::String,
895}
896#[derive(Clone, Copy, PartialEq, ::prost::Message)]
897pub struct DeleteAppProxyResponse {}
898#[derive(Clone, PartialEq, ::prost::Message)]
899pub struct ListAppProxiesRequest {
900 #[prost(string, tag = "1")]
901 pub app_rid: ::prost::alloc::string::String,
902 #[prost(int32, optional, tag = "2")]
903 pub page_size: ::core::option::Option<i32>,
904 #[prost(string, optional, tag = "3")]
905 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
906}
907#[derive(Clone, PartialEq, ::prost::Message)]
908pub struct ListAppProxiesResponse {
909 #[prost(message, repeated, tag = "1")]
910 pub app_proxies: ::prost::alloc::vec::Vec<AppProxy>,
911 #[prost(string, optional, tag = "2")]
912 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
913}
914pub mod app_proxy_service_client {
916 #![allow(
917 unused_variables,
918 dead_code,
919 missing_docs,
920 clippy::wildcard_imports,
921 clippy::let_unit_value,
922 )]
923 use tonic::codegen::*;
924 use tonic::codegen::http::Uri;
925 #[derive(Debug, Clone)]
926 pub struct AppProxyServiceClient<T> {
927 inner: tonic::client::Grpc<T>,
928 }
929 impl AppProxyServiceClient<tonic::transport::Channel> {
930 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
932 where
933 D: TryInto<tonic::transport::Endpoint>,
934 D::Error: Into<StdError>,
935 {
936 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
937 Ok(Self::new(conn))
938 }
939 }
940 impl<T> AppProxyServiceClient<T>
941 where
942 T: tonic::client::GrpcService<tonic::body::Body>,
943 T::Error: Into<StdError>,
944 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
945 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
946 {
947 pub fn new(inner: T) -> Self {
948 let inner = tonic::client::Grpc::new(inner);
949 Self { inner }
950 }
951 pub fn with_origin(inner: T, origin: Uri) -> Self {
952 let inner = tonic::client::Grpc::with_origin(inner, origin);
953 Self { inner }
954 }
955 pub fn with_interceptor<F>(
956 inner: T,
957 interceptor: F,
958 ) -> AppProxyServiceClient<InterceptedService<T, F>>
959 where
960 F: tonic::service::Interceptor,
961 T::ResponseBody: Default,
962 T: tonic::codegen::Service<
963 http::Request<tonic::body::Body>,
964 Response = http::Response<
965 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
966 >,
967 >,
968 <T as tonic::codegen::Service<
969 http::Request<tonic::body::Body>,
970 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
971 {
972 AppProxyServiceClient::new(InterceptedService::new(inner, interceptor))
973 }
974 #[must_use]
979 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
980 self.inner = self.inner.send_compressed(encoding);
981 self
982 }
983 #[must_use]
985 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
986 self.inner = self.inner.accept_compressed(encoding);
987 self
988 }
989 #[must_use]
993 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
994 self.inner = self.inner.max_decoding_message_size(limit);
995 self
996 }
997 #[must_use]
1001 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1002 self.inner = self.inner.max_encoding_message_size(limit);
1003 self
1004 }
1005 pub async fn create_app_proxy(
1006 &mut self,
1007 request: impl tonic::IntoRequest<super::CreateAppProxyRequest>,
1008 ) -> std::result::Result<
1009 tonic::Response<super::CreateAppProxyResponse>,
1010 tonic::Status,
1011 > {
1012 self.inner
1013 .ready()
1014 .await
1015 .map_err(|e| {
1016 tonic::Status::unknown(
1017 format!("Service was not ready: {}", e.into()),
1018 )
1019 })?;
1020 let codec = tonic::codec::ProstCodec::default();
1021 let path = http::uri::PathAndQuery::from_static(
1022 "/nominal.nova.v1.AppProxyService/CreateAppProxy",
1023 );
1024 let mut req = request.into_request();
1025 req.extensions_mut()
1026 .insert(
1027 GrpcMethod::new("nominal.nova.v1.AppProxyService", "CreateAppProxy"),
1028 );
1029 self.inner.unary(req, path, codec).await
1030 }
1031 pub async fn delete_app_proxy(
1032 &mut self,
1033 request: impl tonic::IntoRequest<super::DeleteAppProxyRequest>,
1034 ) -> std::result::Result<
1035 tonic::Response<super::DeleteAppProxyResponse>,
1036 tonic::Status,
1037 > {
1038 self.inner
1039 .ready()
1040 .await
1041 .map_err(|e| {
1042 tonic::Status::unknown(
1043 format!("Service was not ready: {}", e.into()),
1044 )
1045 })?;
1046 let codec = tonic::codec::ProstCodec::default();
1047 let path = http::uri::PathAndQuery::from_static(
1048 "/nominal.nova.v1.AppProxyService/DeleteAppProxy",
1049 );
1050 let mut req = request.into_request();
1051 req.extensions_mut()
1052 .insert(
1053 GrpcMethod::new("nominal.nova.v1.AppProxyService", "DeleteAppProxy"),
1054 );
1055 self.inner.unary(req, path, codec).await
1056 }
1057 pub async fn list_app_proxies(
1058 &mut self,
1059 request: impl tonic::IntoRequest<super::ListAppProxiesRequest>,
1060 ) -> std::result::Result<
1061 tonic::Response<super::ListAppProxiesResponse>,
1062 tonic::Status,
1063 > {
1064 self.inner
1065 .ready()
1066 .await
1067 .map_err(|e| {
1068 tonic::Status::unknown(
1069 format!("Service was not ready: {}", e.into()),
1070 )
1071 })?;
1072 let codec = tonic::codec::ProstCodec::default();
1073 let path = http::uri::PathAndQuery::from_static(
1074 "/nominal.nova.v1.AppProxyService/ListAppProxies",
1075 );
1076 let mut req = request.into_request();
1077 req.extensions_mut()
1078 .insert(
1079 GrpcMethod::new("nominal.nova.v1.AppProxyService", "ListAppProxies"),
1080 );
1081 self.inner.unary(req, path, codec).await
1082 }
1083 }
1084}
1085#[derive(Clone, PartialEq, ::prost::Message)]
1086pub struct KeyValueEntry {
1087 #[prost(string, tag = "1")]
1088 pub app_rid: ::prost::alloc::string::String,
1089 #[prost(string, tag = "2")]
1090 pub key: ::prost::alloc::string::String,
1091 #[prost(message, optional, tag = "3")]
1092 pub value: ::core::option::Option<super::super::super::google::protobuf::Value>,
1093 #[prost(message, optional, tag = "4")]
1094 pub created_at: ::core::option::Option<
1095 super::super::super::google::protobuf::Timestamp,
1096 >,
1097 #[prost(message, optional, tag = "5")]
1098 pub updated_at: ::core::option::Option<
1099 super::super::super::google::protobuf::Timestamp,
1100 >,
1101 #[prost(int64, tag = "6")]
1102 pub version: i64,
1103}
1104#[derive(Clone, PartialEq, ::prost::Message)]
1105pub struct CreateKeyValueEntryRequest {
1106 #[prost(string, tag = "1")]
1107 pub app_rid: ::prost::alloc::string::String,
1108 #[prost(string, tag = "2")]
1109 pub key: ::prost::alloc::string::String,
1110 #[prost(message, optional, tag = "3")]
1111 pub value: ::core::option::Option<super::super::super::google::protobuf::Value>,
1112}
1113#[derive(Clone, PartialEq, ::prost::Message)]
1114pub struct CreateKeyValueEntryResponse {
1115 #[prost(message, optional, tag = "1")]
1116 pub key_value_entry: ::core::option::Option<KeyValueEntry>,
1117}
1118#[derive(Clone, PartialEq, ::prost::Message)]
1119pub struct UpdateKeyValueEntryRequest {
1120 #[prost(string, tag = "1")]
1121 pub app_rid: ::prost::alloc::string::String,
1122 #[prost(string, tag = "2")]
1123 pub key: ::prost::alloc::string::String,
1124 #[prost(message, optional, tag = "3")]
1125 pub value: ::core::option::Option<super::super::super::google::protobuf::Value>,
1126 #[prost(int64, optional, tag = "4")]
1127 pub expected_version: ::core::option::Option<i64>,
1128}
1129#[derive(Clone, PartialEq, ::prost::Message)]
1130pub struct UpdateKeyValueEntryResponse {
1131 #[prost(message, optional, tag = "1")]
1132 pub key_value_entry: ::core::option::Option<KeyValueEntry>,
1133}
1134#[derive(Clone, PartialEq, ::prost::Message)]
1135pub struct GetKeyValueEntryRequest {
1136 #[prost(string, tag = "1")]
1137 pub app_rid: ::prost::alloc::string::String,
1138 #[prost(string, tag = "2")]
1139 pub key: ::prost::alloc::string::String,
1140}
1141#[derive(Clone, PartialEq, ::prost::Message)]
1142pub struct GetKeyValueEntryResponse {
1143 #[prost(message, optional, tag = "1")]
1144 pub key_value_entry: ::core::option::Option<KeyValueEntry>,
1145}
1146#[derive(Clone, PartialEq, ::prost::Message)]
1147pub struct DeleteKeyValueEntryRequest {
1148 #[prost(string, tag = "1")]
1149 pub app_rid: ::prost::alloc::string::String,
1150 #[prost(string, tag = "2")]
1151 pub key: ::prost::alloc::string::String,
1152}
1153#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1154pub struct DeleteKeyValueEntryResponse {}
1155#[derive(Clone, PartialEq, ::prost::Message)]
1156pub struct BatchGetKeyValueEntriesRequest {
1157 #[prost(string, tag = "1")]
1158 pub app_rid: ::prost::alloc::string::String,
1159 #[prost(string, repeated, tag = "2")]
1160 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1161}
1162#[derive(Clone, PartialEq, ::prost::Message)]
1163pub struct BatchGetKeyValueEntriesResponse {
1164 #[prost(message, repeated, tag = "1")]
1165 pub key_value_entries: ::prost::alloc::vec::Vec<KeyValueEntry>,
1166}
1167#[derive(Clone, PartialEq, ::prost::Message)]
1168pub struct BatchCreateKeyValueEntriesRequest {
1169 #[prost(string, tag = "1")]
1170 pub app_rid: ::prost::alloc::string::String,
1171 #[prost(message, repeated, tag = "2")]
1172 pub writes: ::prost::alloc::vec::Vec<KeyValueEntryWrite>,
1173}
1174#[derive(Clone, PartialEq, ::prost::Message)]
1175pub struct BatchCreateKeyValueEntriesResponse {
1176 #[prost(message, repeated, tag = "1")]
1177 pub key_value_entries: ::prost::alloc::vec::Vec<KeyValueEntry>,
1178}
1179#[derive(Clone, PartialEq, ::prost::Message)]
1180pub struct KeyValueEntryWrite {
1181 #[prost(string, tag = "1")]
1182 pub key: ::prost::alloc::string::String,
1183 #[prost(message, optional, tag = "2")]
1184 pub value: ::core::option::Option<super::super::super::google::protobuf::Value>,
1185 #[prost(int64, optional, tag = "3")]
1186 pub expected_version: ::core::option::Option<i64>,
1187}
1188#[derive(Clone, PartialEq, ::prost::Message)]
1189pub struct BatchUpdateKeyValueEntriesRequest {
1190 #[prost(string, tag = "1")]
1191 pub app_rid: ::prost::alloc::string::String,
1192 #[prost(message, repeated, tag = "2")]
1193 pub writes: ::prost::alloc::vec::Vec<KeyValueEntryWrite>,
1194}
1195#[derive(Clone, PartialEq, ::prost::Message)]
1196pub struct BatchUpdateKeyValueEntriesResponse {
1197 #[prost(message, repeated, tag = "1")]
1198 pub key_value_entries: ::prost::alloc::vec::Vec<KeyValueEntry>,
1199}
1200#[derive(Clone, PartialEq, ::prost::Message)]
1201pub struct BatchDeleteKeyValueEntriesRequest {
1202 #[prost(string, tag = "1")]
1203 pub app_rid: ::prost::alloc::string::String,
1204 #[prost(string, repeated, tag = "2")]
1205 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1206}
1207#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1208pub struct BatchDeleteKeyValueEntriesResponse {}
1209#[derive(Clone, PartialEq, ::prost::Message)]
1210pub struct SearchKeyValueEntriesRequest {
1211 #[prost(string, tag = "1")]
1212 pub app_rid: ::prost::alloc::string::String,
1213 #[prost(string, optional, tag = "2")]
1214 pub key_prefix: ::core::option::Option<::prost::alloc::string::String>,
1215 #[prost(int32, optional, tag = "3")]
1216 pub page_size: ::core::option::Option<i32>,
1217 #[prost(string, optional, tag = "4")]
1218 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1219}
1220#[derive(Clone, PartialEq, ::prost::Message)]
1221pub struct SearchKeyValueEntriesResponse {
1222 #[prost(message, repeated, tag = "1")]
1223 pub key_value_entries: ::prost::alloc::vec::Vec<KeyValueEntry>,
1224 #[prost(string, optional, tag = "2")]
1225 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1226}
1227#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1228#[repr(i32)]
1229pub enum NovaKeyValueError {
1230 VersionConflict = 0,
1231 QuotaExceeded = 1,
1232 RateLimited = 2,
1233 AppArchived = 3,
1234 ValueTooLarge = 4,
1235 EntryAlreadyExists = 6,
1236 EntryNotFound = 5,
1237}
1238impl NovaKeyValueError {
1239 pub fn as_str_name(&self) -> &'static str {
1244 match self {
1245 Self::VersionConflict => "NOVA_KEY_VALUE_ERROR_VERSION_CONFLICT",
1246 Self::QuotaExceeded => "NOVA_KEY_VALUE_ERROR_QUOTA_EXCEEDED",
1247 Self::RateLimited => "NOVA_KEY_VALUE_ERROR_RATE_LIMITED",
1248 Self::AppArchived => "NOVA_KEY_VALUE_ERROR_APP_ARCHIVED",
1249 Self::ValueTooLarge => "NOVA_KEY_VALUE_ERROR_VALUE_TOO_LARGE",
1250 Self::EntryAlreadyExists => "NOVA_KEY_VALUE_ERROR_ENTRY_ALREADY_EXISTS",
1251 Self::EntryNotFound => "NOVA_KEY_VALUE_ERROR_ENTRY_NOT_FOUND",
1252 }
1253 }
1254 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1256 match value {
1257 "NOVA_KEY_VALUE_ERROR_VERSION_CONFLICT" => Some(Self::VersionConflict),
1258 "NOVA_KEY_VALUE_ERROR_QUOTA_EXCEEDED" => Some(Self::QuotaExceeded),
1259 "NOVA_KEY_VALUE_ERROR_RATE_LIMITED" => Some(Self::RateLimited),
1260 "NOVA_KEY_VALUE_ERROR_APP_ARCHIVED" => Some(Self::AppArchived),
1261 "NOVA_KEY_VALUE_ERROR_VALUE_TOO_LARGE" => Some(Self::ValueTooLarge),
1262 "NOVA_KEY_VALUE_ERROR_ENTRY_ALREADY_EXISTS" => Some(Self::EntryAlreadyExists),
1263 "NOVA_KEY_VALUE_ERROR_ENTRY_NOT_FOUND" => Some(Self::EntryNotFound),
1264 _ => None,
1265 }
1266 }
1267}
1268pub mod nova_key_value_service_client {
1270 #![allow(
1271 unused_variables,
1272 dead_code,
1273 missing_docs,
1274 clippy::wildcard_imports,
1275 clippy::let_unit_value,
1276 )]
1277 use tonic::codegen::*;
1278 use tonic::codegen::http::Uri;
1279 #[derive(Debug, Clone)]
1280 pub struct NovaKeyValueServiceClient<T> {
1281 inner: tonic::client::Grpc<T>,
1282 }
1283 impl NovaKeyValueServiceClient<tonic::transport::Channel> {
1284 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1286 where
1287 D: TryInto<tonic::transport::Endpoint>,
1288 D::Error: Into<StdError>,
1289 {
1290 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1291 Ok(Self::new(conn))
1292 }
1293 }
1294 impl<T> NovaKeyValueServiceClient<T>
1295 where
1296 T: tonic::client::GrpcService<tonic::body::Body>,
1297 T::Error: Into<StdError>,
1298 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1299 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1300 {
1301 pub fn new(inner: T) -> Self {
1302 let inner = tonic::client::Grpc::new(inner);
1303 Self { inner }
1304 }
1305 pub fn with_origin(inner: T, origin: Uri) -> Self {
1306 let inner = tonic::client::Grpc::with_origin(inner, origin);
1307 Self { inner }
1308 }
1309 pub fn with_interceptor<F>(
1310 inner: T,
1311 interceptor: F,
1312 ) -> NovaKeyValueServiceClient<InterceptedService<T, F>>
1313 where
1314 F: tonic::service::Interceptor,
1315 T::ResponseBody: Default,
1316 T: tonic::codegen::Service<
1317 http::Request<tonic::body::Body>,
1318 Response = http::Response<
1319 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1320 >,
1321 >,
1322 <T as tonic::codegen::Service<
1323 http::Request<tonic::body::Body>,
1324 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1325 {
1326 NovaKeyValueServiceClient::new(InterceptedService::new(inner, interceptor))
1327 }
1328 #[must_use]
1333 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1334 self.inner = self.inner.send_compressed(encoding);
1335 self
1336 }
1337 #[must_use]
1339 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1340 self.inner = self.inner.accept_compressed(encoding);
1341 self
1342 }
1343 #[must_use]
1347 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1348 self.inner = self.inner.max_decoding_message_size(limit);
1349 self
1350 }
1351 #[must_use]
1355 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1356 self.inner = self.inner.max_encoding_message_size(limit);
1357 self
1358 }
1359 pub async fn create_key_value_entry(
1360 &mut self,
1361 request: impl tonic::IntoRequest<super::CreateKeyValueEntryRequest>,
1362 ) -> std::result::Result<
1363 tonic::Response<super::CreateKeyValueEntryResponse>,
1364 tonic::Status,
1365 > {
1366 self.inner
1367 .ready()
1368 .await
1369 .map_err(|e| {
1370 tonic::Status::unknown(
1371 format!("Service was not ready: {}", e.into()),
1372 )
1373 })?;
1374 let codec = tonic::codec::ProstCodec::default();
1375 let path = http::uri::PathAndQuery::from_static(
1376 "/nominal.nova.v1.NovaKeyValueService/CreateKeyValueEntry",
1377 );
1378 let mut req = request.into_request();
1379 req.extensions_mut()
1380 .insert(
1381 GrpcMethod::new(
1382 "nominal.nova.v1.NovaKeyValueService",
1383 "CreateKeyValueEntry",
1384 ),
1385 );
1386 self.inner.unary(req, path, codec).await
1387 }
1388 pub async fn update_key_value_entry(
1389 &mut self,
1390 request: impl tonic::IntoRequest<super::UpdateKeyValueEntryRequest>,
1391 ) -> std::result::Result<
1392 tonic::Response<super::UpdateKeyValueEntryResponse>,
1393 tonic::Status,
1394 > {
1395 self.inner
1396 .ready()
1397 .await
1398 .map_err(|e| {
1399 tonic::Status::unknown(
1400 format!("Service was not ready: {}", e.into()),
1401 )
1402 })?;
1403 let codec = tonic::codec::ProstCodec::default();
1404 let path = http::uri::PathAndQuery::from_static(
1405 "/nominal.nova.v1.NovaKeyValueService/UpdateKeyValueEntry",
1406 );
1407 let mut req = request.into_request();
1408 req.extensions_mut()
1409 .insert(
1410 GrpcMethod::new(
1411 "nominal.nova.v1.NovaKeyValueService",
1412 "UpdateKeyValueEntry",
1413 ),
1414 );
1415 self.inner.unary(req, path, codec).await
1416 }
1417 pub async fn get_key_value_entry(
1418 &mut self,
1419 request: impl tonic::IntoRequest<super::GetKeyValueEntryRequest>,
1420 ) -> std::result::Result<
1421 tonic::Response<super::GetKeyValueEntryResponse>,
1422 tonic::Status,
1423 > {
1424 self.inner
1425 .ready()
1426 .await
1427 .map_err(|e| {
1428 tonic::Status::unknown(
1429 format!("Service was not ready: {}", e.into()),
1430 )
1431 })?;
1432 let codec = tonic::codec::ProstCodec::default();
1433 let path = http::uri::PathAndQuery::from_static(
1434 "/nominal.nova.v1.NovaKeyValueService/GetKeyValueEntry",
1435 );
1436 let mut req = request.into_request();
1437 req.extensions_mut()
1438 .insert(
1439 GrpcMethod::new(
1440 "nominal.nova.v1.NovaKeyValueService",
1441 "GetKeyValueEntry",
1442 ),
1443 );
1444 self.inner.unary(req, path, codec).await
1445 }
1446 pub async fn delete_key_value_entry(
1447 &mut self,
1448 request: impl tonic::IntoRequest<super::DeleteKeyValueEntryRequest>,
1449 ) -> std::result::Result<
1450 tonic::Response<super::DeleteKeyValueEntryResponse>,
1451 tonic::Status,
1452 > {
1453 self.inner
1454 .ready()
1455 .await
1456 .map_err(|e| {
1457 tonic::Status::unknown(
1458 format!("Service was not ready: {}", e.into()),
1459 )
1460 })?;
1461 let codec = tonic::codec::ProstCodec::default();
1462 let path = http::uri::PathAndQuery::from_static(
1463 "/nominal.nova.v1.NovaKeyValueService/DeleteKeyValueEntry",
1464 );
1465 let mut req = request.into_request();
1466 req.extensions_mut()
1467 .insert(
1468 GrpcMethod::new(
1469 "nominal.nova.v1.NovaKeyValueService",
1470 "DeleteKeyValueEntry",
1471 ),
1472 );
1473 self.inner.unary(req, path, codec).await
1474 }
1475 pub async fn batch_get_key_value_entries(
1476 &mut self,
1477 request: impl tonic::IntoRequest<super::BatchGetKeyValueEntriesRequest>,
1478 ) -> std::result::Result<
1479 tonic::Response<super::BatchGetKeyValueEntriesResponse>,
1480 tonic::Status,
1481 > {
1482 self.inner
1483 .ready()
1484 .await
1485 .map_err(|e| {
1486 tonic::Status::unknown(
1487 format!("Service was not ready: {}", e.into()),
1488 )
1489 })?;
1490 let codec = tonic::codec::ProstCodec::default();
1491 let path = http::uri::PathAndQuery::from_static(
1492 "/nominal.nova.v1.NovaKeyValueService/BatchGetKeyValueEntries",
1493 );
1494 let mut req = request.into_request();
1495 req.extensions_mut()
1496 .insert(
1497 GrpcMethod::new(
1498 "nominal.nova.v1.NovaKeyValueService",
1499 "BatchGetKeyValueEntries",
1500 ),
1501 );
1502 self.inner.unary(req, path, codec).await
1503 }
1504 pub async fn batch_create_key_value_entries(
1505 &mut self,
1506 request: impl tonic::IntoRequest<super::BatchCreateKeyValueEntriesRequest>,
1507 ) -> std::result::Result<
1508 tonic::Response<super::BatchCreateKeyValueEntriesResponse>,
1509 tonic::Status,
1510 > {
1511 self.inner
1512 .ready()
1513 .await
1514 .map_err(|e| {
1515 tonic::Status::unknown(
1516 format!("Service was not ready: {}", e.into()),
1517 )
1518 })?;
1519 let codec = tonic::codec::ProstCodec::default();
1520 let path = http::uri::PathAndQuery::from_static(
1521 "/nominal.nova.v1.NovaKeyValueService/BatchCreateKeyValueEntries",
1522 );
1523 let mut req = request.into_request();
1524 req.extensions_mut()
1525 .insert(
1526 GrpcMethod::new(
1527 "nominal.nova.v1.NovaKeyValueService",
1528 "BatchCreateKeyValueEntries",
1529 ),
1530 );
1531 self.inner.unary(req, path, codec).await
1532 }
1533 pub async fn batch_update_key_value_entries(
1534 &mut self,
1535 request: impl tonic::IntoRequest<super::BatchUpdateKeyValueEntriesRequest>,
1536 ) -> std::result::Result<
1537 tonic::Response<super::BatchUpdateKeyValueEntriesResponse>,
1538 tonic::Status,
1539 > {
1540 self.inner
1541 .ready()
1542 .await
1543 .map_err(|e| {
1544 tonic::Status::unknown(
1545 format!("Service was not ready: {}", e.into()),
1546 )
1547 })?;
1548 let codec = tonic::codec::ProstCodec::default();
1549 let path = http::uri::PathAndQuery::from_static(
1550 "/nominal.nova.v1.NovaKeyValueService/BatchUpdateKeyValueEntries",
1551 );
1552 let mut req = request.into_request();
1553 req.extensions_mut()
1554 .insert(
1555 GrpcMethod::new(
1556 "nominal.nova.v1.NovaKeyValueService",
1557 "BatchUpdateKeyValueEntries",
1558 ),
1559 );
1560 self.inner.unary(req, path, codec).await
1561 }
1562 pub async fn batch_delete_key_value_entries(
1563 &mut self,
1564 request: impl tonic::IntoRequest<super::BatchDeleteKeyValueEntriesRequest>,
1565 ) -> std::result::Result<
1566 tonic::Response<super::BatchDeleteKeyValueEntriesResponse>,
1567 tonic::Status,
1568 > {
1569 self.inner
1570 .ready()
1571 .await
1572 .map_err(|e| {
1573 tonic::Status::unknown(
1574 format!("Service was not ready: {}", e.into()),
1575 )
1576 })?;
1577 let codec = tonic::codec::ProstCodec::default();
1578 let path = http::uri::PathAndQuery::from_static(
1579 "/nominal.nova.v1.NovaKeyValueService/BatchDeleteKeyValueEntries",
1580 );
1581 let mut req = request.into_request();
1582 req.extensions_mut()
1583 .insert(
1584 GrpcMethod::new(
1585 "nominal.nova.v1.NovaKeyValueService",
1586 "BatchDeleteKeyValueEntries",
1587 ),
1588 );
1589 self.inner.unary(req, path, codec).await
1590 }
1591 pub async fn search_key_value_entries(
1592 &mut self,
1593 request: impl tonic::IntoRequest<super::SearchKeyValueEntriesRequest>,
1594 ) -> std::result::Result<
1595 tonic::Response<super::SearchKeyValueEntriesResponse>,
1596 tonic::Status,
1597 > {
1598 self.inner
1599 .ready()
1600 .await
1601 .map_err(|e| {
1602 tonic::Status::unknown(
1603 format!("Service was not ready: {}", e.into()),
1604 )
1605 })?;
1606 let codec = tonic::codec::ProstCodec::default();
1607 let path = http::uri::PathAndQuery::from_static(
1608 "/nominal.nova.v1.NovaKeyValueService/SearchKeyValueEntries",
1609 );
1610 let mut req = request.into_request();
1611 req.extensions_mut()
1612 .insert(
1613 GrpcMethod::new(
1614 "nominal.nova.v1.NovaKeyValueService",
1615 "SearchKeyValueEntries",
1616 ),
1617 );
1618 self.inner.unary(req, path, codec).await
1619 }
1620 }
1621}
1622#[derive(Clone, PartialEq, ::prost::Message)]
1623pub struct ProxyHeader {
1624 #[prost(string, tag = "1")]
1625 pub name: ::prost::alloc::string::String,
1626 #[prost(string, tag = "2")]
1627 pub value: ::prost::alloc::string::String,
1628}
1629#[derive(Clone, PartialEq, ::prost::Message)]
1630pub struct CallApiProxyRequest {
1631 #[prost(string, tag = "1")]
1632 pub app_rid: ::prost::alloc::string::String,
1633 #[prost(string, tag = "2")]
1634 pub api_proxy_rid: ::prost::alloc::string::String,
1635 #[prost(enumeration = "ProxyHttpMethod", tag = "3")]
1636 pub method: i32,
1637 #[prost(string, tag = "4")]
1638 pub path: ::prost::alloc::string::String,
1639 #[prost(string, tag = "5")]
1640 pub query: ::prost::alloc::string::String,
1641 #[prost(message, repeated, tag = "6")]
1642 pub headers: ::prost::alloc::vec::Vec<ProxyHeader>,
1643 #[prost(bytes = "vec", tag = "7")]
1644 pub body: ::prost::alloc::vec::Vec<u8>,
1645}
1646#[derive(Clone, PartialEq, ::prost::Message)]
1647pub struct CallApiProxyResponse {
1648 #[prost(int32, tag = "1")]
1649 pub status_code: i32,
1650 #[prost(message, repeated, tag = "2")]
1651 pub headers: ::prost::alloc::vec::Vec<ProxyHeader>,
1652 #[prost(bytes = "vec", tag = "3")]
1653 pub body: ::prost::alloc::vec::Vec<u8>,
1654}
1655#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1656#[repr(i32)]
1657pub enum ProxyHttpMethod {
1658 Unspecified = 0,
1659 Get = 1,
1660 Head = 2,
1661 Post = 3,
1662 Put = 4,
1663 Patch = 5,
1664 Delete = 6,
1665}
1666impl ProxyHttpMethod {
1667 pub fn as_str_name(&self) -> &'static str {
1672 match self {
1673 Self::Unspecified => "PROXY_HTTP_METHOD_UNSPECIFIED",
1674 Self::Get => "PROXY_HTTP_METHOD_GET",
1675 Self::Head => "PROXY_HTTP_METHOD_HEAD",
1676 Self::Post => "PROXY_HTTP_METHOD_POST",
1677 Self::Put => "PROXY_HTTP_METHOD_PUT",
1678 Self::Patch => "PROXY_HTTP_METHOD_PATCH",
1679 Self::Delete => "PROXY_HTTP_METHOD_DELETE",
1680 }
1681 }
1682 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1684 match value {
1685 "PROXY_HTTP_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
1686 "PROXY_HTTP_METHOD_GET" => Some(Self::Get),
1687 "PROXY_HTTP_METHOD_HEAD" => Some(Self::Head),
1688 "PROXY_HTTP_METHOD_POST" => Some(Self::Post),
1689 "PROXY_HTTP_METHOD_PUT" => Some(Self::Put),
1690 "PROXY_HTTP_METHOD_PATCH" => Some(Self::Patch),
1691 "PROXY_HTTP_METHOD_DELETE" => Some(Self::Delete),
1692 _ => None,
1693 }
1694 }
1695}
1696pub mod nova_proxy_service_client {
1698 #![allow(
1699 unused_variables,
1700 dead_code,
1701 missing_docs,
1702 clippy::wildcard_imports,
1703 clippy::let_unit_value,
1704 )]
1705 use tonic::codegen::*;
1706 use tonic::codegen::http::Uri;
1707 #[derive(Debug, Clone)]
1708 pub struct NovaProxyServiceClient<T> {
1709 inner: tonic::client::Grpc<T>,
1710 }
1711 impl NovaProxyServiceClient<tonic::transport::Channel> {
1712 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1714 where
1715 D: TryInto<tonic::transport::Endpoint>,
1716 D::Error: Into<StdError>,
1717 {
1718 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1719 Ok(Self::new(conn))
1720 }
1721 }
1722 impl<T> NovaProxyServiceClient<T>
1723 where
1724 T: tonic::client::GrpcService<tonic::body::Body>,
1725 T::Error: Into<StdError>,
1726 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1727 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1728 {
1729 pub fn new(inner: T) -> Self {
1730 let inner = tonic::client::Grpc::new(inner);
1731 Self { inner }
1732 }
1733 pub fn with_origin(inner: T, origin: Uri) -> Self {
1734 let inner = tonic::client::Grpc::with_origin(inner, origin);
1735 Self { inner }
1736 }
1737 pub fn with_interceptor<F>(
1738 inner: T,
1739 interceptor: F,
1740 ) -> NovaProxyServiceClient<InterceptedService<T, F>>
1741 where
1742 F: tonic::service::Interceptor,
1743 T::ResponseBody: Default,
1744 T: tonic::codegen::Service<
1745 http::Request<tonic::body::Body>,
1746 Response = http::Response<
1747 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1748 >,
1749 >,
1750 <T as tonic::codegen::Service<
1751 http::Request<tonic::body::Body>,
1752 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1753 {
1754 NovaProxyServiceClient::new(InterceptedService::new(inner, interceptor))
1755 }
1756 #[must_use]
1761 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1762 self.inner = self.inner.send_compressed(encoding);
1763 self
1764 }
1765 #[must_use]
1767 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1768 self.inner = self.inner.accept_compressed(encoding);
1769 self
1770 }
1771 #[must_use]
1775 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1776 self.inner = self.inner.max_decoding_message_size(limit);
1777 self
1778 }
1779 #[must_use]
1783 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1784 self.inner = self.inner.max_encoding_message_size(limit);
1785 self
1786 }
1787 pub async fn call_api_proxy(
1788 &mut self,
1789 request: impl tonic::IntoRequest<super::CallApiProxyRequest>,
1790 ) -> std::result::Result<
1791 tonic::Response<super::CallApiProxyResponse>,
1792 tonic::Status,
1793 > {
1794 self.inner
1795 .ready()
1796 .await
1797 .map_err(|e| {
1798 tonic::Status::unknown(
1799 format!("Service was not ready: {}", e.into()),
1800 )
1801 })?;
1802 let codec = tonic::codec::ProstCodec::default();
1803 let path = http::uri::PathAndQuery::from_static(
1804 "/nominal.nova.v1.NovaProxyService/CallApiProxy",
1805 );
1806 let mut req = request.into_request();
1807 req.extensions_mut()
1808 .insert(
1809 GrpcMethod::new("nominal.nova.v1.NovaProxyService", "CallApiProxy"),
1810 );
1811 self.inner.unary(req, path, codec).await
1812 }
1813 }
1814}