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 Basic256Sha256 = 2,
215}
216impl OpcSecurityPolicy {
217 pub fn as_str_name(&self) -> &'static str {
222 match self {
223 Self::Unspecified => "OPC_SECURITY_POLICY_UNSPECIFIED",
224 Self::None => "NONE",
225 Self::Basic256Sha256 => "BASIC_256_SHA_256",
226 }
227 }
228 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
230 match value {
231 "OPC_SECURITY_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
232 "NONE" => Some(Self::None),
233 "BASIC_256_SHA_256" => Some(Self::Basic256Sha256),
234 _ => None,
235 }
236 }
237}
238#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
239#[repr(i32)]
240pub enum OpcUaReferenceExplorationType {
241 Unspecified = 0,
242 Organizes = 1,
243 HierarchicalReferences = 2,
244}
245impl OpcUaReferenceExplorationType {
246 pub fn as_str_name(&self) -> &'static str {
251 match self {
252 Self::Unspecified => "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED",
253 Self::Organizes => "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES",
254 Self::HierarchicalReferences => {
255 "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES"
256 }
257 }
258 }
259 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
261 match value {
262 "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
263 "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES" => Some(Self::Organizes),
264 "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES" => {
265 Some(Self::HierarchicalReferences)
266 }
267 _ => None,
268 }
269 }
270}
271#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
272#[repr(i32)]
273pub enum OpcUaUnknownDataTypeHandling {
274 Unspecified = 0,
275 Error = 1,
277 TreatAsDouble = 2,
279 TreatAsString = 3,
281}
282impl OpcUaUnknownDataTypeHandling {
283 pub fn as_str_name(&self) -> &'static str {
288 match self {
289 Self::Unspecified => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED",
290 Self::Error => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR",
291 Self::TreatAsDouble => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE",
292 Self::TreatAsString => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING",
293 }
294 }
295 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
297 match value {
298 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
299 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR" => Some(Self::Error),
300 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE" => {
301 Some(Self::TreatAsDouble)
302 }
303 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING" => {
304 Some(Self::TreatAsString)
305 }
306 _ => None,
307 }
308 }
309}
310#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
311#[repr(i32)]
312pub enum OpcUaFailedMonitorHandling {
313 Unspecified = 0,
314 Error = 1,
315 Ignore = 2,
316}
317impl OpcUaFailedMonitorHandling {
318 pub fn as_str_name(&self) -> &'static str {
323 match self {
324 Self::Unspecified => "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED",
325 Self::Error => "OPC_UA_FAILED_MONITOR_HANDLING_ERROR",
326 Self::Ignore => "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE",
327 }
328 }
329 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
331 match value {
332 "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
333 "OPC_UA_FAILED_MONITOR_HANDLING_ERROR" => Some(Self::Error),
334 "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE" => Some(Self::Ignore),
335 _ => None,
336 }
337 }
338}
339#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
340#[repr(i32)]
341pub enum OpcUaDataChangeTrigger {
342 Unspecified = 0,
343 StatusOnly = 1,
344 StatusValue = 2,
345 StatusValueTimestamp = 3,
346}
347impl OpcUaDataChangeTrigger {
348 pub fn as_str_name(&self) -> &'static str {
353 match self {
354 Self::Unspecified => "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED",
355 Self::StatusOnly => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY",
356 Self::StatusValue => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE",
357 Self::StatusValueTimestamp => {
358 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP"
359 }
360 }
361 }
362 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
364 match value {
365 "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
366 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY" => Some(Self::StatusOnly),
367 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE" => Some(Self::StatusValue),
368 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP" => {
369 Some(Self::StatusValueTimestamp)
370 }
371 _ => None,
372 }
373 }
374}
375#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
376#[repr(i32)]
377pub enum OpcUaDeadbandType {
378 Unspecified = 0,
379 None = 1,
380 Absolute = 2,
381 Percent = 3,
382}
383impl OpcUaDeadbandType {
384 pub fn as_str_name(&self) -> &'static str {
389 match self {
390 Self::Unspecified => "OPC_UA_DEADBAND_TYPE_UNSPECIFIED",
391 Self::None => "OPC_UA_DEADBAND_TYPE_NONE",
392 Self::Absolute => "OPC_UA_DEADBAND_TYPE_ABSOLUTE",
393 Self::Percent => "OPC_UA_DEADBAND_TYPE_PERCENT",
394 }
395 }
396 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
398 match value {
399 "OPC_UA_DEADBAND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
400 "OPC_UA_DEADBAND_TYPE_NONE" => Some(Self::None),
401 "OPC_UA_DEADBAND_TYPE_ABSOLUTE" => Some(Self::Absolute),
402 "OPC_UA_DEADBAND_TYPE_PERCENT" => Some(Self::Percent),
403 _ => None,
404 }
405 }
406}
407#[derive(Clone, PartialEq, ::prost::Message)]
409pub struct CreateStreamingConnectionRequest {
410 #[prost(string, tag = "1")]
411 pub name: ::prost::alloc::string::String,
412 #[prost(string, optional, tag = "2")]
413 pub description: ::core::option::Option<::prost::alloc::string::String>,
414 #[prost(message, optional, tag = "3")]
415 pub connection_details: ::core::option::Option<StreamingConnectionDetails>,
416 #[prost(string, optional, tag = "4")]
417 pub workspace_rid: ::core::option::Option<::prost::alloc::string::String>,
418}
419#[derive(Clone, PartialEq, ::prost::Message)]
421pub struct CreateStreamingConnectionResponse {
422 #[prost(string, tag = "1")]
423 pub streaming_connection_rid: ::prost::alloc::string::String,
424}
425#[derive(Clone, Copy, PartialEq, ::prost::Message)]
427pub struct StopStreamResponse {
428 #[prost(bool, tag = "1")]
429 pub success: bool,
430}
431#[derive(Clone, Copy, PartialEq, ::prost::Message)]
432pub struct StartStreamResponse {
433 #[prost(bool, tag = "1")]
434 pub success: bool,
435}
436#[derive(Clone, PartialEq, ::prost::Message)]
438pub struct StreamingConnection {
439 #[prost(string, tag = "1")]
440 pub streaming_connection_rid: ::prost::alloc::string::String,
441 #[prost(string, tag = "2")]
442 pub name: ::prost::alloc::string::String,
443 #[prost(string, optional, tag = "3")]
444 pub description: ::core::option::Option<::prost::alloc::string::String>,
445 #[prost(message, optional, tag = "4")]
446 pub connection_details: ::core::option::Option<StreamingConnectionDetails>,
447 #[prost(enumeration = "StreamingConnectionStatus", tag = "6")]
448 pub status: i32,
449 #[prost(message, optional, tag = "7")]
450 pub created_at: ::core::option::Option<
451 super::super::super::google::protobuf::Timestamp,
452 >,
453}
454#[derive(Clone, PartialEq, ::prost::Message)]
456pub struct StreamingConnectionDetails {
457 #[prost(
459 oneof = "streaming_connection_details::StreamingConnectionDetails",
460 tags = "1"
461 )]
462 pub streaming_connection_details: ::core::option::Option<
463 streaming_connection_details::StreamingConnectionDetails,
464 >,
465}
466pub mod streaming_connection_details {
468 #[derive(Clone, PartialEq, ::prost::Oneof)]
470 pub enum StreamingConnectionDetails {
471 #[prost(message, tag = "1")]
472 OpcUa(super::OpcUaConnectionDetails),
473 }
474}
475#[derive(Clone, PartialEq, ::prost::Message)]
476pub struct StreamingScrapingConfig {
477 #[prost(oneof = "streaming_scraping_config::StreamingScrapingConfig", tags = "1")]
479 pub streaming_scraping_config: ::core::option::Option<
480 streaming_scraping_config::StreamingScrapingConfig,
481 >,
482}
483pub mod streaming_scraping_config {
485 #[derive(Clone, PartialEq, ::prost::Oneof)]
487 pub enum StreamingScrapingConfig {
488 #[prost(message, tag = "1")]
489 OpcUa(super::OpcUaScrapingConfig),
490 }
491}
492#[derive(Clone, PartialEq, ::prost::Message)]
493pub struct GetStreamingConnectionRequest {
494 #[prost(string, tag = "1")]
495 pub streaming_connection_rid: ::prost::alloc::string::String,
496}
497#[derive(Clone, PartialEq, ::prost::Message)]
498pub struct GetStreamingConnectionResponse {
499 #[prost(message, optional, tag = "1")]
500 pub streaming_connection: ::core::option::Option<StreamingConnection>,
501}
502#[derive(Clone, PartialEq, ::prost::Message)]
503pub struct ListStreamingConnectionsRequest {
504 #[prost(string, repeated, tag = "1")]
505 pub workspace_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
506}
507#[derive(Clone, PartialEq, ::prost::Message)]
508pub struct ListStreamingConnectionsResponse {
509 #[prost(message, repeated, tag = "1")]
510 pub streaming_connections: ::prost::alloc::vec::Vec<StreamingConnection>,
511}
512#[derive(Clone, PartialEq, ::prost::Message)]
513pub struct UpdateStreamingConnectionStatusRequest {
514 #[prost(string, tag = "1")]
515 pub streaming_connection_rid: ::prost::alloc::string::String,
516 #[prost(enumeration = "StreamingConnectionStatus", tag = "2")]
517 pub status: i32,
518}
519#[derive(Clone, PartialEq, ::prost::Message)]
520pub struct UpdateStreamingConnectionStatusResponse {
521 #[prost(message, optional, tag = "1")]
522 pub streaming_connection: ::core::option::Option<StreamingConnection>,
523}
524#[derive(Clone, PartialEq, ::prost::Message)]
525pub struct StartStreamRequest {
526 #[prost(string, tag = "1")]
527 pub streaming_connection_rid: ::prost::alloc::string::String,
528 #[prost(message, optional, tag = "2")]
529 pub scraping_config: ::core::option::Option<StreamingScrapingConfig>,
530 #[prost(string, tag = "3")]
531 pub target_dataset_rid: ::prost::alloc::string::String,
532}
533#[derive(Clone, PartialEq, ::prost::Message)]
534pub struct StopStreamRequest {
535 #[prost(string, tag = "1")]
536 pub streaming_connection_rid: ::prost::alloc::string::String,
537}
538#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
540#[repr(i32)]
541pub enum StreamingConnectionErrorType {
542 Unspecified = 0,
543 ConnectionNotFound = 1,
544 StreamingConnectionAlreadyRunning = 2,
545}
546impl StreamingConnectionErrorType {
547 pub fn as_str_name(&self) -> &'static str {
552 match self {
553 Self::Unspecified => "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED",
554 Self::ConnectionNotFound => {
555 "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND"
556 }
557 Self::StreamingConnectionAlreadyRunning => {
558 "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING"
559 }
560 }
561 }
562 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
564 match value {
565 "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
566 "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND" => {
567 Some(Self::ConnectionNotFound)
568 }
569 "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING" => {
570 Some(Self::StreamingConnectionAlreadyRunning)
571 }
572 _ => None,
573 }
574 }
575}
576#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
579#[repr(i32)]
580pub enum StreamingConnectionStatus {
581 Unspecified = 0,
582 Connected = 1,
583 Disconnected = 2,
584}
585impl StreamingConnectionStatus {
586 pub fn as_str_name(&self) -> &'static str {
591 match self {
592 Self::Unspecified => "STREAMING_CONNECTION_STATUS_UNSPECIFIED",
593 Self::Connected => "CONNECTED",
594 Self::Disconnected => "DISCONNECTED",
595 }
596 }
597 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
599 match value {
600 "STREAMING_CONNECTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
601 "CONNECTED" => Some(Self::Connected),
602 "DISCONNECTED" => Some(Self::Disconnected),
603 _ => None,
604 }
605 }
606}
607pub mod streaming_connection_service_client {
609 #![allow(
610 unused_variables,
611 dead_code,
612 missing_docs,
613 clippy::wildcard_imports,
614 clippy::let_unit_value,
615 )]
616 use tonic::codegen::*;
617 use tonic::codegen::http::Uri;
618 #[derive(Debug, Clone)]
621 pub struct StreamingConnectionServiceClient<T> {
622 inner: tonic::client::Grpc<T>,
623 }
624 impl StreamingConnectionServiceClient<tonic::transport::Channel> {
625 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
627 where
628 D: TryInto<tonic::transport::Endpoint>,
629 D::Error: Into<StdError>,
630 {
631 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
632 Ok(Self::new(conn))
633 }
634 }
635 impl<T> StreamingConnectionServiceClient<T>
636 where
637 T: tonic::client::GrpcService<tonic::body::Body>,
638 T::Error: Into<StdError>,
639 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
640 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
641 {
642 pub fn new(inner: T) -> Self {
643 let inner = tonic::client::Grpc::new(inner);
644 Self { inner }
645 }
646 pub fn with_origin(inner: T, origin: Uri) -> Self {
647 let inner = tonic::client::Grpc::with_origin(inner, origin);
648 Self { inner }
649 }
650 pub fn with_interceptor<F>(
651 inner: T,
652 interceptor: F,
653 ) -> StreamingConnectionServiceClient<InterceptedService<T, F>>
654 where
655 F: tonic::service::Interceptor,
656 T::ResponseBody: Default,
657 T: tonic::codegen::Service<
658 http::Request<tonic::body::Body>,
659 Response = http::Response<
660 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
661 >,
662 >,
663 <T as tonic::codegen::Service<
664 http::Request<tonic::body::Body>,
665 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
666 {
667 StreamingConnectionServiceClient::new(
668 InterceptedService::new(inner, interceptor),
669 )
670 }
671 #[must_use]
676 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
677 self.inner = self.inner.send_compressed(encoding);
678 self
679 }
680 #[must_use]
682 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
683 self.inner = self.inner.accept_compressed(encoding);
684 self
685 }
686 #[must_use]
690 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
691 self.inner = self.inner.max_decoding_message_size(limit);
692 self
693 }
694 #[must_use]
698 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
699 self.inner = self.inner.max_encoding_message_size(limit);
700 self
701 }
702 pub async fn create_streaming_connection(
706 &mut self,
707 request: impl tonic::IntoRequest<super::CreateStreamingConnectionRequest>,
708 ) -> std::result::Result<
709 tonic::Response<super::CreateStreamingConnectionResponse>,
710 tonic::Status,
711 > {
712 self.inner
713 .ready()
714 .await
715 .map_err(|e| {
716 tonic::Status::unknown(
717 format!("Service was not ready: {}", e.into()),
718 )
719 })?;
720 let codec = tonic::codec::ProstCodec::default();
721 let path = http::uri::PathAndQuery::from_static(
722 "/nominal.streaming_connection_service.v1.StreamingConnectionService/CreateStreamingConnection",
723 );
724 let mut req = request.into_request();
725 req.extensions_mut()
726 .insert(
727 GrpcMethod::new(
728 "nominal.streaming_connection_service.v1.StreamingConnectionService",
729 "CreateStreamingConnection",
730 ),
731 );
732 self.inner.unary(req, path, codec).await
733 }
734 pub async fn get_streaming_connection(
736 &mut self,
737 request: impl tonic::IntoRequest<super::GetStreamingConnectionRequest>,
738 ) -> std::result::Result<
739 tonic::Response<super::GetStreamingConnectionResponse>,
740 tonic::Status,
741 > {
742 self.inner
743 .ready()
744 .await
745 .map_err(|e| {
746 tonic::Status::unknown(
747 format!("Service was not ready: {}", e.into()),
748 )
749 })?;
750 let codec = tonic::codec::ProstCodec::default();
751 let path = http::uri::PathAndQuery::from_static(
752 "/nominal.streaming_connection_service.v1.StreamingConnectionService/GetStreamingConnection",
753 );
754 let mut req = request.into_request();
755 req.extensions_mut()
756 .insert(
757 GrpcMethod::new(
758 "nominal.streaming_connection_service.v1.StreamingConnectionService",
759 "GetStreamingConnection",
760 ),
761 );
762 self.inner.unary(req, path, codec).await
763 }
764 pub async fn list_streaming_connections(
766 &mut self,
767 request: impl tonic::IntoRequest<super::ListStreamingConnectionsRequest>,
768 ) -> std::result::Result<
769 tonic::Response<super::ListStreamingConnectionsResponse>,
770 tonic::Status,
771 > {
772 self.inner
773 .ready()
774 .await
775 .map_err(|e| {
776 tonic::Status::unknown(
777 format!("Service was not ready: {}", e.into()),
778 )
779 })?;
780 let codec = tonic::codec::ProstCodec::default();
781 let path = http::uri::PathAndQuery::from_static(
782 "/nominal.streaming_connection_service.v1.StreamingConnectionService/ListStreamingConnections",
783 );
784 let mut req = request.into_request();
785 req.extensions_mut()
786 .insert(
787 GrpcMethod::new(
788 "nominal.streaming_connection_service.v1.StreamingConnectionService",
789 "ListStreamingConnections",
790 ),
791 );
792 self.inner.unary(req, path, codec).await
793 }
794 pub async fn update_streaming_connection_status(
796 &mut self,
797 request: impl tonic::IntoRequest<
798 super::UpdateStreamingConnectionStatusRequest,
799 >,
800 ) -> std::result::Result<
801 tonic::Response<super::UpdateStreamingConnectionStatusResponse>,
802 tonic::Status,
803 > {
804 self.inner
805 .ready()
806 .await
807 .map_err(|e| {
808 tonic::Status::unknown(
809 format!("Service was not ready: {}", e.into()),
810 )
811 })?;
812 let codec = tonic::codec::ProstCodec::default();
813 let path = http::uri::PathAndQuery::from_static(
814 "/nominal.streaming_connection_service.v1.StreamingConnectionService/UpdateStreamingConnectionStatus",
815 );
816 let mut req = request.into_request();
817 req.extensions_mut()
818 .insert(
819 GrpcMethod::new(
820 "nominal.streaming_connection_service.v1.StreamingConnectionService",
821 "UpdateStreamingConnectionStatus",
822 ),
823 );
824 self.inner.unary(req, path, codec).await
825 }
826 pub async fn start_stream(
828 &mut self,
829 request: impl tonic::IntoRequest<super::StartStreamRequest>,
830 ) -> std::result::Result<
831 tonic::Response<super::StartStreamResponse>,
832 tonic::Status,
833 > {
834 self.inner
835 .ready()
836 .await
837 .map_err(|e| {
838 tonic::Status::unknown(
839 format!("Service was not ready: {}", e.into()),
840 )
841 })?;
842 let codec = tonic::codec::ProstCodec::default();
843 let path = http::uri::PathAndQuery::from_static(
844 "/nominal.streaming_connection_service.v1.StreamingConnectionService/StartStream",
845 );
846 let mut req = request.into_request();
847 req.extensions_mut()
848 .insert(
849 GrpcMethod::new(
850 "nominal.streaming_connection_service.v1.StreamingConnectionService",
851 "StartStream",
852 ),
853 );
854 self.inner.unary(req, path, codec).await
855 }
856 pub async fn stop_stream(
858 &mut self,
859 request: impl tonic::IntoRequest<super::StopStreamRequest>,
860 ) -> std::result::Result<
861 tonic::Response<super::StopStreamResponse>,
862 tonic::Status,
863 > {
864 self.inner
865 .ready()
866 .await
867 .map_err(|e| {
868 tonic::Status::unknown(
869 format!("Service was not ready: {}", e.into()),
870 )
871 })?;
872 let codec = tonic::codec::ProstCodec::default();
873 let path = http::uri::PathAndQuery::from_static(
874 "/nominal.streaming_connection_service.v1.StreamingConnectionService/StopStream",
875 );
876 let mut req = request.into_request();
877 req.extensions_mut()
878 .insert(
879 GrpcMethod::new(
880 "nominal.streaming_connection_service.v1.StreamingConnectionService",
881 "StopStream",
882 ),
883 );
884 self.inner.unary(req, path, codec).await
885 }
886 }
887}