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, Copy, PartialEq, ::prost::Message)]
22pub struct OpcAuthenticationConfigSecret {
23 #[prost(
25 oneof = "opc_authentication_config_secret::OpcAuthenticationConfig",
26 tags = "1"
27 )]
28 pub opc_authentication_config: ::core::option::Option<
29 opc_authentication_config_secret::OpcAuthenticationConfig,
30 >,
31}
32pub mod opc_authentication_config_secret {
34 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
36 pub enum OpcAuthenticationConfig {
37 #[prost(message, tag = "1")]
38 Anonymous(super::super::super::super::google::protobuf::Empty),
39 }
40}
41#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct OpcIdentifierValue {
44 #[prost(oneof = "opc_identifier_value::OpcIdentifierValue", tags = "1, 2")]
45 pub opc_identifier_value: ::core::option::Option<
46 opc_identifier_value::OpcIdentifierValue,
47 >,
48}
49pub mod opc_identifier_value {
51 #[derive(Clone, PartialEq, ::prost::Oneof)]
52 pub enum OpcIdentifierValue {
53 #[prost(int32, tag = "1")]
54 Numeric(i32),
55 #[prost(string, tag = "2")]
56 String(::prost::alloc::string::String),
57 }
58}
59#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct OpcNode {
62 #[prost(uint32, optional, tag = "1")]
63 pub namespace: ::core::option::Option<u32>,
64 #[prost(message, optional, tag = "2")]
65 pub identifier: ::core::option::Option<OpcIdentifierValue>,
66}
67#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct OpcUaChannelNamingConvention {
70 #[prost(
71 oneof = "opc_ua_channel_naming_convention::NamingConvention",
72 tags = "1, 2, 3, 4"
73 )]
74 pub naming_convention: ::core::option::Option<
75 opc_ua_channel_naming_convention::NamingConvention,
76 >,
77}
78pub mod opc_ua_channel_naming_convention {
80 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
81 pub struct OpcUaNodeId {}
82 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
83 pub struct OpcUaBrowseName {}
84 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
85 pub struct OpcUaDisplayName {}
86 #[derive(Clone, PartialEq, ::prost::Message)]
88 pub struct OpcUaFullPath {
89 #[prost(message, repeated, tag = "1")]
91 pub root_nodes: ::prost::alloc::vec::Vec<super::OpcNode>,
92 #[prost(string, tag = "2")]
94 pub delimiter: ::prost::alloc::string::String,
95 }
96 #[derive(Clone, PartialEq, ::prost::Oneof)]
97 pub enum NamingConvention {
98 #[prost(message, tag = "1")]
100 NodeId(OpcUaNodeId),
101 #[prost(message, tag = "2")]
103 BrowseName(OpcUaBrowseName),
104 #[prost(message, tag = "3")]
106 DisplayName(OpcUaDisplayName),
107 #[prost(message, tag = "4")]
109 FullPath(OpcUaFullPath),
110 }
111}
112#[derive(Clone, PartialEq, ::prost::Message)]
114pub struct OpcUaConnectionDetails {
115 #[prost(string, tag = "1")]
116 pub uri: ::prost::alloc::string::String,
117 #[prost(enumeration = "OpcSecurityPolicy", tag = "2")]
118 pub security_policy: i32,
119 #[prost(message, optional, tag = "3")]
120 pub authentication_config: ::core::option::Option<OpcAuthenticationConfig>,
121}
122#[derive(Clone, PartialEq, ::prost::Message)]
124pub struct OpcUaConnectionDetailsSecret {
125 #[prost(string, tag = "1")]
126 pub uri: ::prost::alloc::string::String,
127 #[prost(enumeration = "OpcSecurityPolicy", tag = "2")]
128 pub security_policy: i32,
129 #[prost(message, optional, tag = "3")]
130 pub authentication_config: ::core::option::Option<OpcAuthenticationConfigSecret>,
131}
132#[derive(Clone, PartialEq, ::prost::Message)]
133pub struct OpcUaTraversalConfig {
134 #[prost(message, repeated, tag = "1")]
137 pub root_nodes: ::prost::alloc::vec::Vec<OpcNode>,
138 #[prost(message, repeated, tag = "2")]
140 pub skip_nodes: ::prost::alloc::vec::Vec<OpcNode>,
141 #[prost(enumeration = "OpcUaReferenceExplorationType", tag = "3")]
143 pub reference_exploration_type: i32,
144}
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct OpcUaDirectNodeSubscription {
147 #[prost(message, repeated, tag = "1")]
148 pub nodes: ::prost::alloc::vec::Vec<OpcNode>,
149}
150#[derive(Clone, PartialEq, ::prost::Message)]
151pub struct OpcUaNodeExplorationConfig {
152 #[prost(
153 oneof = "opc_ua_node_exploration_config::OpcUaNodeExplorationConfig",
154 tags = "1, 2"
155 )]
156 pub opc_ua_node_exploration_config: ::core::option::Option<
157 opc_ua_node_exploration_config::OpcUaNodeExplorationConfig,
158 >,
159}
160pub mod opc_ua_node_exploration_config {
162 #[derive(Clone, PartialEq, ::prost::Oneof)]
163 pub enum OpcUaNodeExplorationConfig {
164 #[prost(message, tag = "1")]
165 OpcUaTraversalConfig(super::OpcUaTraversalConfig),
166 #[prost(message, tag = "2")]
167 OpcUaDirectNodeSubscription(super::OpcUaDirectNodeSubscription),
168 }
169}
170#[derive(Clone, Copy, PartialEq, ::prost::Message)]
171pub struct OpcUaTimestampHandling {
172 #[prost(oneof = "opc_ua_timestamp_handling::TimestampType", tags = "1, 2, 3")]
173 pub timestamp_type: ::core::option::Option<opc_ua_timestamp_handling::TimestampType>,
174}
175pub mod opc_ua_timestamp_handling {
177 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
179 pub struct OpcUaServerTime {}
180 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
182 pub struct OpcUaSourceTime {}
183 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
186 pub struct OpcUaRelativeTimestamp {
187 #[prost(message, optional, tag = "1")]
188 pub offset: ::core::option::Option<
189 super::super::super::super::google::protobuf::Timestamp,
190 >,
191 }
192 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
193 pub enum TimestampType {
194 #[prost(message, tag = "1")]
195 Server(OpcUaServerTime),
196 #[prost(message, tag = "2")]
197 Source(OpcUaSourceTime),
198 #[prost(message, tag = "3")]
199 Relative(OpcUaRelativeTimestamp),
200 }
201}
202#[derive(Clone, Copy, PartialEq, ::prost::Message)]
203pub struct OpcUaDataChangeFilter {
204 #[prost(enumeration = "OpcUaDataChangeTrigger", tag = "1")]
206 pub trigger: i32,
207 #[prost(enumeration = "OpcUaDeadbandType", tag = "2")]
208 pub deadband_type: i32,
209 #[prost(double, tag = "3")]
210 pub deadband_value: f64,
211}
212#[derive(Clone, PartialEq, ::prost::Message)]
214pub struct OpcUaScrapingConfig {
215 #[prost(message, optional, tag = "1")]
216 pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
217 #[prost(string, tag = "2")]
219 pub unit_node_name: ::prost::alloc::string::String,
220 #[prost(message, optional, tag = "3")]
221 pub channel_naming_convention: ::core::option::Option<OpcUaChannelNamingConvention>,
222 #[prost(bool, tag = "4")]
224 pub override_host: bool,
225 #[prost(enumeration = "OpcUaUnknownDataTypeHandling", tag = "5")]
227 pub unknown_data_type_handling: i32,
228 #[prost(enumeration = "OpcUaFailedMonitorHandling", tag = "6")]
230 pub failed_monitor_handling: i32,
231 #[prost(message, optional, tag = "7")]
233 pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
234 #[prost(message, optional, tag = "8")]
236 pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
237}
238#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
241#[repr(i32)]
242pub enum OpcSecurityPolicy {
243 Unspecified = 0,
244 None = 1,
245 Basic256Sha256 = 2,
246}
247impl OpcSecurityPolicy {
248 pub fn as_str_name(&self) -> &'static str {
253 match self {
254 Self::Unspecified => "OPC_SECURITY_POLICY_UNSPECIFIED",
255 Self::None => "NONE",
256 Self::Basic256Sha256 => "BASIC_256_SHA_256",
257 }
258 }
259 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
261 match value {
262 "OPC_SECURITY_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
263 "NONE" => Some(Self::None),
264 "BASIC_256_SHA_256" => Some(Self::Basic256Sha256),
265 _ => None,
266 }
267 }
268}
269#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
270#[repr(i32)]
271pub enum OpcUaReferenceExplorationType {
272 Unspecified = 0,
273 Organizes = 1,
274 HierarchicalReferences = 2,
275}
276impl OpcUaReferenceExplorationType {
277 pub fn as_str_name(&self) -> &'static str {
282 match self {
283 Self::Unspecified => "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED",
284 Self::Organizes => "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES",
285 Self::HierarchicalReferences => {
286 "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES"
287 }
288 }
289 }
290 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
292 match value {
293 "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
294 "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES" => Some(Self::Organizes),
295 "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES" => {
296 Some(Self::HierarchicalReferences)
297 }
298 _ => None,
299 }
300 }
301}
302#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
303#[repr(i32)]
304pub enum OpcUaUnknownDataTypeHandling {
305 Unspecified = 0,
306 Error = 1,
308 TreatAsDouble = 2,
310 TreatAsString = 3,
312}
313impl OpcUaUnknownDataTypeHandling {
314 pub fn as_str_name(&self) -> &'static str {
319 match self {
320 Self::Unspecified => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED",
321 Self::Error => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR",
322 Self::TreatAsDouble => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE",
323 Self::TreatAsString => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING",
324 }
325 }
326 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
328 match value {
329 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
330 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR" => Some(Self::Error),
331 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE" => {
332 Some(Self::TreatAsDouble)
333 }
334 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING" => {
335 Some(Self::TreatAsString)
336 }
337 _ => None,
338 }
339 }
340}
341#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
342#[repr(i32)]
343pub enum OpcUaFailedMonitorHandling {
344 Unspecified = 0,
345 Error = 1,
346 Ignore = 2,
347}
348impl OpcUaFailedMonitorHandling {
349 pub fn as_str_name(&self) -> &'static str {
354 match self {
355 Self::Unspecified => "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED",
356 Self::Error => "OPC_UA_FAILED_MONITOR_HANDLING_ERROR",
357 Self::Ignore => "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE",
358 }
359 }
360 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
362 match value {
363 "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
364 "OPC_UA_FAILED_MONITOR_HANDLING_ERROR" => Some(Self::Error),
365 "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE" => Some(Self::Ignore),
366 _ => None,
367 }
368 }
369}
370#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
371#[repr(i32)]
372pub enum OpcUaDataChangeTrigger {
373 Unspecified = 0,
374 StatusOnly = 1,
375 StatusValue = 2,
376 StatusValueTimestamp = 3,
377}
378impl OpcUaDataChangeTrigger {
379 pub fn as_str_name(&self) -> &'static str {
384 match self {
385 Self::Unspecified => "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED",
386 Self::StatusOnly => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY",
387 Self::StatusValue => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE",
388 Self::StatusValueTimestamp => {
389 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP"
390 }
391 }
392 }
393 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
395 match value {
396 "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
397 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY" => Some(Self::StatusOnly),
398 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE" => Some(Self::StatusValue),
399 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP" => {
400 Some(Self::StatusValueTimestamp)
401 }
402 _ => None,
403 }
404 }
405}
406#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
407#[repr(i32)]
408pub enum OpcUaDeadbandType {
409 Unspecified = 0,
410 None = 1,
411 Absolute = 2,
412 Percent = 3,
413}
414impl OpcUaDeadbandType {
415 pub fn as_str_name(&self) -> &'static str {
420 match self {
421 Self::Unspecified => "OPC_UA_DEADBAND_TYPE_UNSPECIFIED",
422 Self::None => "OPC_UA_DEADBAND_TYPE_NONE",
423 Self::Absolute => "OPC_UA_DEADBAND_TYPE_ABSOLUTE",
424 Self::Percent => "OPC_UA_DEADBAND_TYPE_PERCENT",
425 }
426 }
427 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
429 match value {
430 "OPC_UA_DEADBAND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
431 "OPC_UA_DEADBAND_TYPE_NONE" => Some(Self::None),
432 "OPC_UA_DEADBAND_TYPE_ABSOLUTE" => Some(Self::Absolute),
433 "OPC_UA_DEADBAND_TYPE_PERCENT" => Some(Self::Percent),
434 _ => None,
435 }
436 }
437}
438#[derive(Clone, PartialEq, ::prost::Message)]
440pub struct CreateStreamingConnectionRequest {
441 #[prost(string, tag = "1")]
442 pub name: ::prost::alloc::string::String,
443 #[prost(string, optional, tag = "2")]
444 pub description: ::core::option::Option<::prost::alloc::string::String>,
445 #[prost(message, optional, tag = "3")]
446 pub connection_details: ::core::option::Option<StreamingConnectionDetails>,
447 #[prost(string, optional, tag = "4")]
448 pub workspace_rid: ::core::option::Option<::prost::alloc::string::String>,
449}
450#[derive(Clone, PartialEq, ::prost::Message)]
452pub struct CreateStreamingConnectionResponse {
453 #[prost(string, tag = "1")]
454 pub streaming_connection_rid: ::prost::alloc::string::String,
455}
456#[derive(Clone, Copy, PartialEq, ::prost::Message)]
458pub struct StopStreamResponse {
459 #[prost(bool, tag = "1")]
460 pub success: bool,
461}
462#[derive(Clone, Copy, PartialEq, ::prost::Message)]
463pub struct StartStreamResponse {
464 #[prost(bool, tag = "1")]
465 pub success: bool,
466}
467#[derive(Clone, PartialEq, ::prost::Message)]
469pub struct StreamingConnection {
470 #[prost(string, tag = "1")]
471 pub streaming_connection_rid: ::prost::alloc::string::String,
472 #[prost(string, tag = "2")]
473 pub name: ::prost::alloc::string::String,
474 #[prost(string, optional, tag = "3")]
475 pub description: ::core::option::Option<::prost::alloc::string::String>,
476 #[prost(message, optional, tag = "4")]
477 pub connection_details: ::core::option::Option<StreamingConnectionDetailsSecret>,
478 #[prost(enumeration = "StreamingConnectionStatus", tag = "6")]
479 pub status: i32,
480 #[prost(message, optional, tag = "7")]
481 pub created_at: ::core::option::Option<
482 super::super::super::google::protobuf::Timestamp,
483 >,
484}
485#[derive(Clone, PartialEq, ::prost::Message)]
487pub struct StreamingConnectionDetails {
488 #[prost(
489 oneof = "streaming_connection_details::StreamingConnectionDetails",
490 tags = "1"
491 )]
492 pub streaming_connection_details: ::core::option::Option<
493 streaming_connection_details::StreamingConnectionDetails,
494 >,
495}
496pub mod streaming_connection_details {
498 #[derive(Clone, PartialEq, ::prost::Oneof)]
499 pub enum StreamingConnectionDetails {
500 #[prost(message, tag = "1")]
501 OpcUa(super::OpcUaConnectionDetails),
502 }
503}
504#[derive(Clone, PartialEq, ::prost::Message)]
506pub struct StreamingConnectionDetailsSecret {
507 #[prost(
508 oneof = "streaming_connection_details_secret::StreamingConnectionDetails",
509 tags = "1"
510 )]
511 pub streaming_connection_details: ::core::option::Option<
512 streaming_connection_details_secret::StreamingConnectionDetails,
513 >,
514}
515pub mod streaming_connection_details_secret {
517 #[derive(Clone, PartialEq, ::prost::Oneof)]
518 pub enum StreamingConnectionDetails {
519 #[prost(message, tag = "1")]
520 OpcUa(super::OpcUaConnectionDetailsSecret),
521 }
522}
523#[derive(Clone, PartialEq, ::prost::Message)]
525pub struct StreamingScrapingConfig {
526 #[prost(oneof = "streaming_scraping_config::StreamingScrapingConfig", tags = "1")]
527 pub streaming_scraping_config: ::core::option::Option<
528 streaming_scraping_config::StreamingScrapingConfig,
529 >,
530}
531pub mod streaming_scraping_config {
533 #[derive(Clone, PartialEq, ::prost::Oneof)]
534 pub enum StreamingScrapingConfig {
535 #[prost(message, tag = "1")]
536 OpcUa(super::OpcUaScrapingConfig),
537 }
538}
539#[derive(Clone, PartialEq, ::prost::Message)]
540pub struct GetStreamingConnectionRequest {
541 #[prost(string, tag = "1")]
542 pub streaming_connection_rid: ::prost::alloc::string::String,
543}
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct GetStreamingConnectionResponse {
546 #[prost(message, optional, tag = "1")]
547 pub streaming_connection: ::core::option::Option<StreamingConnection>,
548}
549#[derive(Clone, PartialEq, ::prost::Message)]
550pub struct ListStreamingConnectionsRequest {
551 #[prost(string, repeated, tag = "1")]
552 pub workspace_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
553}
554#[derive(Clone, PartialEq, ::prost::Message)]
555pub struct ListStreamingConnectionsResponse {
556 #[prost(message, repeated, tag = "1")]
557 pub streaming_connections: ::prost::alloc::vec::Vec<StreamingConnection>,
558}
559#[derive(Clone, PartialEq, ::prost::Message)]
560pub struct UpdateStreamingConnectionStatusRequest {
561 #[prost(string, tag = "1")]
562 pub streaming_connection_rid: ::prost::alloc::string::String,
563 #[prost(enumeration = "StreamingConnectionStatus", tag = "2")]
564 pub status: i32,
565}
566#[derive(Clone, PartialEq, ::prost::Message)]
567pub struct UpdateStreamingConnectionStatusResponse {
568 #[prost(message, optional, tag = "1")]
569 pub streaming_connection: ::core::option::Option<StreamingConnection>,
570}
571#[derive(Clone, PartialEq, ::prost::Message)]
572pub struct StartStreamRequest {
573 #[prost(string, tag = "1")]
574 pub streaming_connection_rid: ::prost::alloc::string::String,
575 #[prost(message, optional, tag = "2")]
576 pub scraping_config: ::core::option::Option<StreamingScrapingConfig>,
577 #[prost(string, tag = "3")]
578 pub target_dataset_rid: ::prost::alloc::string::String,
579}
580#[derive(Clone, PartialEq, ::prost::Message)]
581pub struct StopStreamRequest {
582 #[prost(string, tag = "1")]
583 pub streaming_connection_rid: ::prost::alloc::string::String,
584}
585#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
587#[repr(i32)]
588pub enum StreamingConnectionErrorType {
589 Unspecified = 0,
590 ConnectionNotFound = 1,
591 StreamingConnectionAlreadyRunning = 2,
592}
593impl StreamingConnectionErrorType {
594 pub fn as_str_name(&self) -> &'static str {
599 match self {
600 Self::Unspecified => "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED",
601 Self::ConnectionNotFound => {
602 "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND"
603 }
604 Self::StreamingConnectionAlreadyRunning => {
605 "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING"
606 }
607 }
608 }
609 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
611 match value {
612 "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
613 "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND" => {
614 Some(Self::ConnectionNotFound)
615 }
616 "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING" => {
617 Some(Self::StreamingConnectionAlreadyRunning)
618 }
619 _ => None,
620 }
621 }
622}
623#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
626#[repr(i32)]
627pub enum StreamingConnectionStatus {
628 Unspecified = 0,
629 Connected = 1,
630 Disconnected = 2,
631}
632impl StreamingConnectionStatus {
633 pub fn as_str_name(&self) -> &'static str {
638 match self {
639 Self::Unspecified => "STREAMING_CONNECTION_STATUS_UNSPECIFIED",
640 Self::Connected => "CONNECTED",
641 Self::Disconnected => "DISCONNECTED",
642 }
643 }
644 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
646 match value {
647 "STREAMING_CONNECTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
648 "CONNECTED" => Some(Self::Connected),
649 "DISCONNECTED" => Some(Self::Disconnected),
650 _ => None,
651 }
652 }
653}
654pub mod streaming_connection_service_client {
656 #![allow(
657 unused_variables,
658 dead_code,
659 missing_docs,
660 clippy::wildcard_imports,
661 clippy::let_unit_value,
662 )]
663 use tonic::codegen::*;
664 use tonic::codegen::http::Uri;
665 #[derive(Debug, Clone)]
668 pub struct StreamingConnectionServiceClient<T> {
669 inner: tonic::client::Grpc<T>,
670 }
671 impl StreamingConnectionServiceClient<tonic::transport::Channel> {
672 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
674 where
675 D: TryInto<tonic::transport::Endpoint>,
676 D::Error: Into<StdError>,
677 {
678 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
679 Ok(Self::new(conn))
680 }
681 }
682 impl<T> StreamingConnectionServiceClient<T>
683 where
684 T: tonic::client::GrpcService<tonic::body::Body>,
685 T::Error: Into<StdError>,
686 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
687 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
688 {
689 pub fn new(inner: T) -> Self {
690 let inner = tonic::client::Grpc::new(inner);
691 Self { inner }
692 }
693 pub fn with_origin(inner: T, origin: Uri) -> Self {
694 let inner = tonic::client::Grpc::with_origin(inner, origin);
695 Self { inner }
696 }
697 pub fn with_interceptor<F>(
698 inner: T,
699 interceptor: F,
700 ) -> StreamingConnectionServiceClient<InterceptedService<T, F>>
701 where
702 F: tonic::service::Interceptor,
703 T::ResponseBody: Default,
704 T: tonic::codegen::Service<
705 http::Request<tonic::body::Body>,
706 Response = http::Response<
707 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
708 >,
709 >,
710 <T as tonic::codegen::Service<
711 http::Request<tonic::body::Body>,
712 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
713 {
714 StreamingConnectionServiceClient::new(
715 InterceptedService::new(inner, interceptor),
716 )
717 }
718 #[must_use]
723 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
724 self.inner = self.inner.send_compressed(encoding);
725 self
726 }
727 #[must_use]
729 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
730 self.inner = self.inner.accept_compressed(encoding);
731 self
732 }
733 #[must_use]
737 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
738 self.inner = self.inner.max_decoding_message_size(limit);
739 self
740 }
741 #[must_use]
745 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
746 self.inner = self.inner.max_encoding_message_size(limit);
747 self
748 }
749 pub async fn create_streaming_connection(
753 &mut self,
754 request: impl tonic::IntoRequest<super::CreateStreamingConnectionRequest>,
755 ) -> std::result::Result<
756 tonic::Response<super::CreateStreamingConnectionResponse>,
757 tonic::Status,
758 > {
759 self.inner
760 .ready()
761 .await
762 .map_err(|e| {
763 tonic::Status::unknown(
764 format!("Service was not ready: {}", e.into()),
765 )
766 })?;
767 let codec = tonic::codec::ProstCodec::default();
768 let path = http::uri::PathAndQuery::from_static(
769 "/nominal.streaming_connection_service.v1.StreamingConnectionService/CreateStreamingConnection",
770 );
771 let mut req = request.into_request();
772 req.extensions_mut()
773 .insert(
774 GrpcMethod::new(
775 "nominal.streaming_connection_service.v1.StreamingConnectionService",
776 "CreateStreamingConnection",
777 ),
778 );
779 self.inner.unary(req, path, codec).await
780 }
781 pub async fn get_streaming_connection(
783 &mut self,
784 request: impl tonic::IntoRequest<super::GetStreamingConnectionRequest>,
785 ) -> std::result::Result<
786 tonic::Response<super::GetStreamingConnectionResponse>,
787 tonic::Status,
788 > {
789 self.inner
790 .ready()
791 .await
792 .map_err(|e| {
793 tonic::Status::unknown(
794 format!("Service was not ready: {}", e.into()),
795 )
796 })?;
797 let codec = tonic::codec::ProstCodec::default();
798 let path = http::uri::PathAndQuery::from_static(
799 "/nominal.streaming_connection_service.v1.StreamingConnectionService/GetStreamingConnection",
800 );
801 let mut req = request.into_request();
802 req.extensions_mut()
803 .insert(
804 GrpcMethod::new(
805 "nominal.streaming_connection_service.v1.StreamingConnectionService",
806 "GetStreamingConnection",
807 ),
808 );
809 self.inner.unary(req, path, codec).await
810 }
811 pub async fn list_streaming_connections(
813 &mut self,
814 request: impl tonic::IntoRequest<super::ListStreamingConnectionsRequest>,
815 ) -> std::result::Result<
816 tonic::Response<super::ListStreamingConnectionsResponse>,
817 tonic::Status,
818 > {
819 self.inner
820 .ready()
821 .await
822 .map_err(|e| {
823 tonic::Status::unknown(
824 format!("Service was not ready: {}", e.into()),
825 )
826 })?;
827 let codec = tonic::codec::ProstCodec::default();
828 let path = http::uri::PathAndQuery::from_static(
829 "/nominal.streaming_connection_service.v1.StreamingConnectionService/ListStreamingConnections",
830 );
831 let mut req = request.into_request();
832 req.extensions_mut()
833 .insert(
834 GrpcMethod::new(
835 "nominal.streaming_connection_service.v1.StreamingConnectionService",
836 "ListStreamingConnections",
837 ),
838 );
839 self.inner.unary(req, path, codec).await
840 }
841 pub async fn update_streaming_connection_status(
843 &mut self,
844 request: impl tonic::IntoRequest<
845 super::UpdateStreamingConnectionStatusRequest,
846 >,
847 ) -> std::result::Result<
848 tonic::Response<super::UpdateStreamingConnectionStatusResponse>,
849 tonic::Status,
850 > {
851 self.inner
852 .ready()
853 .await
854 .map_err(|e| {
855 tonic::Status::unknown(
856 format!("Service was not ready: {}", e.into()),
857 )
858 })?;
859 let codec = tonic::codec::ProstCodec::default();
860 let path = http::uri::PathAndQuery::from_static(
861 "/nominal.streaming_connection_service.v1.StreamingConnectionService/UpdateStreamingConnectionStatus",
862 );
863 let mut req = request.into_request();
864 req.extensions_mut()
865 .insert(
866 GrpcMethod::new(
867 "nominal.streaming_connection_service.v1.StreamingConnectionService",
868 "UpdateStreamingConnectionStatus",
869 ),
870 );
871 self.inner.unary(req, path, codec).await
872 }
873 pub async fn start_stream(
875 &mut self,
876 request: impl tonic::IntoRequest<super::StartStreamRequest>,
877 ) -> std::result::Result<
878 tonic::Response<super::StartStreamResponse>,
879 tonic::Status,
880 > {
881 self.inner
882 .ready()
883 .await
884 .map_err(|e| {
885 tonic::Status::unknown(
886 format!("Service was not ready: {}", e.into()),
887 )
888 })?;
889 let codec = tonic::codec::ProstCodec::default();
890 let path = http::uri::PathAndQuery::from_static(
891 "/nominal.streaming_connection_service.v1.StreamingConnectionService/StartStream",
892 );
893 let mut req = request.into_request();
894 req.extensions_mut()
895 .insert(
896 GrpcMethod::new(
897 "nominal.streaming_connection_service.v1.StreamingConnectionService",
898 "StartStream",
899 ),
900 );
901 self.inner.unary(req, path, codec).await
902 }
903 pub async fn stop_stream(
905 &mut self,
906 request: impl tonic::IntoRequest<super::StopStreamRequest>,
907 ) -> std::result::Result<
908 tonic::Response<super::StopStreamResponse>,
909 tonic::Status,
910 > {
911 self.inner
912 .ready()
913 .await
914 .map_err(|e| {
915 tonic::Status::unknown(
916 format!("Service was not ready: {}", e.into()),
917 )
918 })?;
919 let codec = tonic::codec::ProstCodec::default();
920 let path = http::uri::PathAndQuery::from_static(
921 "/nominal.streaming_connection_service.v1.StreamingConnectionService/StopStream",
922 );
923 let mut req = request.into_request();
924 req.extensions_mut()
925 .insert(
926 GrpcMethod::new(
927 "nominal.streaming_connection_service.v1.StreamingConnectionService",
928 "StopStream",
929 ),
930 );
931 self.inner.unary(req, path, codec).await
932 }
933 }
934}