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}
279pub mod mesh_service_client {
281 #![allow(
282 unused_variables,
283 dead_code,
284 missing_docs,
285 clippy::wildcard_imports,
286 clippy::let_unit_value,
287 )]
288 use tonic::codegen::*;
289 use tonic::codegen::http::Uri;
290 #[derive(Debug, Clone)]
292 pub struct MeshServiceClient<T> {
293 inner: tonic::client::Grpc<T>,
294 }
295 impl MeshServiceClient<tonic::transport::Channel> {
296 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
298 where
299 D: TryInto<tonic::transport::Endpoint>,
300 D::Error: Into<StdError>,
301 {
302 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
303 Ok(Self::new(conn))
304 }
305 }
306 impl<T> MeshServiceClient<T>
307 where
308 T: tonic::client::GrpcService<tonic::body::Body>,
309 T::Error: Into<StdError>,
310 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
311 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
312 {
313 pub fn new(inner: T) -> Self {
314 let inner = tonic::client::Grpc::new(inner);
315 Self { inner }
316 }
317 pub fn with_origin(inner: T, origin: Uri) -> Self {
318 let inner = tonic::client::Grpc::with_origin(inner, origin);
319 Self { inner }
320 }
321 pub fn with_interceptor<F>(
322 inner: T,
323 interceptor: F,
324 ) -> MeshServiceClient<InterceptedService<T, F>>
325 where
326 F: tonic::service::Interceptor,
327 T::ResponseBody: Default,
328 T: tonic::codegen::Service<
329 http::Request<tonic::body::Body>,
330 Response = http::Response<
331 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
332 >,
333 >,
334 <T as tonic::codegen::Service<
335 http::Request<tonic::body::Body>,
336 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
337 {
338 MeshServiceClient::new(InterceptedService::new(inner, interceptor))
339 }
340 #[must_use]
345 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
346 self.inner = self.inner.send_compressed(encoding);
347 self
348 }
349 #[must_use]
351 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
352 self.inner = self.inner.accept_compressed(encoding);
353 self
354 }
355 #[must_use]
359 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
360 self.inner = self.inner.max_decoding_message_size(limit);
361 self
362 }
363 #[must_use]
367 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
368 self.inner = self.inner.max_encoding_message_size(limit);
369 self
370 }
371 pub async fn mesh(
374 &mut self,
375 request: impl tonic::IntoRequest<super::MeshRequest>,
376 ) -> std::result::Result<tonic::Response<super::MeshResponse>, tonic::Status> {
377 self.inner
378 .ready()
379 .await
380 .map_err(|e| {
381 tonic::Status::unknown(
382 format!("Service was not ready: {}", e.into()),
383 )
384 })?;
385 let codec = tonic::codec::ProstCodec::default();
386 let path = http::uri::PathAndQuery::from_static(
387 "/nominal.mesh.v1.MeshService/Mesh",
388 );
389 let mut req = request.into_request();
390 req.extensions_mut()
391 .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "Mesh"));
392 self.inner.unary(req, path, codec).await
393 }
394 pub async fn create_link(
399 &mut self,
400 request: impl tonic::IntoRequest<super::CreateLinkRequest>,
401 ) -> std::result::Result<
402 tonic::Response<super::CreateLinkResponse>,
403 tonic::Status,
404 > {
405 self.inner
406 .ready()
407 .await
408 .map_err(|e| {
409 tonic::Status::unknown(
410 format!("Service was not ready: {}", e.into()),
411 )
412 })?;
413 let codec = tonic::codec::ProstCodec::default();
414 let path = http::uri::PathAndQuery::from_static(
415 "/nominal.mesh.v1.MeshService/CreateLink",
416 );
417 let mut req = request.into_request();
418 req.extensions_mut()
419 .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "CreateLink"));
420 self.inner.unary(req, path, codec).await
421 }
422 pub async fn get_link(
424 &mut self,
425 request: impl tonic::IntoRequest<super::GetLinkRequest>,
426 ) -> std::result::Result<
427 tonic::Response<super::GetLinkResponse>,
428 tonic::Status,
429 > {
430 self.inner
431 .ready()
432 .await
433 .map_err(|e| {
434 tonic::Status::unknown(
435 format!("Service was not ready: {}", e.into()),
436 )
437 })?;
438 let codec = tonic::codec::ProstCodec::default();
439 let path = http::uri::PathAndQuery::from_static(
440 "/nominal.mesh.v1.MeshService/GetLink",
441 );
442 let mut req = request.into_request();
443 req.extensions_mut()
444 .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "GetLink"));
445 self.inner.unary(req, path, codec).await
446 }
447 pub async fn update_link(
449 &mut self,
450 request: impl tonic::IntoRequest<super::UpdateLinkRequest>,
451 ) -> std::result::Result<
452 tonic::Response<super::UpdateLinkResponse>,
453 tonic::Status,
454 > {
455 self.inner
456 .ready()
457 .await
458 .map_err(|e| {
459 tonic::Status::unknown(
460 format!("Service was not ready: {}", e.into()),
461 )
462 })?;
463 let codec = tonic::codec::ProstCodec::default();
464 let path = http::uri::PathAndQuery::from_static(
465 "/nominal.mesh.v1.MeshService/UpdateLink",
466 );
467 let mut req = request.into_request();
468 req.extensions_mut()
469 .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "UpdateLink"));
470 self.inner.unary(req, path, codec).await
471 }
472 pub async fn delete_link(
474 &mut self,
475 request: impl tonic::IntoRequest<super::DeleteLinkRequest>,
476 ) -> std::result::Result<
477 tonic::Response<super::DeleteLinkResponse>,
478 tonic::Status,
479 > {
480 self.inner
481 .ready()
482 .await
483 .map_err(|e| {
484 tonic::Status::unknown(
485 format!("Service was not ready: {}", e.into()),
486 )
487 })?;
488 let codec = tonic::codec::ProstCodec::default();
489 let path = http::uri::PathAndQuery::from_static(
490 "/nominal.mesh.v1.MeshService/DeleteLink",
491 );
492 let mut req = request.into_request();
493 req.extensions_mut()
494 .insert(GrpcMethod::new("nominal.mesh.v1.MeshService", "DeleteLink"));
495 self.inner.unary(req, path, codec).await
496 }
497 pub async fn create_remote_connection(
500 &mut self,
501 request: impl tonic::IntoRequest<super::CreateRemoteConnectionRequest>,
502 ) -> std::result::Result<
503 tonic::Response<super::CreateRemoteConnectionResponse>,
504 tonic::Status,
505 > {
506 self.inner
507 .ready()
508 .await
509 .map_err(|e| {
510 tonic::Status::unknown(
511 format!("Service was not ready: {}", e.into()),
512 )
513 })?;
514 let codec = tonic::codec::ProstCodec::default();
515 let path = http::uri::PathAndQuery::from_static(
516 "/nominal.mesh.v1.MeshService/CreateRemoteConnection",
517 );
518 let mut req = request.into_request();
519 req.extensions_mut()
520 .insert(
521 GrpcMethod::new(
522 "nominal.mesh.v1.MeshService",
523 "CreateRemoteConnection",
524 ),
525 );
526 self.inner.unary(req, path, codec).await
527 }
528 pub async fn get_remote_connection(
531 &mut self,
532 request: impl tonic::IntoRequest<super::GetRemoteConnectionRequest>,
533 ) -> std::result::Result<
534 tonic::Response<super::GetRemoteConnectionResponse>,
535 tonic::Status,
536 > {
537 self.inner
538 .ready()
539 .await
540 .map_err(|e| {
541 tonic::Status::unknown(
542 format!("Service was not ready: {}", e.into()),
543 )
544 })?;
545 let codec = tonic::codec::ProstCodec::default();
546 let path = http::uri::PathAndQuery::from_static(
547 "/nominal.mesh.v1.MeshService/GetRemoteConnection",
548 );
549 let mut req = request.into_request();
550 req.extensions_mut()
551 .insert(
552 GrpcMethod::new("nominal.mesh.v1.MeshService", "GetRemoteConnection"),
553 );
554 self.inner.unary(req, path, codec).await
555 }
556 pub async fn update_remote_connection(
559 &mut self,
560 request: impl tonic::IntoRequest<super::UpdateRemoteConnectionRequest>,
561 ) -> std::result::Result<
562 tonic::Response<super::UpdateRemoteConnectionResponse>,
563 tonic::Status,
564 > {
565 self.inner
566 .ready()
567 .await
568 .map_err(|e| {
569 tonic::Status::unknown(
570 format!("Service was not ready: {}", e.into()),
571 )
572 })?;
573 let codec = tonic::codec::ProstCodec::default();
574 let path = http::uri::PathAndQuery::from_static(
575 "/nominal.mesh.v1.MeshService/UpdateRemoteConnection",
576 );
577 let mut req = request.into_request();
578 req.extensions_mut()
579 .insert(
580 GrpcMethod::new(
581 "nominal.mesh.v1.MeshService",
582 "UpdateRemoteConnection",
583 ),
584 );
585 self.inner.unary(req, path, codec).await
586 }
587 pub async fn delete_remote_connection(
589 &mut self,
590 request: impl tonic::IntoRequest<super::DeleteRemoteConnectionRequest>,
591 ) -> std::result::Result<
592 tonic::Response<super::DeleteRemoteConnectionResponse>,
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/DeleteRemoteConnection",
606 );
607 let mut req = request.into_request();
608 req.extensions_mut()
609 .insert(
610 GrpcMethod::new(
611 "nominal.mesh.v1.MeshService",
612 "DeleteRemoteConnection",
613 ),
614 );
615 self.inner.unary(req, path, codec).await
616 }
617 pub async fn list_remote_connections(
619 &mut self,
620 request: impl tonic::IntoRequest<super::ListRemoteConnectionsRequest>,
621 ) -> std::result::Result<
622 tonic::Response<super::ListRemoteConnectionsResponse>,
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/ListRemoteConnections",
636 );
637 let mut req = request.into_request();
638 req.extensions_mut()
639 .insert(
640 GrpcMethod::new(
641 "nominal.mesh.v1.MeshService",
642 "ListRemoteConnections",
643 ),
644 );
645 self.inner.unary(req, path, codec).await
646 }
647 }
648}