1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Link {
4 #[prost(string, tag = "1")]
6 pub rid: ::prost::alloc::string::String,
7 #[prost(string, tag = "2")]
9 pub local_resource_rid: ::prost::alloc::string::String,
10 #[prost(string, tag = "3")]
12 pub remote_resource_rid: ::prost::alloc::string::String,
13 #[prost(string, tag = "4")]
15 pub remote_connection_rid: ::prost::alloc::string::String,
16 #[prost(bool, tag = "5")]
18 pub enabled: bool,
19 #[prost(enumeration = "ResourceType", tag = "6")]
21 pub resource_type: i32,
22}
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct CreateLinkRequest {
25 #[prost(string, tag = "1")]
27 pub local_resource_rid: ::prost::alloc::string::String,
28 #[prost(string, tag = "2")]
30 pub remote_resource_rid: ::prost::alloc::string::String,
31 #[prost(string, tag = "3")]
33 pub remote_connection_rid: ::prost::alloc::string::String,
34 #[prost(bool, tag = "4")]
36 pub enabled: bool,
37 #[prost(enumeration = "ResourceType", tag = "5")]
39 pub resource_type: i32,
40 #[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 #[prost(string, tag = "1")]
60 pub link_rid: ::prost::alloc::string::String,
61 #[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, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
80#[repr(i32)]
81pub enum ResourceType {
82 Unspecified = 0,
83 Dataset = 1,
84}
85impl ResourceType {
86 pub fn as_str_name(&self) -> &'static str {
91 match self {
92 Self::Unspecified => "RESOURCE_TYPE_UNSPECIFIED",
93 Self::Dataset => "RESOURCE_TYPE_DATASET",
94 }
95 }
96 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
98 match value {
99 "RESOURCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
100 "RESOURCE_TYPE_DATASET" => Some(Self::Dataset),
101 _ => None,
102 }
103 }
104}
105#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
107#[repr(i32)]
108pub enum MeshServiceError {
109 LinkNotFound = 0,
110 LinkAlreadyExists = 1,
111}
112impl MeshServiceError {
113 pub fn as_str_name(&self) -> &'static str {
118 match self {
119 Self::LinkNotFound => "MESH_SERVICE_ERROR_LINK_NOT_FOUND",
120 Self::LinkAlreadyExists => "MESH_SERVICE_ERROR_LINK_ALREADY_EXISTS",
121 }
122 }
123 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
125 match value {
126 "MESH_SERVICE_ERROR_LINK_NOT_FOUND" => Some(Self::LinkNotFound),
127 "MESH_SERVICE_ERROR_LINK_ALREADY_EXISTS" => Some(Self::LinkAlreadyExists),
128 _ => None,
129 }
130 }
131}
132#[derive(Clone, PartialEq, ::prost::Message)]
133pub struct RemoteConnection {
134 #[prost(string, tag = "1")]
136 pub rid: ::prost::alloc::string::String,
137 #[prost(string, tag = "2")]
139 pub name: ::prost::alloc::string::String,
140 #[prost(string, tag = "3")]
142 pub base_url: ::prost::alloc::string::String,
143 #[prost(string, tag = "4")]
145 pub secret_rid: ::prost::alloc::string::String,
146}
147#[derive(Clone, PartialEq, ::prost::Message)]
148pub struct CreateRemoteConnectionRequest {
149 #[prost(string, tag = "1")]
150 pub name: ::prost::alloc::string::String,
151 #[prost(string, tag = "2")]
152 pub base_url: ::prost::alloc::string::String,
153 #[prost(string, tag = "3")]
154 pub secret_rid: ::prost::alloc::string::String,
155}
156#[derive(Clone, PartialEq, ::prost::Message)]
157pub struct CreateRemoteConnectionResponse {
158 #[prost(message, optional, tag = "1")]
159 pub remote_connection: ::core::option::Option<RemoteConnection>,
160}
161#[derive(Clone, PartialEq, ::prost::Message)]
162pub struct GetRemoteConnectionRequest {
163 #[prost(string, tag = "1")]
164 pub remote_connection_rid: ::prost::alloc::string::String,
165}
166#[derive(Clone, PartialEq, ::prost::Message)]
167pub struct GetRemoteConnectionResponse {
168 #[prost(message, optional, tag = "1")]
169 pub remote_connection: ::core::option::Option<RemoteConnection>,
170}
171#[derive(Clone, PartialEq, ::prost::Message)]
172pub struct UpdateRemoteConnectionRequest {
173 #[prost(string, tag = "1")]
174 pub remote_connection_rid: ::prost::alloc::string::String,
175 #[prost(string, optional, tag = "2")]
176 pub name: ::core::option::Option<::prost::alloc::string::String>,
177 #[prost(string, optional, tag = "3")]
178 pub base_url: ::core::option::Option<::prost::alloc::string::String>,
179 #[prost(string, optional, tag = "4")]
180 pub secret_rid: ::core::option::Option<::prost::alloc::string::String>,
181}
182#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct UpdateRemoteConnectionResponse {
184 #[prost(message, optional, tag = "1")]
185 pub remote_connection: ::core::option::Option<RemoteConnection>,
186}
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct DeleteRemoteConnectionRequest {
189 #[prost(string, tag = "1")]
190 pub remote_connection_rid: ::prost::alloc::string::String,
191}
192#[derive(Clone, Copy, PartialEq, ::prost::Message)]
193pub struct DeleteRemoteConnectionResponse {}
194#[derive(Clone, Copy, PartialEq, ::prost::Message)]
195pub struct ListRemoteConnectionsRequest {}
196#[derive(Clone, PartialEq, ::prost::Message)]
197pub struct ListRemoteConnectionsResponse {
198 #[prost(message, repeated, tag = "1")]
199 pub remote_connections: ::prost::alloc::vec::Vec<RemoteConnection>,
200}
201#[derive(Clone, PartialEq, ::prost::Message)]
203pub struct MeshRequest {
204 #[prost(oneof = "mesh_request::Request", tags = "1, 2")]
205 pub request: ::core::option::Option<mesh_request::Request>,
206}
207pub mod mesh_request {
209 #[derive(Clone, PartialEq, ::prost::Oneof)]
210 pub enum Request {
211 #[prost(message, tag = "1")]
212 DataStream(super::DataStreamRequest),
213 #[prost(message, tag = "2")]
214 FileIngest(super::FileIngestRequest),
215 }
216}
217#[derive(Clone, Copy, PartialEq, ::prost::Message)]
218pub struct MeshResponse {}
219#[derive(Clone, PartialEq, ::prost::Message)]
220pub struct DataStreamRequest {
221 #[prost(message, repeated, tag = "1")]
222 pub write_batches_request: ::prost::alloc::vec::Vec<
223 super::super::direct_channel_writer::v2::WriteBatchesRequest,
224 >,
225}
226#[derive(Clone, PartialEq, ::prost::Message)]
227pub struct FileIngestRequest {
228 #[prost(message, optional, tag = "1")]
229 pub file_metadata: ::core::option::Option<FileMetadata>,
230}
231#[derive(Clone, PartialEq, ::prost::Message)]
232pub struct FileMetadata {
233 #[prost(string, tag = "1")]
235 pub uuid: ::prost::alloc::string::String,
236 #[prost(string, tag = "2")]
238 pub dataset_uuid: ::prost::alloc::string::String,
239 #[prost(string, tag = "3")]
241 pub s3_path: ::prost::alloc::string::String,
242 #[prost(string, tag = "4")]
244 pub file_name: ::prost::alloc::string::String,
245 #[prost(map = "string, string", tag = "5")]
247 pub origin_metadata: ::std::collections::HashMap<
248 ::prost::alloc::string::String,
249 ::prost::alloc::string::String,
250 >,
251 #[prost(message, optional, tag = "6")]
253 pub bounds: ::core::option::Option<super::super::types::time::Range>,
254 #[prost(message, optional, tag = "7")]
256 pub uploaded_at: ::core::option::Option<super::super::types::time::Timestamp>,
257 #[prost(int64, tag = "8")]
259 pub ingested_at_nanos: i64,
260 #[prost(string, repeated, tag = "9")]
262 pub tag_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
263 #[prost(map = "string, string", tag = "10")]
265 pub additional_file_tags: ::std::collections::HashMap<
266 ::prost::alloc::string::String,
267 ::prost::alloc::string::String,
268 >,
269 #[prost(int64, tag = "11")]
271 pub file_size: i64,
272 #[prost(map = "string, string", tag = "12")]
274 pub metadata: ::std::collections::HashMap<
275 ::prost::alloc::string::String,
276 ::prost::alloc::string::String,
277 >,
278}
279#[derive(Clone, Copy, PartialEq, ::prost::Message)]
280pub struct HealthCheckRequest {}
281#[derive(Clone, Copy, PartialEq, ::prost::Message)]
282pub struct HealthCheckResponse {}
283pub mod mesh_service_client {
285 #![allow(
286 unused_variables,
287 dead_code,
288 missing_docs,
289 clippy::wildcard_imports,
290 clippy::let_unit_value,
291 )]
292 use tonic::codegen::*;
293 use tonic::codegen::http::Uri;
294 #[derive(Debug, Clone)]
296 pub struct MeshServiceClient<T> {
297 inner: tonic::client::Grpc<T>,
298 }
299 impl MeshServiceClient<tonic::transport::Channel> {
300 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
302 where
303 D: TryInto<tonic::transport::Endpoint>,
304 D::Error: Into<StdError>,
305 {
306 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
307 Ok(Self::new(conn))
308 }
309 }
310 impl<T> MeshServiceClient<T>
311 where
312 T: tonic::client::GrpcService<tonic::body::Body>,
313 T::Error: Into<StdError>,
314 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
315 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
316 {
317 pub fn new(inner: T) -> Self {
318 let inner = tonic::client::Grpc::new(inner);
319 Self { inner }
320 }
321 pub fn with_origin(inner: T, origin: Uri) -> Self {
322 let inner = tonic::client::Grpc::with_origin(inner, origin);
323 Self { inner }
324 }
325 pub fn with_interceptor<F>(
326 inner: T,
327 interceptor: F,
328 ) -> MeshServiceClient<InterceptedService<T, F>>
329 where
330 F: tonic::service::Interceptor,
331 T::ResponseBody: Default,
332 T: tonic::codegen::Service<
333 http::Request<tonic::body::Body>,
334 Response = http::Response<
335 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
336 >,
337 >,
338 <T as tonic::codegen::Service<
339 http::Request<tonic::body::Body>,
340 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
341 {
342 MeshServiceClient::new(InterceptedService::new(inner, interceptor))
343 }
344 #[must_use]
349 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
350 self.inner = self.inner.send_compressed(encoding);
351 self
352 }
353 #[must_use]
355 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
356 self.inner = self.inner.accept_compressed(encoding);
357 self
358 }
359 #[must_use]
363 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
364 self.inner = self.inner.max_decoding_message_size(limit);
365 self
366 }
367 #[must_use]
371 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
372 self.inner = self.inner.max_encoding_message_size(limit);
373 self
374 }
375 pub async fn mesh(
379 &mut self,
380 request: impl tonic::IntoRequest<super::MeshRequest>,
381 ) -> std::result::Result<tonic::Response<super::MeshResponse>, tonic::Status> {
382 self.inner
383 .ready()
384 .await
385 .map_err(|e| {
386 tonic::Status::unknown(
387 format!("Service was not ready: {}", e.into()),
388 )
389 })?;
390 let codec = tonic::codec::ProstCodec::default();
391 let path = http::uri::PathAndQuery::from_static(
392 "/nominal.mesh.v1.MeshService/Mesh",
393 );
394 let mut req = request.into_request();
395 req.extensions_mut()
396 .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "Mesh"));
397 self.inner.unary(req, path, codec).await
398 }
399 pub async fn health_check(
401 &mut self,
402 request: impl tonic::IntoRequest<super::HealthCheckRequest>,
403 ) -> std::result::Result<
404 tonic::Response<super::HealthCheckResponse>,
405 tonic::Status,
406 > {
407 self.inner
408 .ready()
409 .await
410 .map_err(|e| {
411 tonic::Status::unknown(
412 format!("Service was not ready: {}", e.into()),
413 )
414 })?;
415 let codec = tonic::codec::ProstCodec::default();
416 let path = http::uri::PathAndQuery::from_static(
417 "/nominal.mesh.v1.MeshService/HealthCheck",
418 );
419 let mut req = request.into_request();
420 req.extensions_mut()
421 .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "HealthCheck"));
422 self.inner.unary(req, path, codec).await
423 }
424 pub async fn create_link(
429 &mut self,
430 request: impl tonic::IntoRequest<super::CreateLinkRequest>,
431 ) -> std::result::Result<
432 tonic::Response<super::CreateLinkResponse>,
433 tonic::Status,
434 > {
435 self.inner
436 .ready()
437 .await
438 .map_err(|e| {
439 tonic::Status::unknown(
440 format!("Service was not ready: {}", e.into()),
441 )
442 })?;
443 let codec = tonic::codec::ProstCodec::default();
444 let path = http::uri::PathAndQuery::from_static(
445 "/nominal.mesh.v1.MeshService/CreateLink",
446 );
447 let mut req = request.into_request();
448 req.extensions_mut()
449 .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "CreateLink"));
450 self.inner.unary(req, path, codec).await
451 }
452 pub async fn get_link(
454 &mut self,
455 request: impl tonic::IntoRequest<super::GetLinkRequest>,
456 ) -> std::result::Result<
457 tonic::Response<super::GetLinkResponse>,
458 tonic::Status,
459 > {
460 self.inner
461 .ready()
462 .await
463 .map_err(|e| {
464 tonic::Status::unknown(
465 format!("Service was not ready: {}", e.into()),
466 )
467 })?;
468 let codec = tonic::codec::ProstCodec::default();
469 let path = http::uri::PathAndQuery::from_static(
470 "/nominal.mesh.v1.MeshService/GetLink",
471 );
472 let mut req = request.into_request();
473 req.extensions_mut()
474 .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "GetLink"));
475 self.inner.unary(req, path, codec).await
476 }
477 pub async fn update_link(
479 &mut self,
480 request: impl tonic::IntoRequest<super::UpdateLinkRequest>,
481 ) -> std::result::Result<
482 tonic::Response<super::UpdateLinkResponse>,
483 tonic::Status,
484 > {
485 self.inner
486 .ready()
487 .await
488 .map_err(|e| {
489 tonic::Status::unknown(
490 format!("Service was not ready: {}", e.into()),
491 )
492 })?;
493 let codec = tonic::codec::ProstCodec::default();
494 let path = http::uri::PathAndQuery::from_static(
495 "/nominal.mesh.v1.MeshService/UpdateLink",
496 );
497 let mut req = request.into_request();
498 req.extensions_mut()
499 .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "UpdateLink"));
500 self.inner.unary(req, path, codec).await
501 }
502 pub async fn delete_link(
504 &mut self,
505 request: impl tonic::IntoRequest<super::DeleteLinkRequest>,
506 ) -> std::result::Result<
507 tonic::Response<super::DeleteLinkResponse>,
508 tonic::Status,
509 > {
510 self.inner
511 .ready()
512 .await
513 .map_err(|e| {
514 tonic::Status::unknown(
515 format!("Service was not ready: {}", e.into()),
516 )
517 })?;
518 let codec = tonic::codec::ProstCodec::default();
519 let path = http::uri::PathAndQuery::from_static(
520 "/nominal.mesh.v1.MeshService/DeleteLink",
521 );
522 let mut req = request.into_request();
523 req.extensions_mut()
524 .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "DeleteLink"));
525 self.inner.unary(req, path, codec).await
526 }
527 pub async fn create_remote_connection(
530 &mut self,
531 request: impl tonic::IntoRequest<super::CreateRemoteConnectionRequest>,
532 ) -> std::result::Result<
533 tonic::Response<super::CreateRemoteConnectionResponse>,
534 tonic::Status,
535 > {
536 self.inner
537 .ready()
538 .await
539 .map_err(|e| {
540 tonic::Status::unknown(
541 format!("Service was not ready: {}", e.into()),
542 )
543 })?;
544 let codec = tonic::codec::ProstCodec::default();
545 let path = http::uri::PathAndQuery::from_static(
546 "/nominal.mesh.v1.MeshService/CreateRemoteConnection",
547 );
548 let mut req = request.into_request();
549 req.extensions_mut()
550 .insert(
551 GrpcMethod::new(
552 "nominal.mesh.v1.MeshService",
553 "CreateRemoteConnection",
554 ),
555 );
556 self.inner.unary(req, path, codec).await
557 }
558 pub async fn get_remote_connection(
561 &mut self,
562 request: impl tonic::IntoRequest<super::GetRemoteConnectionRequest>,
563 ) -> std::result::Result<
564 tonic::Response<super::GetRemoteConnectionResponse>,
565 tonic::Status,
566 > {
567 self.inner
568 .ready()
569 .await
570 .map_err(|e| {
571 tonic::Status::unknown(
572 format!("Service was not ready: {}", e.into()),
573 )
574 })?;
575 let codec = tonic::codec::ProstCodec::default();
576 let path = http::uri::PathAndQuery::from_static(
577 "/nominal.mesh.v1.MeshService/GetRemoteConnection",
578 );
579 let mut req = request.into_request();
580 req.extensions_mut()
581 .insert(
582 GrpcMethod::new("nominal.mesh.v1.MeshService", "GetRemoteConnection"),
583 );
584 self.inner.unary(req, path, codec).await
585 }
586 pub async fn update_remote_connection(
589 &mut self,
590 request: impl tonic::IntoRequest<super::UpdateRemoteConnectionRequest>,
591 ) -> std::result::Result<
592 tonic::Response<super::UpdateRemoteConnectionResponse>,
593 tonic::Status,
594 > {
595 self.inner
596 .ready()
597 .await
598 .map_err(|e| {
599 tonic::Status::unknown(
600 format!("Service was not ready: {}", e.into()),
601 )
602 })?;
603 let codec = tonic::codec::ProstCodec::default();
604 let path = http::uri::PathAndQuery::from_static(
605 "/nominal.mesh.v1.MeshService/UpdateRemoteConnection",
606 );
607 let mut req = request.into_request();
608 req.extensions_mut()
609 .insert(
610 GrpcMethod::new(
611 "nominal.mesh.v1.MeshService",
612 "UpdateRemoteConnection",
613 ),
614 );
615 self.inner.unary(req, path, codec).await
616 }
617 pub async fn delete_remote_connection(
619 &mut self,
620 request: impl tonic::IntoRequest<super::DeleteRemoteConnectionRequest>,
621 ) -> std::result::Result<
622 tonic::Response<super::DeleteRemoteConnectionResponse>,
623 tonic::Status,
624 > {
625 self.inner
626 .ready()
627 .await
628 .map_err(|e| {
629 tonic::Status::unknown(
630 format!("Service was not ready: {}", e.into()),
631 )
632 })?;
633 let codec = tonic::codec::ProstCodec::default();
634 let path = http::uri::PathAndQuery::from_static(
635 "/nominal.mesh.v1.MeshService/DeleteRemoteConnection",
636 );
637 let mut req = request.into_request();
638 req.extensions_mut()
639 .insert(
640 GrpcMethod::new(
641 "nominal.mesh.v1.MeshService",
642 "DeleteRemoteConnection",
643 ),
644 );
645 self.inner.unary(req, path, codec).await
646 }
647 pub async fn list_remote_connections(
649 &mut self,
650 request: impl tonic::IntoRequest<super::ListRemoteConnectionsRequest>,
651 ) -> std::result::Result<
652 tonic::Response<super::ListRemoteConnectionsResponse>,
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/ListRemoteConnections",
666 );
667 let mut req = request.into_request();
668 req.extensions_mut()
669 .insert(
670 GrpcMethod::new(
671 "nominal.mesh.v1.MeshService",
672 "ListRemoteConnections",
673 ),
674 );
675 self.inner.unary(req, path, codec).await
676 }
677 }
678}