1#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct OpcAuthenticationConfig {
5 #[prost(oneof = "opc_authentication_config::OpcAuthenticationConfig", tags = "1")]
7 pub opc_authentication_config: ::core::option::Option<
8 opc_authentication_config::OpcAuthenticationConfig,
9 >,
10}
11pub mod opc_authentication_config {
13 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
15 pub enum OpcAuthenticationConfig {
16 #[prost(message, tag = "1")]
17 Anonymous(super::super::super::super::google::protobuf::Empty),
18 }
19}
20#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct OpcIdentifierValue {
23 #[prost(oneof = "opc_identifier_value::OpcIdentifierValue", tags = "1, 2")]
24 pub opc_identifier_value: ::core::option::Option<
25 opc_identifier_value::OpcIdentifierValue,
26 >,
27}
28pub mod opc_identifier_value {
30 #[derive(Clone, PartialEq, ::prost::Oneof)]
31 pub enum OpcIdentifierValue {
32 #[prost(int32, tag = "1")]
33 Numeric(i32),
34 #[prost(string, tag = "2")]
35 String(::prost::alloc::string::String),
36 }
37}
38#[derive(Clone, PartialEq, ::prost::Message)]
40pub struct OpcNode {
41 #[prost(uint32, optional, tag = "1")]
42 pub namespace: ::core::option::Option<u32>,
43 #[prost(message, optional, tag = "2")]
44 pub identifier: ::core::option::Option<OpcIdentifierValue>,
45}
46#[derive(Clone, PartialEq, ::prost::Message)]
48pub struct OpcUaChannelNamingConvention {
49 #[prost(
50 oneof = "opc_ua_channel_naming_convention::NamingConvention",
51 tags = "1, 2, 3, 4"
52 )]
53 pub naming_convention: ::core::option::Option<
54 opc_ua_channel_naming_convention::NamingConvention,
55 >,
56}
57pub mod opc_ua_channel_naming_convention {
59 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
60 pub struct OpcUaNodeId {}
61 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
62 pub struct OpcUaBrowseName {}
63 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
64 pub struct OpcUaDisplayName {}
65 #[derive(Clone, PartialEq, ::prost::Message)]
67 pub struct OpcUaFullPath {
68 #[prost(message, repeated, tag = "1")]
70 pub root_nodes: ::prost::alloc::vec::Vec<super::OpcNode>,
71 #[prost(string, tag = "2")]
73 pub delimiter: ::prost::alloc::string::String,
74 }
75 #[derive(Clone, PartialEq, ::prost::Oneof)]
76 pub enum NamingConvention {
77 #[prost(message, tag = "1")]
79 NodeId(OpcUaNodeId),
80 #[prost(message, tag = "2")]
82 BrowseName(OpcUaBrowseName),
83 #[prost(message, tag = "3")]
85 DisplayName(OpcUaDisplayName),
86 #[prost(message, tag = "4")]
88 FullPath(OpcUaFullPath),
89 }
90}
91#[derive(Clone, PartialEq, ::prost::Message)]
93pub struct OpcUaConnectionDetails {
94 #[prost(string, tag = "1")]
95 pub uri: ::prost::alloc::string::String,
96 #[prost(enumeration = "OpcSecurityPolicy", tag = "2")]
97 pub security_policy: i32,
98 #[prost(message, optional, tag = "3")]
99 pub authentication_config: ::core::option::Option<OpcAuthenticationConfig>,
100}
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct OpcUaTraversalConfig {
103 #[prost(message, repeated, tag = "1")]
106 pub root_nodes: ::prost::alloc::vec::Vec<OpcNode>,
107 #[prost(message, repeated, tag = "2")]
109 pub skip_nodes: ::prost::alloc::vec::Vec<OpcNode>,
110 #[prost(enumeration = "OpcUaReferenceExplorationType", tag = "3")]
112 pub reference_exploration_type: i32,
113}
114#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct OpcUaDirectNodeSubscription {
116 #[prost(message, repeated, tag = "1")]
117 pub nodes: ::prost::alloc::vec::Vec<OpcNode>,
118}
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct OpcUaNodeExplorationConfig {
121 #[prost(
122 oneof = "opc_ua_node_exploration_config::OpcUaNodeExplorationConfig",
123 tags = "1, 2"
124 )]
125 pub opc_ua_node_exploration_config: ::core::option::Option<
126 opc_ua_node_exploration_config::OpcUaNodeExplorationConfig,
127 >,
128}
129pub mod opc_ua_node_exploration_config {
131 #[derive(Clone, PartialEq, ::prost::Oneof)]
132 pub enum OpcUaNodeExplorationConfig {
133 #[prost(message, tag = "1")]
134 OpcUaTraversalConfig(super::OpcUaTraversalConfig),
135 #[prost(message, tag = "2")]
136 OpcUaDirectNodeSubscription(super::OpcUaDirectNodeSubscription),
137 }
138}
139#[derive(Clone, Copy, PartialEq, ::prost::Message)]
140pub struct OpcUaTimestampHandling {
141 #[prost(oneof = "opc_ua_timestamp_handling::TimestampType", tags = "1, 2, 3")]
142 pub timestamp_type: ::core::option::Option<opc_ua_timestamp_handling::TimestampType>,
143}
144pub mod opc_ua_timestamp_handling {
146 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
148 pub struct OpcUaServerTime {}
149 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
151 pub struct OpcUaSourceTime {}
152 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
155 pub struct OpcUaRelativeTimestamp {
156 #[prost(message, optional, tag = "1")]
157 pub offset: ::core::option::Option<
158 super::super::super::super::google::protobuf::Timestamp,
159 >,
160 }
161 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
162 pub enum TimestampType {
163 #[prost(message, tag = "1")]
164 Server(OpcUaServerTime),
165 #[prost(message, tag = "2")]
166 Source(OpcUaSourceTime),
167 #[prost(message, tag = "3")]
168 Relative(OpcUaRelativeTimestamp),
169 }
170}
171#[derive(Clone, Copy, PartialEq, ::prost::Message)]
172pub struct OpcUaDataChangeFilter {
173 #[prost(enumeration = "OpcUaDataChangeTrigger", tag = "1")]
175 pub trigger: i32,
176 #[prost(enumeration = "OpcUaDeadbandType", tag = "2")]
177 pub deadband_type: i32,
178 #[prost(double, tag = "3")]
179 pub deadband_value: f64,
180}
181#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct OpcUaScrapingConfig {
184 #[prost(message, optional, tag = "1")]
185 pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
186 #[prost(string, tag = "2")]
188 pub unit_node_name: ::prost::alloc::string::String,
189 #[prost(message, optional, tag = "3")]
190 pub channel_naming_convention: ::core::option::Option<OpcUaChannelNamingConvention>,
191 #[prost(bool, tag = "4")]
193 pub override_host: bool,
194 #[prost(enumeration = "OpcUaUnknownDataTypeHandling", tag = "5")]
196 pub unknown_data_type_handling: i32,
197 #[prost(enumeration = "OpcUaFailedMonitorHandling", tag = "6")]
199 pub failed_monitor_handling: i32,
200 #[prost(message, optional, tag = "7")]
202 pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
203 #[prost(message, optional, tag = "8")]
205 pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
206}
207#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
210#[repr(i32)]
211pub enum OpcSecurityPolicy {
212 Unspecified = 0,
213 None = 1,
214}
215impl OpcSecurityPolicy {
216 pub fn as_str_name(&self) -> &'static str {
221 match self {
222 Self::Unspecified => "OPC_SECURITY_POLICY_UNSPECIFIED",
223 Self::None => "NONE",
224 }
225 }
226 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
228 match value {
229 "OPC_SECURITY_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
230 "NONE" => Some(Self::None),
231 _ => None,
232 }
233 }
234}
235#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
236#[repr(i32)]
237pub enum OpcUaReferenceExplorationType {
238 Unspecified = 0,
239 Organizes = 1,
240 HierarchicalReferences = 2,
241}
242impl OpcUaReferenceExplorationType {
243 pub fn as_str_name(&self) -> &'static str {
248 match self {
249 Self::Unspecified => "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED",
250 Self::Organizes => "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES",
251 Self::HierarchicalReferences => {
252 "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES"
253 }
254 }
255 }
256 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
258 match value {
259 "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
260 "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES" => Some(Self::Organizes),
261 "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES" => {
262 Some(Self::HierarchicalReferences)
263 }
264 _ => None,
265 }
266 }
267}
268#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
269#[repr(i32)]
270pub enum OpcUaUnknownDataTypeHandling {
271 Unspecified = 0,
272 Error = 1,
274 TreatAsDouble = 2,
276 TreatAsString = 3,
278}
279impl OpcUaUnknownDataTypeHandling {
280 pub fn as_str_name(&self) -> &'static str {
285 match self {
286 Self::Unspecified => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED",
287 Self::Error => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR",
288 Self::TreatAsDouble => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE",
289 Self::TreatAsString => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING",
290 }
291 }
292 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
294 match value {
295 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
296 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR" => Some(Self::Error),
297 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE" => {
298 Some(Self::TreatAsDouble)
299 }
300 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING" => {
301 Some(Self::TreatAsString)
302 }
303 _ => None,
304 }
305 }
306}
307#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
308#[repr(i32)]
309pub enum OpcUaFailedMonitorHandling {
310 Unspecified = 0,
311 Error = 1,
312 Ignore = 2,
313}
314impl OpcUaFailedMonitorHandling {
315 pub fn as_str_name(&self) -> &'static str {
320 match self {
321 Self::Unspecified => "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED",
322 Self::Error => "OPC_UA_FAILED_MONITOR_HANDLING_ERROR",
323 Self::Ignore => "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE",
324 }
325 }
326 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
328 match value {
329 "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
330 "OPC_UA_FAILED_MONITOR_HANDLING_ERROR" => Some(Self::Error),
331 "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE" => Some(Self::Ignore),
332 _ => None,
333 }
334 }
335}
336#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
337#[repr(i32)]
338pub enum OpcUaDataChangeTrigger {
339 Unspecified = 0,
340 StatusOnly = 1,
341 StatusValue = 2,
342 StatusValueTimestamp = 3,
343}
344impl OpcUaDataChangeTrigger {
345 pub fn as_str_name(&self) -> &'static str {
350 match self {
351 Self::Unspecified => "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED",
352 Self::StatusOnly => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY",
353 Self::StatusValue => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE",
354 Self::StatusValueTimestamp => {
355 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP"
356 }
357 }
358 }
359 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
361 match value {
362 "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
363 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY" => Some(Self::StatusOnly),
364 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE" => Some(Self::StatusValue),
365 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP" => {
366 Some(Self::StatusValueTimestamp)
367 }
368 _ => None,
369 }
370 }
371}
372#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
373#[repr(i32)]
374pub enum OpcUaDeadbandType {
375 Unspecified = 0,
376 None = 1,
377 Absolute = 2,
378 Percent = 3,
379}
380impl OpcUaDeadbandType {
381 pub fn as_str_name(&self) -> &'static str {
386 match self {
387 Self::Unspecified => "OPC_UA_DEADBAND_TYPE_UNSPECIFIED",
388 Self::None => "OPC_UA_DEADBAND_TYPE_NONE",
389 Self::Absolute => "OPC_UA_DEADBAND_TYPE_ABSOLUTE",
390 Self::Percent => "OPC_UA_DEADBAND_TYPE_PERCENT",
391 }
392 }
393 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
395 match value {
396 "OPC_UA_DEADBAND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
397 "OPC_UA_DEADBAND_TYPE_NONE" => Some(Self::None),
398 "OPC_UA_DEADBAND_TYPE_ABSOLUTE" => Some(Self::Absolute),
399 "OPC_UA_DEADBAND_TYPE_PERCENT" => Some(Self::Percent),
400 _ => None,
401 }
402 }
403}
404#[derive(Clone, PartialEq, ::prost::Message)]
406pub struct CreateStreamingConnectionRequest {
407 #[prost(string, tag = "1")]
408 pub name: ::prost::alloc::string::String,
409 #[prost(string, optional, tag = "2")]
410 pub description: ::core::option::Option<::prost::alloc::string::String>,
411 #[prost(message, optional, tag = "3")]
412 pub connection_details: ::core::option::Option<StreamingConnectionDetails>,
413 #[prost(string, optional, tag = "4")]
414 pub workspace_rid: ::core::option::Option<::prost::alloc::string::String>,
415}
416#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct CreateStreamingConnectionResponse {
419 #[prost(string, tag = "1")]
420 pub streaming_connection_rid: ::prost::alloc::string::String,
421}
422#[derive(Clone, Copy, PartialEq, ::prost::Message)]
424pub struct StopStreamResponse {
425 #[prost(bool, tag = "1")]
426 pub success: bool,
427}
428#[derive(Clone, Copy, PartialEq, ::prost::Message)]
429pub struct StartStreamResponse {
430 #[prost(bool, tag = "1")]
431 pub success: bool,
432}
433#[derive(Clone, PartialEq, ::prost::Message)]
435pub struct StreamingConnection {
436 #[prost(string, tag = "1")]
437 pub streaming_connection_rid: ::prost::alloc::string::String,
438 #[prost(string, tag = "2")]
439 pub name: ::prost::alloc::string::String,
440 #[prost(string, optional, tag = "3")]
441 pub description: ::core::option::Option<::prost::alloc::string::String>,
442 #[prost(message, optional, tag = "4")]
443 pub connection_details: ::core::option::Option<StreamingConnectionDetails>,
444 #[prost(enumeration = "StreamingConnectionStatus", tag = "6")]
445 pub status: i32,
446 #[prost(message, optional, tag = "7")]
447 pub created_at: ::core::option::Option<
448 super::super::super::google::protobuf::Timestamp,
449 >,
450}
451#[derive(Clone, PartialEq, ::prost::Message)]
453pub struct StreamingConnectionDetails {
454 #[prost(
456 oneof = "streaming_connection_details::StreamingConnectionDetails",
457 tags = "1"
458 )]
459 pub streaming_connection_details: ::core::option::Option<
460 streaming_connection_details::StreamingConnectionDetails,
461 >,
462}
463pub mod streaming_connection_details {
465 #[derive(Clone, PartialEq, ::prost::Oneof)]
467 pub enum StreamingConnectionDetails {
468 #[prost(message, tag = "1")]
469 OpcUa(super::OpcUaConnectionDetails),
470 }
471}
472#[derive(Clone, PartialEq, ::prost::Message)]
473pub struct StreamingScrapingConfig {
474 #[prost(oneof = "streaming_scraping_config::StreamingScrapingConfig", tags = "1")]
476 pub streaming_scraping_config: ::core::option::Option<
477 streaming_scraping_config::StreamingScrapingConfig,
478 >,
479}
480pub mod streaming_scraping_config {
482 #[derive(Clone, PartialEq, ::prost::Oneof)]
484 pub enum StreamingScrapingConfig {
485 #[prost(message, tag = "1")]
486 OpcUa(super::OpcUaScrapingConfig),
487 }
488}
489#[derive(Clone, PartialEq, ::prost::Message)]
490pub struct GetStreamingConnectionRequest {
491 #[prost(string, tag = "1")]
492 pub streaming_connection_rid: ::prost::alloc::string::String,
493}
494#[derive(Clone, PartialEq, ::prost::Message)]
495pub struct GetStreamingConnectionResponse {
496 #[prost(message, optional, tag = "1")]
497 pub streaming_connection: ::core::option::Option<StreamingConnection>,
498}
499#[derive(Clone, PartialEq, ::prost::Message)]
500pub struct ListStreamingConnectionsRequest {
501 #[prost(string, repeated, tag = "1")]
502 pub workspace_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
503}
504#[derive(Clone, PartialEq, ::prost::Message)]
505pub struct ListStreamingConnectionsResponse {
506 #[prost(message, repeated, tag = "1")]
507 pub streaming_connections: ::prost::alloc::vec::Vec<StreamingConnection>,
508}
509#[derive(Clone, PartialEq, ::prost::Message)]
510pub struct UpdateStreamingConnectionStatusRequest {
511 #[prost(string, tag = "1")]
512 pub streaming_connection_rid: ::prost::alloc::string::String,
513 #[prost(enumeration = "StreamingConnectionStatus", tag = "2")]
514 pub status: i32,
515}
516#[derive(Clone, PartialEq, ::prost::Message)]
517pub struct UpdateStreamingConnectionStatusResponse {
518 #[prost(message, optional, tag = "1")]
519 pub streaming_connection: ::core::option::Option<StreamingConnection>,
520}
521#[derive(Clone, PartialEq, ::prost::Message)]
522pub struct StartStreamRequest {
523 #[prost(string, tag = "1")]
524 pub streaming_connection_rid: ::prost::alloc::string::String,
525 #[prost(message, optional, tag = "2")]
526 pub scraping_config: ::core::option::Option<StreamingScrapingConfig>,
527 #[prost(string, tag = "3")]
528 pub target_dataset_rid: ::prost::alloc::string::String,
529}
530#[derive(Clone, PartialEq, ::prost::Message)]
531pub struct StopStreamRequest {
532 #[prost(string, tag = "1")]
533 pub streaming_connection_rid: ::prost::alloc::string::String,
534}
535#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
537#[repr(i32)]
538pub enum StreamingConnectionErrorType {
539 Unspecified = 0,
540 ConnectionNotFound = 1,
541 StreamingConnectionAlreadyRunning = 2,
542}
543impl StreamingConnectionErrorType {
544 pub fn as_str_name(&self) -> &'static str {
549 match self {
550 Self::Unspecified => "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED",
551 Self::ConnectionNotFound => {
552 "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND"
553 }
554 Self::StreamingConnectionAlreadyRunning => {
555 "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING"
556 }
557 }
558 }
559 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
561 match value {
562 "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
563 "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND" => {
564 Some(Self::ConnectionNotFound)
565 }
566 "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING" => {
567 Some(Self::StreamingConnectionAlreadyRunning)
568 }
569 _ => None,
570 }
571 }
572}
573#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
576#[repr(i32)]
577pub enum StreamingConnectionStatus {
578 Unspecified = 0,
579 Connected = 1,
580 Disconnected = 2,
581}
582impl StreamingConnectionStatus {
583 pub fn as_str_name(&self) -> &'static str {
588 match self {
589 Self::Unspecified => "STREAMING_CONNECTION_STATUS_UNSPECIFIED",
590 Self::Connected => "CONNECTED",
591 Self::Disconnected => "DISCONNECTED",
592 }
593 }
594 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
596 match value {
597 "STREAMING_CONNECTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
598 "CONNECTED" => Some(Self::Connected),
599 "DISCONNECTED" => Some(Self::Disconnected),
600 _ => None,
601 }
602 }
603}
604pub mod streaming_connection_service_client {
606 #![allow(
607 unused_variables,
608 dead_code,
609 missing_docs,
610 clippy::wildcard_imports,
611 clippy::let_unit_value,
612 )]
613 use tonic::codegen::*;
614 use tonic::codegen::http::Uri;
615 #[derive(Debug, Clone)]
618 pub struct StreamingConnectionServiceClient<T> {
619 inner: tonic::client::Grpc<T>,
620 }
621 impl StreamingConnectionServiceClient<tonic::transport::Channel> {
622 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
624 where
625 D: TryInto<tonic::transport::Endpoint>,
626 D::Error: Into<StdError>,
627 {
628 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
629 Ok(Self::new(conn))
630 }
631 }
632 impl<T> StreamingConnectionServiceClient<T>
633 where
634 T: tonic::client::GrpcService<tonic::body::Body>,
635 T::Error: Into<StdError>,
636 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
637 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
638 {
639 pub fn new(inner: T) -> Self {
640 let inner = tonic::client::Grpc::new(inner);
641 Self { inner }
642 }
643 pub fn with_origin(inner: T, origin: Uri) -> Self {
644 let inner = tonic::client::Grpc::with_origin(inner, origin);
645 Self { inner }
646 }
647 pub fn with_interceptor<F>(
648 inner: T,
649 interceptor: F,
650 ) -> StreamingConnectionServiceClient<InterceptedService<T, F>>
651 where
652 F: tonic::service::Interceptor,
653 T::ResponseBody: Default,
654 T: tonic::codegen::Service<
655 http::Request<tonic::body::Body>,
656 Response = http::Response<
657 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
658 >,
659 >,
660 <T as tonic::codegen::Service<
661 http::Request<tonic::body::Body>,
662 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
663 {
664 StreamingConnectionServiceClient::new(
665 InterceptedService::new(inner, interceptor),
666 )
667 }
668 #[must_use]
673 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
674 self.inner = self.inner.send_compressed(encoding);
675 self
676 }
677 #[must_use]
679 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
680 self.inner = self.inner.accept_compressed(encoding);
681 self
682 }
683 #[must_use]
687 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
688 self.inner = self.inner.max_decoding_message_size(limit);
689 self
690 }
691 #[must_use]
695 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
696 self.inner = self.inner.max_encoding_message_size(limit);
697 self
698 }
699 pub async fn create_streaming_connection(
703 &mut self,
704 request: impl tonic::IntoRequest<super::CreateStreamingConnectionRequest>,
705 ) -> std::result::Result<
706 tonic::Response<super::CreateStreamingConnectionResponse>,
707 tonic::Status,
708 > {
709 self.inner
710 .ready()
711 .await
712 .map_err(|e| {
713 tonic::Status::unknown(
714 format!("Service was not ready: {}", e.into()),
715 )
716 })?;
717 let codec = tonic::codec::ProstCodec::default();
718 let path = http::uri::PathAndQuery::from_static(
719 "/nominal.streaming_connection_service.v1.StreamingConnectionService/CreateStreamingConnection",
720 );
721 let mut req = request.into_request();
722 req.extensions_mut()
723 .insert(
724 GrpcMethod::new(
725 "nominal.streaming_connection_service.v1.StreamingConnectionService",
726 "CreateStreamingConnection",
727 ),
728 );
729 self.inner.unary(req, path, codec).await
730 }
731 pub async fn get_streaming_connection(
733 &mut self,
734 request: impl tonic::IntoRequest<super::GetStreamingConnectionRequest>,
735 ) -> std::result::Result<
736 tonic::Response<super::GetStreamingConnectionResponse>,
737 tonic::Status,
738 > {
739 self.inner
740 .ready()
741 .await
742 .map_err(|e| {
743 tonic::Status::unknown(
744 format!("Service was not ready: {}", e.into()),
745 )
746 })?;
747 let codec = tonic::codec::ProstCodec::default();
748 let path = http::uri::PathAndQuery::from_static(
749 "/nominal.streaming_connection_service.v1.StreamingConnectionService/GetStreamingConnection",
750 );
751 let mut req = request.into_request();
752 req.extensions_mut()
753 .insert(
754 GrpcMethod::new(
755 "nominal.streaming_connection_service.v1.StreamingConnectionService",
756 "GetStreamingConnection",
757 ),
758 );
759 self.inner.unary(req, path, codec).await
760 }
761 pub async fn list_streaming_connections(
763 &mut self,
764 request: impl tonic::IntoRequest<super::ListStreamingConnectionsRequest>,
765 ) -> std::result::Result<
766 tonic::Response<super::ListStreamingConnectionsResponse>,
767 tonic::Status,
768 > {
769 self.inner
770 .ready()
771 .await
772 .map_err(|e| {
773 tonic::Status::unknown(
774 format!("Service was not ready: {}", e.into()),
775 )
776 })?;
777 let codec = tonic::codec::ProstCodec::default();
778 let path = http::uri::PathAndQuery::from_static(
779 "/nominal.streaming_connection_service.v1.StreamingConnectionService/ListStreamingConnections",
780 );
781 let mut req = request.into_request();
782 req.extensions_mut()
783 .insert(
784 GrpcMethod::new(
785 "nominal.streaming_connection_service.v1.StreamingConnectionService",
786 "ListStreamingConnections",
787 ),
788 );
789 self.inner.unary(req, path, codec).await
790 }
791 pub async fn update_streaming_connection_status(
793 &mut self,
794 request: impl tonic::IntoRequest<
795 super::UpdateStreamingConnectionStatusRequest,
796 >,
797 ) -> std::result::Result<
798 tonic::Response<super::UpdateStreamingConnectionStatusResponse>,
799 tonic::Status,
800 > {
801 self.inner
802 .ready()
803 .await
804 .map_err(|e| {
805 tonic::Status::unknown(
806 format!("Service was not ready: {}", e.into()),
807 )
808 })?;
809 let codec = tonic::codec::ProstCodec::default();
810 let path = http::uri::PathAndQuery::from_static(
811 "/nominal.streaming_connection_service.v1.StreamingConnectionService/UpdateStreamingConnectionStatus",
812 );
813 let mut req = request.into_request();
814 req.extensions_mut()
815 .insert(
816 GrpcMethod::new(
817 "nominal.streaming_connection_service.v1.StreamingConnectionService",
818 "UpdateStreamingConnectionStatus",
819 ),
820 );
821 self.inner.unary(req, path, codec).await
822 }
823 pub async fn start_stream(
825 &mut self,
826 request: impl tonic::IntoRequest<super::StartStreamRequest>,
827 ) -> std::result::Result<
828 tonic::Response<super::StartStreamResponse>,
829 tonic::Status,
830 > {
831 self.inner
832 .ready()
833 .await
834 .map_err(|e| {
835 tonic::Status::unknown(
836 format!("Service was not ready: {}", e.into()),
837 )
838 })?;
839 let codec = tonic::codec::ProstCodec::default();
840 let path = http::uri::PathAndQuery::from_static(
841 "/nominal.streaming_connection_service.v1.StreamingConnectionService/StartStream",
842 );
843 let mut req = request.into_request();
844 req.extensions_mut()
845 .insert(
846 GrpcMethod::new(
847 "nominal.streaming_connection_service.v1.StreamingConnectionService",
848 "StartStream",
849 ),
850 );
851 self.inner.unary(req, path, codec).await
852 }
853 pub async fn stop_stream(
855 &mut self,
856 request: impl tonic::IntoRequest<super::StopStreamRequest>,
857 ) -> std::result::Result<
858 tonic::Response<super::StopStreamResponse>,
859 tonic::Status,
860 > {
861 self.inner
862 .ready()
863 .await
864 .map_err(|e| {
865 tonic::Status::unknown(
866 format!("Service was not ready: {}", e.into()),
867 )
868 })?;
869 let codec = tonic::codec::ProstCodec::default();
870 let path = http::uri::PathAndQuery::from_static(
871 "/nominal.streaming_connection_service.v1.StreamingConnectionService/StopStream",
872 );
873 let mut req = request.into_request();
874 req.extensions_mut()
875 .insert(
876 GrpcMethod::new(
877 "nominal.streaming_connection_service.v1.StreamingConnectionService",
878 "StopStream",
879 ),
880 );
881 self.inner.unary(req, path, codec).await
882 }
883 }
884}