Skip to main content

nominal_api_proto/proto/
nominal.mesh.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct MeshFlag {
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}
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct MeshFlagRidSet {
13    #[prost(string, repeated, tag = "1")]
14    pub flag_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
15}
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct CreateMeshFlagRequest {
18    #[prost(message, optional, tag = "1")]
19    pub mesh_flag: ::core::option::Option<MeshFlag>,
20}
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct CreateMeshFlagResponse {
23    #[prost(message, optional, tag = "1")]
24    pub mesh_flag: ::core::option::Option<MeshFlag>,
25}
26/// Generated client implementations.
27pub mod mesh_flag_service_client {
28    #![allow(
29        unused_variables,
30        dead_code,
31        missing_docs,
32        clippy::wildcard_imports,
33        clippy::let_unit_value,
34    )]
35    use tonic::codegen::*;
36    use tonic::codegen::http::Uri;
37    #[derive(Debug, Clone)]
38    pub struct MeshFlagServiceClient<T> {
39        inner: tonic::client::Grpc<T>,
40    }
41    impl MeshFlagServiceClient<tonic::transport::Channel> {
42        /// Attempt to create a new client by connecting to a given endpoint.
43        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
44        where
45            D: TryInto<tonic::transport::Endpoint>,
46            D::Error: Into<StdError>,
47        {
48            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
49            Ok(Self::new(conn))
50        }
51    }
52    impl<T> MeshFlagServiceClient<T>
53    where
54        T: tonic::client::GrpcService<tonic::body::Body>,
55        T::Error: Into<StdError>,
56        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
57        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
58    {
59        pub fn new(inner: T) -> Self {
60            let inner = tonic::client::Grpc::new(inner);
61            Self { inner }
62        }
63        pub fn with_origin(inner: T, origin: Uri) -> Self {
64            let inner = tonic::client::Grpc::with_origin(inner, origin);
65            Self { inner }
66        }
67        pub fn with_interceptor<F>(
68            inner: T,
69            interceptor: F,
70        ) -> MeshFlagServiceClient<InterceptedService<T, F>>
71        where
72            F: tonic::service::Interceptor,
73            T::ResponseBody: Default,
74            T: tonic::codegen::Service<
75                http::Request<tonic::body::Body>,
76                Response = http::Response<
77                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
78                >,
79            >,
80            <T as tonic::codegen::Service<
81                http::Request<tonic::body::Body>,
82            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
83        {
84            MeshFlagServiceClient::new(InterceptedService::new(inner, interceptor))
85        }
86        /// Compress requests with the given encoding.
87        ///
88        /// This requires the server to support it otherwise it might respond with an
89        /// error.
90        #[must_use]
91        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
92            self.inner = self.inner.send_compressed(encoding);
93            self
94        }
95        /// Enable decompressing responses.
96        #[must_use]
97        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
98            self.inner = self.inner.accept_compressed(encoding);
99            self
100        }
101        /// Limits the maximum size of a decoded message.
102        ///
103        /// Default: `4MB`
104        #[must_use]
105        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
106            self.inner = self.inner.max_decoding_message_size(limit);
107            self
108        }
109        /// Limits the maximum size of an encoded message.
110        ///
111        /// Default: `usize::MAX`
112        #[must_use]
113        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
114            self.inner = self.inner.max_encoding_message_size(limit);
115            self
116        }
117        pub async fn create_mesh_flag(
118            &mut self,
119            request: impl tonic::IntoRequest<super::CreateMeshFlagRequest>,
120        ) -> std::result::Result<
121            tonic::Response<super::CreateMeshFlagResponse>,
122            tonic::Status,
123        > {
124            self.inner
125                .ready()
126                .await
127                .map_err(|e| {
128                    tonic::Status::unknown(
129                        format!("Service was not ready: {}", e.into()),
130                    )
131                })?;
132            let codec = tonic::codec::ProstCodec::default();
133            let path = http::uri::PathAndQuery::from_static(
134                "/nominal.mesh.v1.MeshFlagService/CreateMeshFlag",
135            );
136            let mut req = request.into_request();
137            req.extensions_mut()
138                .insert(
139                    GrpcMethod::new("nominal.mesh.v1.MeshFlagService", "CreateMeshFlag"),
140                );
141            self.inner.unary(req, path, codec).await
142        }
143    }
144}
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct MeshArtifact {
147    #[prost(string, tag = "1")]
148    pub artifact_rid: ::prost::alloc::string::String,
149    #[prost(string, repeated, tag = "2")]
150    pub flag_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
151}
152#[derive(Clone, PartialEq, ::prost::Message)]
153pub struct CreateMeshArtifactRequest {
154    #[prost(message, optional, tag = "1")]
155    pub mesh_artifact: ::core::option::Option<MeshArtifact>,
156}
157#[derive(Clone, PartialEq, ::prost::Message)]
158pub struct CreateMeshArtifactResponse {
159    #[prost(message, optional, tag = "1")]
160    pub mesh_artifact: ::core::option::Option<MeshArtifact>,
161}
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct UpdateMeshArtifactRequest {
164    #[prost(string, tag = "1")]
165    pub artifact_rid: ::prost::alloc::string::String,
166    #[prost(message, optional, tag = "2")]
167    pub flag_rids: ::core::option::Option<MeshFlagRidSet>,
168}
169#[derive(Clone, PartialEq, ::prost::Message)]
170pub struct UpdateMeshArtifactResponse {
171    #[prost(message, optional, tag = "1")]
172    pub mesh_artifact: ::core::option::Option<MeshArtifact>,
173}
174/// Generated client implementations.
175pub mod mesh_artifact_service_client {
176    #![allow(
177        unused_variables,
178        dead_code,
179        missing_docs,
180        clippy::wildcard_imports,
181        clippy::let_unit_value,
182    )]
183    use tonic::codegen::*;
184    use tonic::codegen::http::Uri;
185    #[derive(Debug, Clone)]
186    pub struct MeshArtifactServiceClient<T> {
187        inner: tonic::client::Grpc<T>,
188    }
189    impl MeshArtifactServiceClient<tonic::transport::Channel> {
190        /// Attempt to create a new client by connecting to a given endpoint.
191        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
192        where
193            D: TryInto<tonic::transport::Endpoint>,
194            D::Error: Into<StdError>,
195        {
196            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
197            Ok(Self::new(conn))
198        }
199    }
200    impl<T> MeshArtifactServiceClient<T>
201    where
202        T: tonic::client::GrpcService<tonic::body::Body>,
203        T::Error: Into<StdError>,
204        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
205        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
206    {
207        pub fn new(inner: T) -> Self {
208            let inner = tonic::client::Grpc::new(inner);
209            Self { inner }
210        }
211        pub fn with_origin(inner: T, origin: Uri) -> Self {
212            let inner = tonic::client::Grpc::with_origin(inner, origin);
213            Self { inner }
214        }
215        pub fn with_interceptor<F>(
216            inner: T,
217            interceptor: F,
218        ) -> MeshArtifactServiceClient<InterceptedService<T, F>>
219        where
220            F: tonic::service::Interceptor,
221            T::ResponseBody: Default,
222            T: tonic::codegen::Service<
223                http::Request<tonic::body::Body>,
224                Response = http::Response<
225                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
226                >,
227            >,
228            <T as tonic::codegen::Service<
229                http::Request<tonic::body::Body>,
230            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
231        {
232            MeshArtifactServiceClient::new(InterceptedService::new(inner, interceptor))
233        }
234        /// Compress requests with the given encoding.
235        ///
236        /// This requires the server to support it otherwise it might respond with an
237        /// error.
238        #[must_use]
239        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
240            self.inner = self.inner.send_compressed(encoding);
241            self
242        }
243        /// Enable decompressing responses.
244        #[must_use]
245        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
246            self.inner = self.inner.accept_compressed(encoding);
247            self
248        }
249        /// Limits the maximum size of a decoded message.
250        ///
251        /// Default: `4MB`
252        #[must_use]
253        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
254            self.inner = self.inner.max_decoding_message_size(limit);
255            self
256        }
257        /// Limits the maximum size of an encoded message.
258        ///
259        /// Default: `usize::MAX`
260        #[must_use]
261        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
262            self.inner = self.inner.max_encoding_message_size(limit);
263            self
264        }
265        pub async fn create_mesh_artifact(
266            &mut self,
267            request: impl tonic::IntoRequest<super::CreateMeshArtifactRequest>,
268        ) -> std::result::Result<
269            tonic::Response<super::CreateMeshArtifactResponse>,
270            tonic::Status,
271        > {
272            self.inner
273                .ready()
274                .await
275                .map_err(|e| {
276                    tonic::Status::unknown(
277                        format!("Service was not ready: {}", e.into()),
278                    )
279                })?;
280            let codec = tonic::codec::ProstCodec::default();
281            let path = http::uri::PathAndQuery::from_static(
282                "/nominal.mesh.v1.MeshArtifactService/CreateMeshArtifact",
283            );
284            let mut req = request.into_request();
285            req.extensions_mut()
286                .insert(
287                    GrpcMethod::new(
288                        "nominal.mesh.v1.MeshArtifactService",
289                        "CreateMeshArtifact",
290                    ),
291                );
292            self.inner.unary(req, path, codec).await
293        }
294        pub async fn update_mesh_artifact(
295            &mut self,
296            request: impl tonic::IntoRequest<super::UpdateMeshArtifactRequest>,
297        ) -> std::result::Result<
298            tonic::Response<super::UpdateMeshArtifactResponse>,
299            tonic::Status,
300        > {
301            self.inner
302                .ready()
303                .await
304                .map_err(|e| {
305                    tonic::Status::unknown(
306                        format!("Service was not ready: {}", e.into()),
307                    )
308                })?;
309            let codec = tonic::codec::ProstCodec::default();
310            let path = http::uri::PathAndQuery::from_static(
311                "/nominal.mesh.v1.MeshArtifactService/UpdateMeshArtifact",
312            );
313            let mut req = request.into_request();
314            req.extensions_mut()
315                .insert(
316                    GrpcMethod::new(
317                        "nominal.mesh.v1.MeshArtifactService",
318                        "UpdateMeshArtifact",
319                    ),
320                );
321            self.inner.unary(req, path, codec).await
322        }
323    }
324}
325#[derive(Clone, PartialEq, ::prost::Message)]
326pub struct RemoteConnection {
327    #[prost(string, tag = "1")]
328    pub rid: ::prost::alloc::string::String,
329    #[prost(string, tag = "2")]
330    pub name: ::prost::alloc::string::String,
331    #[prost(string, tag = "3")]
332    pub base_url: ::prost::alloc::string::String,
333    #[prost(string, tag = "4")]
334    pub secret_rid: ::prost::alloc::string::String,
335    #[prost(enumeration = "RemoteConnectionStatus", tag = "5")]
336    pub status: i32,
337    #[prost(message, optional, tag = "6")]
338    pub status_updated_at: ::core::option::Option<
339        super::super::super::google::protobuf::Timestamp,
340    >,
341    #[prost(string, repeated, tag = "7")]
342    pub flag_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
343}
344#[derive(Clone, PartialEq, ::prost::Message)]
345pub struct CreateRemoteConnectionRequest {
346    #[prost(string, tag = "1")]
347    pub name: ::prost::alloc::string::String,
348    #[prost(string, tag = "2")]
349    pub base_url: ::prost::alloc::string::String,
350    #[prost(string, tag = "3")]
351    pub secret_rid: ::prost::alloc::string::String,
352    #[prost(string, tag = "4")]
353    pub workspace_rid: ::prost::alloc::string::String,
354}
355#[derive(Clone, PartialEq, ::prost::Message)]
356pub struct CreateRemoteConnectionResponse {
357    #[prost(message, optional, tag = "1")]
358    pub remote_connection: ::core::option::Option<RemoteConnection>,
359}
360#[derive(Clone, PartialEq, ::prost::Message)]
361pub struct GetRemoteConnectionRequest {
362    #[prost(string, tag = "1")]
363    pub remote_connection_rid: ::prost::alloc::string::String,
364}
365#[derive(Clone, PartialEq, ::prost::Message)]
366pub struct GetRemoteConnectionResponse {
367    #[prost(message, optional, tag = "1")]
368    pub remote_connection: ::core::option::Option<RemoteConnection>,
369}
370#[derive(Clone, PartialEq, ::prost::Message)]
371pub struct UpdateRemoteConnectionRequest {
372    #[prost(string, tag = "1")]
373    pub remote_connection_rid: ::prost::alloc::string::String,
374    #[prost(string, optional, tag = "2")]
375    pub name: ::core::option::Option<::prost::alloc::string::String>,
376    #[prost(string, optional, tag = "3")]
377    pub base_url: ::core::option::Option<::prost::alloc::string::String>,
378    #[prost(string, optional, tag = "4")]
379    pub secret_rid: ::core::option::Option<::prost::alloc::string::String>,
380    #[prost(message, optional, tag = "5")]
381    pub flag_rids: ::core::option::Option<MeshFlagRidSet>,
382}
383#[derive(Clone, PartialEq, ::prost::Message)]
384pub struct UpdateRemoteConnectionResponse {
385    #[prost(message, optional, tag = "1")]
386    pub remote_connection: ::core::option::Option<RemoteConnection>,
387}
388#[derive(Clone, PartialEq, ::prost::Message)]
389pub struct DeleteRemoteConnectionRequest {
390    #[prost(string, tag = "1")]
391    pub remote_connection_rid: ::prost::alloc::string::String,
392}
393#[derive(Clone, Copy, PartialEq, ::prost::Message)]
394pub struct DeleteRemoteConnectionResponse {}
395#[derive(Clone, PartialEq, ::prost::Message)]
396pub struct ListRemoteConnectionsRequest {
397    #[prost(string, tag = "1")]
398    pub workspace_rid: ::prost::alloc::string::String,
399    #[prost(int32, tag = "2")]
400    pub page_size: i32,
401    #[prost(string, optional, tag = "3")]
402    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
403}
404#[derive(Clone, PartialEq, ::prost::Message)]
405pub struct ListRemoteConnectionsResponse {
406    #[prost(message, repeated, tag = "1")]
407    pub remote_connections: ::prost::alloc::vec::Vec<RemoteConnection>,
408    #[prost(string, optional, tag = "2")]
409    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
410}
411#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
412#[repr(i32)]
413pub enum RemoteConnectionStatus {
414    Unspecified = 0,
415    Online = 1,
416    Offline = 2,
417}
418impl RemoteConnectionStatus {
419    /// String value of the enum field names used in the ProtoBuf definition.
420    ///
421    /// The values are not transformed in any way and thus are considered stable
422    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
423    pub fn as_str_name(&self) -> &'static str {
424        match self {
425            Self::Unspecified => "REMOTE_CONNECTION_STATUS_UNSPECIFIED",
426            Self::Online => "REMOTE_CONNECTION_STATUS_ONLINE",
427            Self::Offline => "REMOTE_CONNECTION_STATUS_OFFLINE",
428        }
429    }
430    /// Creates an enum from field names used in the ProtoBuf definition.
431    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
432        match value {
433            "REMOTE_CONNECTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
434            "REMOTE_CONNECTION_STATUS_ONLINE" => Some(Self::Online),
435            "REMOTE_CONNECTION_STATUS_OFFLINE" => Some(Self::Offline),
436            _ => None,
437        }
438    }
439}
440#[derive(Clone, PartialEq, ::prost::Message)]
441pub struct Link {
442    #[prost(string, tag = "1")]
443    pub rid: ::prost::alloc::string::String,
444    #[prost(string, tag = "2")]
445    pub local_resource_rid: ::prost::alloc::string::String,
446    #[prost(string, tag = "3")]
447    pub remote_resource_rid: ::prost::alloc::string::String,
448    #[prost(string, tag = "4")]
449    pub remote_connection_rid: ::prost::alloc::string::String,
450    #[prost(bool, tag = "5")]
451    pub enabled: bool,
452    #[prost(enumeration = "ResourceType", tag = "6")]
453    pub resource_type: i32,
454}
455#[derive(Clone, PartialEq, ::prost::Message)]
456pub struct CreateLinkRequest {
457    #[prost(string, tag = "1")]
458    pub local_resource_rid: ::prost::alloc::string::String,
459    #[prost(string, tag = "2")]
460    pub remote_resource_rid: ::prost::alloc::string::String,
461    #[prost(string, tag = "3")]
462    pub remote_connection_rid: ::prost::alloc::string::String,
463    #[prost(bool, tag = "4")]
464    pub enabled: bool,
465    #[prost(enumeration = "ResourceType", tag = "5")]
466    pub resource_type: i32,
467    #[prost(string, tag = "6")]
468    pub workspace_rid: ::prost::alloc::string::String,
469}
470#[derive(Clone, Copy, PartialEq, ::prost::Message)]
471pub struct CreateLinkResponse {}
472#[derive(Clone, PartialEq, ::prost::Message)]
473pub struct GetLinkRequest {
474    #[prost(string, tag = "1")]
475    pub link_rid: ::prost::alloc::string::String,
476}
477#[derive(Clone, PartialEq, ::prost::Message)]
478pub struct GetLinkResponse {
479    #[prost(message, optional, tag = "1")]
480    pub link: ::core::option::Option<Link>,
481}
482#[derive(Clone, PartialEq, ::prost::Message)]
483pub struct UpdateLinkRequest {
484    #[prost(string, tag = "1")]
485    pub link_rid: ::prost::alloc::string::String,
486    #[prost(string, optional, tag = "2")]
487    pub remote_connection_rid: ::core::option::Option<::prost::alloc::string::String>,
488    #[prost(bool, optional, tag = "3")]
489    pub enabled: ::core::option::Option<bool>,
490    #[prost(string, optional, tag = "4")]
491    pub remote_resource_rid: ::core::option::Option<::prost::alloc::string::String>,
492}
493#[derive(Clone, PartialEq, ::prost::Message)]
494pub struct UpdateLinkResponse {
495    #[prost(message, optional, tag = "1")]
496    pub link: ::core::option::Option<Link>,
497}
498#[derive(Clone, PartialEq, ::prost::Message)]
499pub struct DeleteLinkRequest {
500    #[prost(string, tag = "1")]
501    pub link_rid: ::prost::alloc::string::String,
502}
503#[derive(Clone, Copy, PartialEq, ::prost::Message)]
504pub struct DeleteLinkResponse {}
505#[derive(Clone, PartialEq, ::prost::Message)]
506pub struct SearchLinksRequest {
507    #[prost(string, tag = "1")]
508    pub workspace_rid: ::prost::alloc::string::String,
509    #[prost(int32, tag = "2")]
510    pub page_size: i32,
511    #[prost(bool, optional, tag = "3")]
512    pub enabled: ::core::option::Option<bool>,
513    #[prost(enumeration = "ResourceType", optional, tag = "4")]
514    pub resource_type: ::core::option::Option<i32>,
515    #[prost(string, optional, tag = "5")]
516    pub local_resource_rid: ::core::option::Option<::prost::alloc::string::String>,
517    #[prost(string, optional, tag = "6")]
518    pub remote_connection_rid: ::core::option::Option<::prost::alloc::string::String>,
519    #[prost(string, optional, tag = "7")]
520    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
521}
522#[derive(Clone, PartialEq, ::prost::Message)]
523pub struct SearchLinksResponse {
524    #[prost(message, repeated, tag = "1")]
525    pub links: ::prost::alloc::vec::Vec<Link>,
526    #[prost(string, optional, tag = "2")]
527    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
528}
529#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
530#[repr(i32)]
531pub enum ResourceType {
532    Unspecified = 0,
533    Dataset = 1,
534}
535impl ResourceType {
536    /// String value of the enum field names used in the ProtoBuf definition.
537    ///
538    /// The values are not transformed in any way and thus are considered stable
539    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
540    pub fn as_str_name(&self) -> &'static str {
541        match self {
542            Self::Unspecified => "RESOURCE_TYPE_UNSPECIFIED",
543            Self::Dataset => "RESOURCE_TYPE_DATASET",
544        }
545    }
546    /// Creates an enum from field names used in the ProtoBuf definition.
547    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
548        match value {
549            "RESOURCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
550            "RESOURCE_TYPE_DATASET" => Some(Self::Dataset),
551            _ => None,
552        }
553    }
554}
555#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
556#[repr(i32)]
557pub enum MeshServiceError {
558    LinkNotFound = 0,
559    LinkAlreadyExists = 1,
560    RemoteConnectionNotFound = 2,
561    RemoteConnectionAlreadyExists = 3,
562    RemoteConnectionHasDependentLinks = 4,
563    InvalidApiToken = 5,
564    FlagAlreadyExists = 6,
565    FlagNotFound = 7,
566    ArtifactNotFound = 8,
567    UnsupportedArtifactType = 9,
568}
569impl MeshServiceError {
570    /// String value of the enum field names used in the ProtoBuf definition.
571    ///
572    /// The values are not transformed in any way and thus are considered stable
573    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
574    pub fn as_str_name(&self) -> &'static str {
575        match self {
576            Self::LinkNotFound => "MESH_SERVICE_ERROR_LINK_NOT_FOUND",
577            Self::LinkAlreadyExists => "MESH_SERVICE_ERROR_LINK_ALREADY_EXISTS",
578            Self::RemoteConnectionNotFound => {
579                "MESH_SERVICE_ERROR_REMOTE_CONNECTION_NOT_FOUND"
580            }
581            Self::RemoteConnectionAlreadyExists => {
582                "MESH_SERVICE_ERROR_REMOTE_CONNECTION_ALREADY_EXISTS"
583            }
584            Self::RemoteConnectionHasDependentLinks => {
585                "MESH_SERVICE_ERROR_REMOTE_CONNECTION_HAS_DEPENDENT_LINKS"
586            }
587            Self::InvalidApiToken => "MESH_SERVICE_ERROR_INVALID_API_TOKEN",
588            Self::FlagAlreadyExists => "MESH_SERVICE_ERROR_FLAG_ALREADY_EXISTS",
589            Self::FlagNotFound => "MESH_SERVICE_ERROR_FLAG_NOT_FOUND",
590            Self::ArtifactNotFound => "MESH_SERVICE_ERROR_ARTIFACT_NOT_FOUND",
591            Self::UnsupportedArtifactType => {
592                "MESH_SERVICE_ERROR_UNSUPPORTED_ARTIFACT_TYPE"
593            }
594        }
595    }
596    /// Creates an enum from field names used in the ProtoBuf definition.
597    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
598        match value {
599            "MESH_SERVICE_ERROR_LINK_NOT_FOUND" => Some(Self::LinkNotFound),
600            "MESH_SERVICE_ERROR_LINK_ALREADY_EXISTS" => Some(Self::LinkAlreadyExists),
601            "MESH_SERVICE_ERROR_REMOTE_CONNECTION_NOT_FOUND" => {
602                Some(Self::RemoteConnectionNotFound)
603            }
604            "MESH_SERVICE_ERROR_REMOTE_CONNECTION_ALREADY_EXISTS" => {
605                Some(Self::RemoteConnectionAlreadyExists)
606            }
607            "MESH_SERVICE_ERROR_REMOTE_CONNECTION_HAS_DEPENDENT_LINKS" => {
608                Some(Self::RemoteConnectionHasDependentLinks)
609            }
610            "MESH_SERVICE_ERROR_INVALID_API_TOKEN" => Some(Self::InvalidApiToken),
611            "MESH_SERVICE_ERROR_FLAG_ALREADY_EXISTS" => Some(Self::FlagAlreadyExists),
612            "MESH_SERVICE_ERROR_FLAG_NOT_FOUND" => Some(Self::FlagNotFound),
613            "MESH_SERVICE_ERROR_ARTIFACT_NOT_FOUND" => Some(Self::ArtifactNotFound),
614            "MESH_SERVICE_ERROR_UNSUPPORTED_ARTIFACT_TYPE" => {
615                Some(Self::UnsupportedArtifactType)
616            }
617            _ => None,
618        }
619    }
620}
621#[derive(Clone, PartialEq, ::prost::Message)]
622pub struct MeshRequest {
623    #[prost(oneof = "mesh_request::Request", tags = "1, 2")]
624    pub request: ::core::option::Option<mesh_request::Request>,
625}
626/// Nested message and enum types in `MeshRequest`.
627pub mod mesh_request {
628    #[derive(Clone, PartialEq, ::prost::Oneof)]
629    pub enum Request {
630        #[prost(message, tag = "1")]
631        DataStream(super::DataStreamRequest),
632        #[prost(message, tag = "2")]
633        FileIngest(super::FileIngestRequest),
634    }
635}
636#[derive(Clone, Copy, PartialEq, ::prost::Message)]
637pub struct MeshResponse {}
638#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct DataStreamRequest {
640    #[prost(message, repeated, tag = "1")]
641    pub write_batches_request: ::prost::alloc::vec::Vec<
642        super::super::direct_channel_writer::v2::InternalWriteBatchesRequest,
643    >,
644}
645#[derive(Clone, PartialEq, ::prost::Message)]
646pub struct FileIngestRequest {
647    #[prost(bytes = "vec", tag = "1")]
648    pub ingest_request: ::prost::alloc::vec::Vec<u8>,
649}
650#[derive(Clone, Copy, PartialEq, ::prost::Message)]
651pub struct HealthCheckRequest {}
652#[derive(Clone, Copy, PartialEq, ::prost::Message)]
653pub struct HealthCheckResponse {}
654/// Generated client implementations.
655pub mod mesh_service_client {
656    #![allow(
657        unused_variables,
658        dead_code,
659        missing_docs,
660        clippy::wildcard_imports,
661        clippy::let_unit_value,
662    )]
663    use tonic::codegen::*;
664    use tonic::codegen::http::Uri;
665    #[derive(Debug, Clone)]
666    pub struct MeshServiceClient<T> {
667        inner: tonic::client::Grpc<T>,
668    }
669    impl MeshServiceClient<tonic::transport::Channel> {
670        /// Attempt to create a new client by connecting to a given endpoint.
671        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
672        where
673            D: TryInto<tonic::transport::Endpoint>,
674            D::Error: Into<StdError>,
675        {
676            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
677            Ok(Self::new(conn))
678        }
679    }
680    impl<T> MeshServiceClient<T>
681    where
682        T: tonic::client::GrpcService<tonic::body::Body>,
683        T::Error: Into<StdError>,
684        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
685        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
686    {
687        pub fn new(inner: T) -> Self {
688            let inner = tonic::client::Grpc::new(inner);
689            Self { inner }
690        }
691        pub fn with_origin(inner: T, origin: Uri) -> Self {
692            let inner = tonic::client::Grpc::with_origin(inner, origin);
693            Self { inner }
694        }
695        pub fn with_interceptor<F>(
696            inner: T,
697            interceptor: F,
698        ) -> MeshServiceClient<InterceptedService<T, F>>
699        where
700            F: tonic::service::Interceptor,
701            T::ResponseBody: Default,
702            T: tonic::codegen::Service<
703                http::Request<tonic::body::Body>,
704                Response = http::Response<
705                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
706                >,
707            >,
708            <T as tonic::codegen::Service<
709                http::Request<tonic::body::Body>,
710            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
711        {
712            MeshServiceClient::new(InterceptedService::new(inner, interceptor))
713        }
714        /// Compress requests with the given encoding.
715        ///
716        /// This requires the server to support it otherwise it might respond with an
717        /// error.
718        #[must_use]
719        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
720            self.inner = self.inner.send_compressed(encoding);
721            self
722        }
723        /// Enable decompressing responses.
724        #[must_use]
725        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
726            self.inner = self.inner.accept_compressed(encoding);
727            self
728        }
729        /// Limits the maximum size of a decoded message.
730        ///
731        /// Default: `4MB`
732        #[must_use]
733        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
734            self.inner = self.inner.max_decoding_message_size(limit);
735            self
736        }
737        /// Limits the maximum size of an encoded message.
738        ///
739        /// Default: `usize::MAX`
740        #[must_use]
741        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
742            self.inner = self.inner.max_encoding_message_size(limit);
743            self
744        }
745        pub async fn mesh(
746            &mut self,
747            request: impl tonic::IntoRequest<super::MeshRequest>,
748        ) -> std::result::Result<tonic::Response<super::MeshResponse>, 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.mesh.v1.MeshService/Mesh",
760            );
761            let mut req = request.into_request();
762            req.extensions_mut()
763                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "Mesh"));
764            self.inner.unary(req, path, codec).await
765        }
766        pub async fn health_check(
767            &mut self,
768            request: impl tonic::IntoRequest<super::HealthCheckRequest>,
769        ) -> std::result::Result<
770            tonic::Response<super::HealthCheckResponse>,
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.mesh.v1.MeshService/HealthCheck",
784            );
785            let mut req = request.into_request();
786            req.extensions_mut()
787                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "HealthCheck"));
788            self.inner.unary(req, path, codec).await
789        }
790        pub async fn create_link(
791            &mut self,
792            request: impl tonic::IntoRequest<super::CreateLinkRequest>,
793        ) -> std::result::Result<
794            tonic::Response<super::CreateLinkResponse>,
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.mesh.v1.MeshService/CreateLink",
808            );
809            let mut req = request.into_request();
810            req.extensions_mut()
811                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "CreateLink"));
812            self.inner.unary(req, path, codec).await
813        }
814        pub async fn get_link(
815            &mut self,
816            request: impl tonic::IntoRequest<super::GetLinkRequest>,
817        ) -> std::result::Result<
818            tonic::Response<super::GetLinkResponse>,
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.mesh.v1.MeshService/GetLink",
832            );
833            let mut req = request.into_request();
834            req.extensions_mut()
835                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "GetLink"));
836            self.inner.unary(req, path, codec).await
837        }
838        pub async fn update_link(
839            &mut self,
840            request: impl tonic::IntoRequest<super::UpdateLinkRequest>,
841        ) -> std::result::Result<
842            tonic::Response<super::UpdateLinkResponse>,
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.mesh.v1.MeshService/UpdateLink",
856            );
857            let mut req = request.into_request();
858            req.extensions_mut()
859                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "UpdateLink"));
860            self.inner.unary(req, path, codec).await
861        }
862        pub async fn delete_link(
863            &mut self,
864            request: impl tonic::IntoRequest<super::DeleteLinkRequest>,
865        ) -> std::result::Result<
866            tonic::Response<super::DeleteLinkResponse>,
867            tonic::Status,
868        > {
869            self.inner
870                .ready()
871                .await
872                .map_err(|e| {
873                    tonic::Status::unknown(
874                        format!("Service was not ready: {}", e.into()),
875                    )
876                })?;
877            let codec = tonic::codec::ProstCodec::default();
878            let path = http::uri::PathAndQuery::from_static(
879                "/nominal.mesh.v1.MeshService/DeleteLink",
880            );
881            let mut req = request.into_request();
882            req.extensions_mut()
883                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "DeleteLink"));
884            self.inner.unary(req, path, codec).await
885        }
886        pub async fn search_links(
887            &mut self,
888            request: impl tonic::IntoRequest<super::SearchLinksRequest>,
889        ) -> std::result::Result<
890            tonic::Response<super::SearchLinksResponse>,
891            tonic::Status,
892        > {
893            self.inner
894                .ready()
895                .await
896                .map_err(|e| {
897                    tonic::Status::unknown(
898                        format!("Service was not ready: {}", e.into()),
899                    )
900                })?;
901            let codec = tonic::codec::ProstCodec::default();
902            let path = http::uri::PathAndQuery::from_static(
903                "/nominal.mesh.v1.MeshService/SearchLinks",
904            );
905            let mut req = request.into_request();
906            req.extensions_mut()
907                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "SearchLinks"));
908            self.inner.unary(req, path, codec).await
909        }
910        pub async fn create_remote_connection(
911            &mut self,
912            request: impl tonic::IntoRequest<super::CreateRemoteConnectionRequest>,
913        ) -> std::result::Result<
914            tonic::Response<super::CreateRemoteConnectionResponse>,
915            tonic::Status,
916        > {
917            self.inner
918                .ready()
919                .await
920                .map_err(|e| {
921                    tonic::Status::unknown(
922                        format!("Service was not ready: {}", e.into()),
923                    )
924                })?;
925            let codec = tonic::codec::ProstCodec::default();
926            let path = http::uri::PathAndQuery::from_static(
927                "/nominal.mesh.v1.MeshService/CreateRemoteConnection",
928            );
929            let mut req = request.into_request();
930            req.extensions_mut()
931                .insert(
932                    GrpcMethod::new(
933                        "nominal.mesh.v1.MeshService",
934                        "CreateRemoteConnection",
935                    ),
936                );
937            self.inner.unary(req, path, codec).await
938        }
939        pub async fn get_remote_connection(
940            &mut self,
941            request: impl tonic::IntoRequest<super::GetRemoteConnectionRequest>,
942        ) -> std::result::Result<
943            tonic::Response<super::GetRemoteConnectionResponse>,
944            tonic::Status,
945        > {
946            self.inner
947                .ready()
948                .await
949                .map_err(|e| {
950                    tonic::Status::unknown(
951                        format!("Service was not ready: {}", e.into()),
952                    )
953                })?;
954            let codec = tonic::codec::ProstCodec::default();
955            let path = http::uri::PathAndQuery::from_static(
956                "/nominal.mesh.v1.MeshService/GetRemoteConnection",
957            );
958            let mut req = request.into_request();
959            req.extensions_mut()
960                .insert(
961                    GrpcMethod::new("nominal.mesh.v1.MeshService", "GetRemoteConnection"),
962                );
963            self.inner.unary(req, path, codec).await
964        }
965        pub async fn update_remote_connection(
966            &mut self,
967            request: impl tonic::IntoRequest<super::UpdateRemoteConnectionRequest>,
968        ) -> std::result::Result<
969            tonic::Response<super::UpdateRemoteConnectionResponse>,
970            tonic::Status,
971        > {
972            self.inner
973                .ready()
974                .await
975                .map_err(|e| {
976                    tonic::Status::unknown(
977                        format!("Service was not ready: {}", e.into()),
978                    )
979                })?;
980            let codec = tonic::codec::ProstCodec::default();
981            let path = http::uri::PathAndQuery::from_static(
982                "/nominal.mesh.v1.MeshService/UpdateRemoteConnection",
983            );
984            let mut req = request.into_request();
985            req.extensions_mut()
986                .insert(
987                    GrpcMethod::new(
988                        "nominal.mesh.v1.MeshService",
989                        "UpdateRemoteConnection",
990                    ),
991                );
992            self.inner.unary(req, path, codec).await
993        }
994        pub async fn delete_remote_connection(
995            &mut self,
996            request: impl tonic::IntoRequest<super::DeleteRemoteConnectionRequest>,
997        ) -> std::result::Result<
998            tonic::Response<super::DeleteRemoteConnectionResponse>,
999            tonic::Status,
1000        > {
1001            self.inner
1002                .ready()
1003                .await
1004                .map_err(|e| {
1005                    tonic::Status::unknown(
1006                        format!("Service was not ready: {}", e.into()),
1007                    )
1008                })?;
1009            let codec = tonic::codec::ProstCodec::default();
1010            let path = http::uri::PathAndQuery::from_static(
1011                "/nominal.mesh.v1.MeshService/DeleteRemoteConnection",
1012            );
1013            let mut req = request.into_request();
1014            req.extensions_mut()
1015                .insert(
1016                    GrpcMethod::new(
1017                        "nominal.mesh.v1.MeshService",
1018                        "DeleteRemoteConnection",
1019                    ),
1020                );
1021            self.inner.unary(req, path, codec).await
1022        }
1023        pub async fn list_remote_connections(
1024            &mut self,
1025            request: impl tonic::IntoRequest<super::ListRemoteConnectionsRequest>,
1026        ) -> std::result::Result<
1027            tonic::Response<super::ListRemoteConnectionsResponse>,
1028            tonic::Status,
1029        > {
1030            self.inner
1031                .ready()
1032                .await
1033                .map_err(|e| {
1034                    tonic::Status::unknown(
1035                        format!("Service was not ready: {}", e.into()),
1036                    )
1037                })?;
1038            let codec = tonic::codec::ProstCodec::default();
1039            let path = http::uri::PathAndQuery::from_static(
1040                "/nominal.mesh.v1.MeshService/ListRemoteConnections",
1041            );
1042            let mut req = request.into_request();
1043            req.extensions_mut()
1044                .insert(
1045                    GrpcMethod::new(
1046                        "nominal.mesh.v1.MeshService",
1047                        "ListRemoteConnections",
1048                    ),
1049                );
1050            self.inner.unary(req, path, codec).await
1051        }
1052    }
1053}