Skip to main content

nominal_api/proto/
nominal.mesh.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Link {
4    /// Unique identifier for this link.
5    #[prost(string, tag = "1")]
6    pub rid: ::prost::alloc::string::String,
7    /// RID of the local resource.
8    #[prost(string, tag = "2")]
9    pub local_resource_rid: ::prost::alloc::string::String,
10    /// RID of the remote resource.
11    #[prost(string, tag = "3")]
12    pub remote_resource_rid: ::prost::alloc::string::String,
13    /// The remote connection to use for this link.
14    #[prost(string, tag = "4")]
15    pub remote_connection_rid: ::prost::alloc::string::String,
16    /// Whether or not the link should be enabled.
17    #[prost(bool, tag = "5")]
18    pub enabled: bool,
19    /// The type of resource this link is for.
20    #[prost(enumeration = "ResourceType", tag = "6")]
21    pub resource_type: i32,
22}
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct CreateLinkRequest {
25    /// RID of the local resource.
26    #[prost(string, tag = "1")]
27    pub local_resource_rid: ::prost::alloc::string::String,
28    /// RID of the remote resource.
29    #[prost(string, tag = "2")]
30    pub remote_resource_rid: ::prost::alloc::string::String,
31    /// The remote connection to use for this link.
32    #[prost(string, tag = "3")]
33    pub remote_connection_rid: ::prost::alloc::string::String,
34    /// Whether or not the link should be enabled.
35    #[prost(bool, tag = "4")]
36    pub enabled: bool,
37    /// The type of resource this link is for.
38    #[prost(enumeration = "ResourceType", tag = "5")]
39    pub resource_type: i32,
40    /// The workspace to register the link in. The source must belong to this workspace.
41    #[prost(string, tag = "6")]
42    pub workspace_rid: ::prost::alloc::string::String,
43}
44#[derive(Clone, Copy, PartialEq, ::prost::Message)]
45pub struct CreateLinkResponse {}
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct GetLinkRequest {
48    #[prost(string, tag = "1")]
49    pub link_rid: ::prost::alloc::string::String,
50}
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct GetLinkResponse {
53    #[prost(message, optional, tag = "1")]
54    pub link: ::core::option::Option<Link>,
55}
56#[derive(Clone, PartialEq, ::prost::Message)]
57pub struct UpdateLinkRequest {
58    /// Used to identify the link.
59    #[prost(string, tag = "1")]
60    pub link_rid: ::prost::alloc::string::String,
61    /// Optional fields to update.
62    #[prost(string, optional, tag = "2")]
63    pub remote_connection_rid: ::core::option::Option<::prost::alloc::string::String>,
64    #[prost(bool, optional, tag = "3")]
65    pub enabled: ::core::option::Option<bool>,
66}
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct UpdateLinkResponse {
69    #[prost(message, optional, tag = "1")]
70    pub link: ::core::option::Option<Link>,
71}
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct DeleteLinkRequest {
74    #[prost(string, tag = "1")]
75    pub link_rid: ::prost::alloc::string::String,
76}
77#[derive(Clone, Copy, PartialEq, ::prost::Message)]
78pub struct DeleteLinkResponse {}
79#[derive(Clone, PartialEq, ::prost::Message)]
80pub struct SearchLinksRequest {
81    #[prost(string, tag = "1")]
82    pub workspace_rid: ::prost::alloc::string::String,
83    #[prost(int32, tag = "2")]
84    pub page_size: i32,
85    #[prost(bool, optional, tag = "3")]
86    pub enabled: ::core::option::Option<bool>,
87    #[prost(enumeration = "ResourceType", optional, tag = "4")]
88    pub resource_type: ::core::option::Option<i32>,
89    #[prost(string, optional, tag = "5")]
90    pub local_resource_rid: ::core::option::Option<::prost::alloc::string::String>,
91    #[prost(string, optional, tag = "6")]
92    pub remote_connection_rid: ::core::option::Option<::prost::alloc::string::String>,
93    #[prost(string, optional, tag = "7")]
94    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
95}
96#[derive(Clone, PartialEq, ::prost::Message)]
97pub struct SearchLinksResponse {
98    #[prost(message, repeated, tag = "1")]
99    pub links: ::prost::alloc::vec::Vec<Link>,
100    #[prost(string, optional, tag = "2")]
101    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
102}
103#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
104#[repr(i32)]
105pub enum ResourceType {
106    Unspecified = 0,
107    Dataset = 1,
108}
109impl ResourceType {
110    /// String value of the enum field names used in the ProtoBuf definition.
111    ///
112    /// The values are not transformed in any way and thus are considered stable
113    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
114    pub fn as_str_name(&self) -> &'static str {
115        match self {
116            Self::Unspecified => "RESOURCE_TYPE_UNSPECIFIED",
117            Self::Dataset => "RESOURCE_TYPE_DATASET",
118        }
119    }
120    /// Creates an enum from field names used in the ProtoBuf definition.
121    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
122        match value {
123            "RESOURCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
124            "RESOURCE_TYPE_DATASET" => Some(Self::Dataset),
125            _ => None,
126        }
127    }
128}
129/// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
130#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
131#[repr(i32)]
132pub enum MeshServiceError {
133    LinkNotFound = 0,
134    LinkAlreadyExists = 1,
135    RemoteConnectionNotFound = 2,
136    RemoteConnectionAlreadyExists = 3,
137    RemoteConnectionHasDependentLinks = 4,
138}
139impl MeshServiceError {
140    /// String value of the enum field names used in the ProtoBuf definition.
141    ///
142    /// The values are not transformed in any way and thus are considered stable
143    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
144    pub fn as_str_name(&self) -> &'static str {
145        match self {
146            Self::LinkNotFound => "MESH_SERVICE_ERROR_LINK_NOT_FOUND",
147            Self::LinkAlreadyExists => "MESH_SERVICE_ERROR_LINK_ALREADY_EXISTS",
148            Self::RemoteConnectionNotFound => {
149                "MESH_SERVICE_ERROR_REMOTE_CONNECTION_NOT_FOUND"
150            }
151            Self::RemoteConnectionAlreadyExists => {
152                "MESH_SERVICE_ERROR_REMOTE_CONNECTION_ALREADY_EXISTS"
153            }
154            Self::RemoteConnectionHasDependentLinks => {
155                "MESH_SERVICE_ERROR_REMOTE_CONNECTION_HAS_DEPENDENT_LINKS"
156            }
157        }
158    }
159    /// Creates an enum from field names used in the ProtoBuf definition.
160    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
161        match value {
162            "MESH_SERVICE_ERROR_LINK_NOT_FOUND" => Some(Self::LinkNotFound),
163            "MESH_SERVICE_ERROR_LINK_ALREADY_EXISTS" => Some(Self::LinkAlreadyExists),
164            "MESH_SERVICE_ERROR_REMOTE_CONNECTION_NOT_FOUND" => {
165                Some(Self::RemoteConnectionNotFound)
166            }
167            "MESH_SERVICE_ERROR_REMOTE_CONNECTION_ALREADY_EXISTS" => {
168                Some(Self::RemoteConnectionAlreadyExists)
169            }
170            "MESH_SERVICE_ERROR_REMOTE_CONNECTION_HAS_DEPENDENT_LINKS" => {
171                Some(Self::RemoteConnectionHasDependentLinks)
172            }
173            _ => None,
174        }
175    }
176}
177#[derive(Clone, PartialEq, ::prost::Message)]
178pub struct RemoteConnection {
179    /// Unique identifier for this remote connection.
180    #[prost(string, tag = "1")]
181    pub rid: ::prost::alloc::string::String,
182    /// Human readable name for this remote connection.
183    #[prost(string, tag = "2")]
184    pub name: ::prost::alloc::string::String,
185    /// Base URL for the remote environment.
186    #[prost(string, tag = "3")]
187    pub base_url: ::prost::alloc::string::String,
188    /// Secret to be used to authenticate with the remote environment.
189    #[prost(string, tag = "4")]
190    pub secret_rid: ::prost::alloc::string::String,
191}
192#[derive(Clone, PartialEq, ::prost::Message)]
193pub struct CreateRemoteConnectionRequest {
194    #[prost(string, tag = "1")]
195    pub name: ::prost::alloc::string::String,
196    #[prost(string, tag = "2")]
197    pub base_url: ::prost::alloc::string::String,
198    #[prost(string, tag = "3")]
199    pub secret_rid: ::prost::alloc::string::String,
200    /// The workspace to register the remote connection in.
201    #[prost(string, tag = "4")]
202    pub workspace_rid: ::prost::alloc::string::String,
203}
204#[derive(Clone, PartialEq, ::prost::Message)]
205pub struct CreateRemoteConnectionResponse {
206    #[prost(message, optional, tag = "1")]
207    pub remote_connection: ::core::option::Option<RemoteConnection>,
208}
209#[derive(Clone, PartialEq, ::prost::Message)]
210pub struct GetRemoteConnectionRequest {
211    #[prost(string, tag = "1")]
212    pub remote_connection_rid: ::prost::alloc::string::String,
213}
214#[derive(Clone, PartialEq, ::prost::Message)]
215pub struct GetRemoteConnectionResponse {
216    #[prost(message, optional, tag = "1")]
217    pub remote_connection: ::core::option::Option<RemoteConnection>,
218}
219#[derive(Clone, PartialEq, ::prost::Message)]
220pub struct UpdateRemoteConnectionRequest {
221    #[prost(string, tag = "1")]
222    pub remote_connection_rid: ::prost::alloc::string::String,
223    #[prost(string, optional, tag = "2")]
224    pub name: ::core::option::Option<::prost::alloc::string::String>,
225    #[prost(string, optional, tag = "3")]
226    pub base_url: ::core::option::Option<::prost::alloc::string::String>,
227    #[prost(string, optional, tag = "4")]
228    pub secret_rid: ::core::option::Option<::prost::alloc::string::String>,
229}
230#[derive(Clone, PartialEq, ::prost::Message)]
231pub struct UpdateRemoteConnectionResponse {
232    #[prost(message, optional, tag = "1")]
233    pub remote_connection: ::core::option::Option<RemoteConnection>,
234}
235#[derive(Clone, PartialEq, ::prost::Message)]
236pub struct DeleteRemoteConnectionRequest {
237    #[prost(string, tag = "1")]
238    pub remote_connection_rid: ::prost::alloc::string::String,
239}
240#[derive(Clone, Copy, PartialEq, ::prost::Message)]
241pub struct DeleteRemoteConnectionResponse {}
242#[derive(Clone, PartialEq, ::prost::Message)]
243pub struct ListRemoteConnectionsRequest {
244    /// The workspace to list remote connections for.
245    #[prost(string, tag = "1")]
246    pub workspace_rid: ::prost::alloc::string::String,
247    /// Maximum number of remote connections to return per page.
248    #[prost(int32, tag = "2")]
249    pub page_size: i32,
250    /// Token for pagination. If empty, returns the first page.
251    #[prost(string, optional, tag = "3")]
252    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
253}
254#[derive(Clone, PartialEq, ::prost::Message)]
255pub struct ListRemoteConnectionsResponse {
256    #[prost(message, repeated, tag = "1")]
257    pub remote_connections: ::prost::alloc::vec::Vec<RemoteConnection>,
258    /// Token for retrieving the next page of results. Empty if no more pages.
259    #[prost(string, optional, tag = "2")]
260    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
261}
262/// This is the proto that is sent to remote environments to request mesh operations.
263#[derive(Clone, PartialEq, ::prost::Message)]
264pub struct MeshRequest {
265    #[prost(oneof = "mesh_request::Request", tags = "1, 2")]
266    pub request: ::core::option::Option<mesh_request::Request>,
267}
268/// Nested message and enum types in `MeshRequest`.
269pub mod mesh_request {
270    #[derive(Clone, PartialEq, ::prost::Oneof)]
271    pub enum Request {
272        #[prost(message, tag = "1")]
273        DataStream(super::DataStreamRequest),
274        #[prost(message, tag = "2")]
275        FileIngest(super::FileIngestRequest),
276    }
277}
278#[derive(Clone, Copy, PartialEq, ::prost::Message)]
279pub struct MeshResponse {}
280#[derive(Clone, PartialEq, ::prost::Message)]
281pub struct DataStreamRequest {
282    #[prost(message, repeated, tag = "1")]
283    pub write_batches_request: ::prost::alloc::vec::Vec<
284        super::super::direct_channel_writer::v2::WriteBatchesRequest,
285    >,
286}
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct FileIngestRequest {
289    #[prost(message, optional, tag = "1")]
290    pub file_metadata: ::core::option::Option<FileMetadata>,
291}
292#[derive(Clone, PartialEq, ::prost::Message)]
293pub struct FileMetadata {
294    /// Unique identifier for this file.
295    #[prost(string, tag = "1")]
296    pub uuid: ::prost::alloc::string::String,
297    /// UUID of the dataset this file belongs to.
298    #[prost(string, tag = "2")]
299    pub dataset_uuid: ::prost::alloc::string::String,
300    /// S3 path where the file is stored.
301    #[prost(string, tag = "3")]
302    pub s3_path: ::prost::alloc::string::String,
303    /// Original file name.
304    #[prost(string, tag = "4")]
305    pub file_name: ::prost::alloc::string::String,
306    /// Origin metadata associated with the file.
307    #[prost(map = "string, string", tag = "5")]
308    pub origin_metadata: ::std::collections::HashMap<
309        ::prost::alloc::string::String,
310        ::prost::alloc::string::String,
311    >,
312    /// Time bounds for the data in the file.
313    #[prost(message, optional, tag = "6")]
314    pub bounds: ::core::option::Option<super::super::types::time::Range>,
315    /// Timestamp when the file was uploaded.
316    #[prost(message, optional, tag = "7")]
317    pub uploaded_at: ::core::option::Option<super::super::types::time::Timestamp>,
318    /// Nanosecond timestamp when the file was ingested.
319    #[prost(int64, tag = "8")]
320    pub ingested_at_nanos: i64,
321    /// Columns that are used as tags.
322    #[prost(string, repeated, tag = "9")]
323    pub tag_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
324    /// Additional tags associated with the file.
325    #[prost(map = "string, string", tag = "10")]
326    pub additional_file_tags: ::std::collections::HashMap<
327        ::prost::alloc::string::String,
328        ::prost::alloc::string::String,
329    >,
330    /// Size of the file in bytes.
331    #[prost(int64, tag = "11")]
332    pub file_size: i64,
333    /// Additional metadata associated with the file.
334    #[prost(map = "string, string", tag = "12")]
335    pub metadata: ::std::collections::HashMap<
336        ::prost::alloc::string::String,
337        ::prost::alloc::string::String,
338    >,
339}
340#[derive(Clone, Copy, PartialEq, ::prost::Message)]
341pub struct HealthCheckRequest {}
342#[derive(Clone, Copy, PartialEq, ::prost::Message)]
343pub struct HealthCheckResponse {}
344/// Generated client implementations.
345pub mod mesh_service_client {
346    #![allow(
347        unused_variables,
348        dead_code,
349        missing_docs,
350        clippy::wildcard_imports,
351        clippy::let_unit_value,
352    )]
353    use tonic::codegen::*;
354    use tonic::codegen::http::Uri;
355    /// Manages mesh links between local and remote environments.
356    #[derive(Debug, Clone)]
357    pub struct MeshServiceClient<T> {
358        inner: tonic::client::Grpc<T>,
359    }
360    impl MeshServiceClient<tonic::transport::Channel> {
361        /// Attempt to create a new client by connecting to a given endpoint.
362        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
363        where
364            D: TryInto<tonic::transport::Endpoint>,
365            D::Error: Into<StdError>,
366        {
367            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
368            Ok(Self::new(conn))
369        }
370    }
371    impl<T> MeshServiceClient<T>
372    where
373        T: tonic::client::GrpcService<tonic::body::Body>,
374        T::Error: Into<StdError>,
375        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
376        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
377    {
378        pub fn new(inner: T) -> Self {
379            let inner = tonic::client::Grpc::new(inner);
380            Self { inner }
381        }
382        pub fn with_origin(inner: T, origin: Uri) -> Self {
383            let inner = tonic::client::Grpc::with_origin(inner, origin);
384            Self { inner }
385        }
386        pub fn with_interceptor<F>(
387            inner: T,
388            interceptor: F,
389        ) -> MeshServiceClient<InterceptedService<T, F>>
390        where
391            F: tonic::service::Interceptor,
392            T::ResponseBody: Default,
393            T: tonic::codegen::Service<
394                http::Request<tonic::body::Body>,
395                Response = http::Response<
396                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
397                >,
398            >,
399            <T as tonic::codegen::Service<
400                http::Request<tonic::body::Body>,
401            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
402        {
403            MeshServiceClient::new(InterceptedService::new(inner, interceptor))
404        }
405        /// Compress requests with the given encoding.
406        ///
407        /// This requires the server to support it otherwise it might respond with an
408        /// error.
409        #[must_use]
410        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
411            self.inner = self.inner.send_compressed(encoding);
412            self
413        }
414        /// Enable decompressing responses.
415        #[must_use]
416        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
417            self.inner = self.inner.accept_compressed(encoding);
418            self
419        }
420        /// Limits the maximum size of a decoded message.
421        ///
422        /// Default: `4MB`
423        #[must_use]
424        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
425            self.inner = self.inner.max_decoding_message_size(limit);
426            self
427        }
428        /// Limits the maximum size of an encoded message.
429        ///
430        /// Default: `usize::MAX`
431        #[must_use]
432        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
433            self.inner = self.inner.max_encoding_message_size(limit);
434            self
435        }
436        /// Core Mesh operations.
437        /// ------------------------------------------------------------------------------------------------------------
438        /// Used to mesh resources between stacks.
439        pub async fn mesh(
440            &mut self,
441            request: impl tonic::IntoRequest<super::MeshRequest>,
442        ) -> std::result::Result<tonic::Response<super::MeshResponse>, tonic::Status> {
443            self.inner
444                .ready()
445                .await
446                .map_err(|e| {
447                    tonic::Status::unknown(
448                        format!("Service was not ready: {}", e.into()),
449                    )
450                })?;
451            let codec = tonic::codec::ProstCodec::default();
452            let path = http::uri::PathAndQuery::from_static(
453                "/nominal.mesh.v1.MeshService/Mesh",
454            );
455            let mut req = request.into_request();
456            req.extensions_mut()
457                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "Mesh"));
458            self.inner.unary(req, path, codec).await
459        }
460        /// Used to determine the health of a stack and its availability for meshing.
461        pub async fn health_check(
462            &mut self,
463            request: impl tonic::IntoRequest<super::HealthCheckRequest>,
464        ) -> std::result::Result<
465            tonic::Response<super::HealthCheckResponse>,
466            tonic::Status,
467        > {
468            self.inner
469                .ready()
470                .await
471                .map_err(|e| {
472                    tonic::Status::unknown(
473                        format!("Service was not ready: {}", e.into()),
474                    )
475                })?;
476            let codec = tonic::codec::ProstCodec::default();
477            let path = http::uri::PathAndQuery::from_static(
478                "/nominal.mesh.v1.MeshService/HealthCheck",
479            );
480            let mut req = request.into_request();
481            req.extensions_mut()
482                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "HealthCheck"));
483            self.inner.unary(req, path, codec).await
484        }
485        /// Link operations.
486        /// ------------------------------------------------------------------------------------------------------------
487        /// Creates a link which allows the specified resource to be synced between mesh environments.
488        /// Throws MESH_SERVICE_ERROR_LINK_ALREADY_EXISTS if a link already exists.
489        pub async fn create_link(
490            &mut self,
491            request: impl tonic::IntoRequest<super::CreateLinkRequest>,
492        ) -> std::result::Result<
493            tonic::Response<super::CreateLinkResponse>,
494            tonic::Status,
495        > {
496            self.inner
497                .ready()
498                .await
499                .map_err(|e| {
500                    tonic::Status::unknown(
501                        format!("Service was not ready: {}", e.into()),
502                    )
503                })?;
504            let codec = tonic::codec::ProstCodec::default();
505            let path = http::uri::PathAndQuery::from_static(
506                "/nominal.mesh.v1.MeshService/CreateLink",
507            );
508            let mut req = request.into_request();
509            req.extensions_mut()
510                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "CreateLink"));
511            self.inner.unary(req, path, codec).await
512        }
513        /// Retrieves a link for the requested resource, throwing MESH_SERVICE_ERROR_LINK_NOT_FOUND if there is no link.
514        pub async fn get_link(
515            &mut self,
516            request: impl tonic::IntoRequest<super::GetLinkRequest>,
517        ) -> std::result::Result<
518            tonic::Response<super::GetLinkResponse>,
519            tonic::Status,
520        > {
521            self.inner
522                .ready()
523                .await
524                .map_err(|e| {
525                    tonic::Status::unknown(
526                        format!("Service was not ready: {}", e.into()),
527                    )
528                })?;
529            let codec = tonic::codec::ProstCodec::default();
530            let path = http::uri::PathAndQuery::from_static(
531                "/nominal.mesh.v1.MeshService/GetLink",
532            );
533            let mut req = request.into_request();
534            req.extensions_mut()
535                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "GetLink"));
536            self.inner.unary(req, path, codec).await
537        }
538        /// Updates a link for the requested resource, throwing MESH_SERVICE_ERROR_LINK_NOT_FOUND if there is no link.
539        pub async fn update_link(
540            &mut self,
541            request: impl tonic::IntoRequest<super::UpdateLinkRequest>,
542        ) -> std::result::Result<
543            tonic::Response<super::UpdateLinkResponse>,
544            tonic::Status,
545        > {
546            self.inner
547                .ready()
548                .await
549                .map_err(|e| {
550                    tonic::Status::unknown(
551                        format!("Service was not ready: {}", e.into()),
552                    )
553                })?;
554            let codec = tonic::codec::ProstCodec::default();
555            let path = http::uri::PathAndQuery::from_static(
556                "/nominal.mesh.v1.MeshService/UpdateLink",
557            );
558            let mut req = request.into_request();
559            req.extensions_mut()
560                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "UpdateLink"));
561            self.inner.unary(req, path, codec).await
562        }
563        /// Deletes a link for the specified resource.
564        pub async fn delete_link(
565            &mut self,
566            request: impl tonic::IntoRequest<super::DeleteLinkRequest>,
567        ) -> std::result::Result<
568            tonic::Response<super::DeleteLinkResponse>,
569            tonic::Status,
570        > {
571            self.inner
572                .ready()
573                .await
574                .map_err(|e| {
575                    tonic::Status::unknown(
576                        format!("Service was not ready: {}", e.into()),
577                    )
578                })?;
579            let codec = tonic::codec::ProstCodec::default();
580            let path = http::uri::PathAndQuery::from_static(
581                "/nominal.mesh.v1.MeshService/DeleteLink",
582            );
583            let mut req = request.into_request();
584            req.extensions_mut()
585                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "DeleteLink"));
586            self.inner.unary(req, path, codec).await
587        }
588        /// Searches for links with optional filters and pagination.
589        pub async fn search_links(
590            &mut self,
591            request: impl tonic::IntoRequest<super::SearchLinksRequest>,
592        ) -> std::result::Result<
593            tonic::Response<super::SearchLinksResponse>,
594            tonic::Status,
595        > {
596            self.inner
597                .ready()
598                .await
599                .map_err(|e| {
600                    tonic::Status::unknown(
601                        format!("Service was not ready: {}", e.into()),
602                    )
603                })?;
604            let codec = tonic::codec::ProstCodec::default();
605            let path = http::uri::PathAndQuery::from_static(
606                "/nominal.mesh.v1.MeshService/SearchLinks",
607            );
608            let mut req = request.into_request();
609            req.extensions_mut()
610                .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "SearchLinks"));
611            self.inner.unary(req, path, codec).await
612        }
613        /// Remote Connection operations.
614        /// ------------------------------------------------------------------------------------------------------------
615        /// Creates a remote connection for mesh links.
616        /// Throws MESH_SERVICE_ERROR_REMOTE_CONNECTION_ALREADY_EXISTS if a remote connection with the same name already exists.
617        pub async fn create_remote_connection(
618            &mut self,
619            request: impl tonic::IntoRequest<super::CreateRemoteConnectionRequest>,
620        ) -> std::result::Result<
621            tonic::Response<super::CreateRemoteConnectionResponse>,
622            tonic::Status,
623        > {
624            self.inner
625                .ready()
626                .await
627                .map_err(|e| {
628                    tonic::Status::unknown(
629                        format!("Service was not ready: {}", e.into()),
630                    )
631                })?;
632            let codec = tonic::codec::ProstCodec::default();
633            let path = http::uri::PathAndQuery::from_static(
634                "/nominal.mesh.v1.MeshService/CreateRemoteConnection",
635            );
636            let mut req = request.into_request();
637            req.extensions_mut()
638                .insert(
639                    GrpcMethod::new(
640                        "nominal.mesh.v1.MeshService",
641                        "CreateRemoteConnection",
642                    ),
643                );
644            self.inner.unary(req, path, codec).await
645        }
646        /// Retrieves a remote connection by RID.
647        /// Throws MESH_SERVICE_ERROR_REMOTE_CONNECTION_NOT_FOUND if there is no remote connection.
648        pub async fn get_remote_connection(
649            &mut self,
650            request: impl tonic::IntoRequest<super::GetRemoteConnectionRequest>,
651        ) -> std::result::Result<
652            tonic::Response<super::GetRemoteConnectionResponse>,
653            tonic::Status,
654        > {
655            self.inner
656                .ready()
657                .await
658                .map_err(|e| {
659                    tonic::Status::unknown(
660                        format!("Service was not ready: {}", e.into()),
661                    )
662                })?;
663            let codec = tonic::codec::ProstCodec::default();
664            let path = http::uri::PathAndQuery::from_static(
665                "/nominal.mesh.v1.MeshService/GetRemoteConnection",
666            );
667            let mut req = request.into_request();
668            req.extensions_mut()
669                .insert(
670                    GrpcMethod::new("nominal.mesh.v1.MeshService", "GetRemoteConnection"),
671                );
672            self.inner.unary(req, path, codec).await
673        }
674        /// Updates a remote connection by RID.
675        /// Throws MESH_SERVICE_ERROR_REMOTE_CONNECTION_NOT_FOUND if there is no remote connection.
676        pub async fn update_remote_connection(
677            &mut self,
678            request: impl tonic::IntoRequest<super::UpdateRemoteConnectionRequest>,
679        ) -> std::result::Result<
680            tonic::Response<super::UpdateRemoteConnectionResponse>,
681            tonic::Status,
682        > {
683            self.inner
684                .ready()
685                .await
686                .map_err(|e| {
687                    tonic::Status::unknown(
688                        format!("Service was not ready: {}", e.into()),
689                    )
690                })?;
691            let codec = tonic::codec::ProstCodec::default();
692            let path = http::uri::PathAndQuery::from_static(
693                "/nominal.mesh.v1.MeshService/UpdateRemoteConnection",
694            );
695            let mut req = request.into_request();
696            req.extensions_mut()
697                .insert(
698                    GrpcMethod::new(
699                        "nominal.mesh.v1.MeshService",
700                        "UpdateRemoteConnection",
701                    ),
702                );
703            self.inner.unary(req, path, codec).await
704        }
705        /// Deletes a remote connection by RID.
706        pub async fn delete_remote_connection(
707            &mut self,
708            request: impl tonic::IntoRequest<super::DeleteRemoteConnectionRequest>,
709        ) -> std::result::Result<
710            tonic::Response<super::DeleteRemoteConnectionResponse>,
711            tonic::Status,
712        > {
713            self.inner
714                .ready()
715                .await
716                .map_err(|e| {
717                    tonic::Status::unknown(
718                        format!("Service was not ready: {}", e.into()),
719                    )
720                })?;
721            let codec = tonic::codec::ProstCodec::default();
722            let path = http::uri::PathAndQuery::from_static(
723                "/nominal.mesh.v1.MeshService/DeleteRemoteConnection",
724            );
725            let mut req = request.into_request();
726            req.extensions_mut()
727                .insert(
728                    GrpcMethod::new(
729                        "nominal.mesh.v1.MeshService",
730                        "DeleteRemoteConnection",
731                    ),
732                );
733            self.inner.unary(req, path, codec).await
734        }
735        /// Lists all remote connections.
736        pub async fn list_remote_connections(
737            &mut self,
738            request: impl tonic::IntoRequest<super::ListRemoteConnectionsRequest>,
739        ) -> std::result::Result<
740            tonic::Response<super::ListRemoteConnectionsResponse>,
741            tonic::Status,
742        > {
743            self.inner
744                .ready()
745                .await
746                .map_err(|e| {
747                    tonic::Status::unknown(
748                        format!("Service was not ready: {}", e.into()),
749                    )
750                })?;
751            let codec = tonic::codec::ProstCodec::default();
752            let path = http::uri::PathAndQuery::from_static(
753                "/nominal.mesh.v1.MeshService/ListRemoteConnections",
754            );
755            let mut req = request.into_request();
756            req.extensions_mut()
757                .insert(
758                    GrpcMethod::new(
759                        "nominal.mesh.v1.MeshService",
760                        "ListRemoteConnections",
761                    ),
762                );
763            self.inner.unary(req, path, codec).await
764        }
765    }
766}