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