nominal_api/proto/
nominal.streaming_connection_service.v1.rs

1// This file is @generated by prost-build.
2/// Authentication configuration for OPC-UA server connection
3#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct OpcAuthenticationConfig {
5    /// Authentication configuration for OPC-UA server connection
6    #[prost(oneof = "opc_authentication_config::OpcAuthenticationConfig", tags = "1")]
7    pub opc_authentication_config: ::core::option::Option<
8        opc_authentication_config::OpcAuthenticationConfig,
9    >,
10}
11/// Nested message and enum types in `OpcAuthenticationConfig`.
12pub mod opc_authentication_config {
13    /// Authentication configuration for OPC-UA server connection
14    #[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/// The identifier field for an OPC-UA node
21#[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}
28/// Nested message and enum types in `OpcIdentifierValue`.
29pub 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/// An OPC-UA node
39#[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/// How do you want to map the names of OPC-UA nodes to Nominal channels?
47#[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}
57/// Nested message and enum types in `OpcUaChannelNamingConvention`.
58pub 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    /// Configuration for full path naming convention
66    #[derive(Clone, PartialEq, ::prost::Message)]
67    pub struct OpcUaFullPath {
68        /// We will build path up to any of these nodes, or the Objects folder.
69        #[prost(message, repeated, tag = "1")]
70        pub root_nodes: ::prost::alloc::vec::Vec<super::OpcNode>,
71        /// Custom delimiter for path separation. Defaults to "/" if not specified.
72        #[prost(string, tag = "2")]
73        pub delimiter: ::prost::alloc::string::String,
74    }
75    #[derive(Clone, PartialEq, ::prost::Oneof)]
76    pub enum NamingConvention {
77        /// For example, "NodeId{ns=3;i=1010}"
78        #[prost(message, tag = "1")]
79        NodeId(OpcUaNodeId),
80        /// The "name" field under the "BrowseName" attribute
81        #[prost(message, tag = "2")]
82        BrowseName(OpcUaBrowseName),
83        /// The "text" field under the "DisplayName" attribute
84        #[prost(message, tag = "3")]
85        DisplayName(OpcUaDisplayName),
86        /// The full path of the node, separated by a delimiter. Use this setting for creating the hierarchical prefix tree.
87        #[prost(message, tag = "4")]
88        FullPath(OpcUaFullPath),
89    }
90}
91/// Configuration for connecting to an OPC-UA server
92#[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    /// Root nodes to subscribe to. For each node specified here, we will
104    /// subscribe to that node and all of its children.
105    #[prost(message, repeated, tag = "1")]
106    pub root_nodes: ::prost::alloc::vec::Vec<OpcNode>,
107    /// We will not subscribe to any of these nodes.
108    #[prost(message, repeated, tag = "2")]
109    pub skip_nodes: ::prost::alloc::vec::Vec<OpcNode>,
110    /// The type of references that we will follow when traversing the root nodes in the OPC UA server.
111    #[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}
129/// Nested message and enum types in `OpcUaNodeExplorationConfig`.
130pub 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}
144/// Nested message and enum types in `OpcUaTimestampHandling`.
145pub mod opc_ua_timestamp_handling {
146    /// Use the server timestamp <https://reference.opcfoundation.org/Core/Part4/v104/docs/7.7.4>
147    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
148    pub struct OpcUaServerTime {}
149    /// Use the source timestamp <https://reference.opcfoundation.org/Core/Part4/v104/docs/7.7.3>
150    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
151    pub struct OpcUaSourceTime {}
152    /// Use the server timestamp, but add an an optional offset. By default, the offset will be the time now.
153    /// This is useful for when the server starts at an epoch time of 0.
154    #[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    /// The trigger for the data change filter.
174    #[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/// Configuration for determining which nodes to scrape and how.
182#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct OpcUaScrapingConfig {
184    #[prost(message, optional, tag = "1")]
185    pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
186    /// The browse name of the node under which the unit is stored for the nodes we scrape.
187    #[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    /// If true, we will override the host and port of the OPC UA server with the host and port of the original server URL.
192    #[prost(bool, tag = "4")]
193    pub override_host: bool,
194    /// How we will handle unknown data types when we read them from the server
195    #[prost(enumeration = "OpcUaUnknownDataTypeHandling", tag = "5")]
196    pub unknown_data_type_handling: i32,
197    /// How to handle situations where there are failed monitors.
198    #[prost(enumeration = "OpcUaFailedMonitorHandling", tag = "6")]
199    pub failed_monitor_handling: i32,
200    /// What timestamps should we write for the channels?
201    #[prost(message, optional, tag = "7")]
202    pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
203    /// The data change filter to be applied for the monitored items in the subscription.
204    #[prost(message, optional, tag = "8")]
205    pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
206}
207/// Security policies supported for OPC-UA connections
208/// buf:lint:ignore ENUM_VALUE_PREFIX
209#[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    /// String value of the enum field names used in the ProtoBuf definition.
217    ///
218    /// The values are not transformed in any way and thus are considered stable
219    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
220    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    /// Creates an enum from field names used in the ProtoBuf definition.
227    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    /// String value of the enum field names used in the ProtoBuf definition.
244    ///
245    /// The values are not transformed in any way and thus are considered stable
246    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
247    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    /// Creates an enum from field names used in the ProtoBuf definition.
257    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    /// If we encounter an unknown data type, we will error out
273    Error = 1,
274    /// If we encounter an unknown data type, we will assume it is a double
275    TreatAsDouble = 2,
276    /// If we encounter an unknown data type, we will assume it is a string
277    TreatAsString = 3,
278}
279impl OpcUaUnknownDataTypeHandling {
280    /// String value of the enum field names used in the ProtoBuf definition.
281    ///
282    /// The values are not transformed in any way and thus are considered stable
283    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
284    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    /// Creates an enum from field names used in the ProtoBuf definition.
293    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    /// String value of the enum field names used in the ProtoBuf definition.
316    ///
317    /// The values are not transformed in any way and thus are considered stable
318    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
319    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    /// Creates an enum from field names used in the ProtoBuf definition.
327    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    /// String value of the enum field names used in the ProtoBuf definition.
346    ///
347    /// The values are not transformed in any way and thus are considered stable
348    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
349    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    /// Creates an enum from field names used in the ProtoBuf definition.
360    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    /// String value of the enum field names used in the ProtoBuf definition.
382    ///
383    /// The values are not transformed in any way and thus are considered stable
384    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
385    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    /// Creates an enum from field names used in the ProtoBuf definition.
394    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/// Request to create a new streaming connection
405#[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/// Response for creating a new streaming connection
417#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct CreateStreamingConnectionResponse {
419    #[prost(string, tag = "1")]
420    pub streaming_connection_rid: ::prost::alloc::string::String,
421}
422/// Response for stream operations
423#[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/// A configured streaming connection
434#[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/// Union type for different streaming connection types
452#[derive(Clone, PartialEq, ::prost::Message)]
453pub struct StreamingConnectionDetails {
454    /// Union type for different streaming connection types
455    #[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}
463/// Nested message and enum types in `StreamingConnectionDetails`.
464pub mod streaming_connection_details {
465    /// Union type for different streaming connection types
466    #[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    /// Union type for different streaming scraping types
475    #[prost(oneof = "streaming_scraping_config::StreamingScrapingConfig", tags = "1")]
476    pub streaming_scraping_config: ::core::option::Option<
477        streaming_scraping_config::StreamingScrapingConfig,
478    >,
479}
480/// Nested message and enum types in `StreamingScrapingConfig`.
481pub mod streaming_scraping_config {
482    /// Union type for different streaming scraping types
483    #[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/// Error types for streaming connection operations
536#[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    /// String value of the enum field names used in the ProtoBuf definition.
545    ///
546    /// The values are not transformed in any way and thus are considered stable
547    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
548    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    /// Creates an enum from field names used in the ProtoBuf definition.
560    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/// The current status of a streaming connection
574/// buf:lint:ignore ENUM_VALUE_PREFIX
575#[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    /// String value of the enum field names used in the ProtoBuf definition.
584    ///
585    /// The values are not transformed in any way and thus are considered stable
586    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
587    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    /// Creates an enum from field names used in the ProtoBuf definition.
595    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}
604/// Generated client implementations.
605pub 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    /// Service for managing streaming connections to external data sources.
616    /// Supports OPC-UA with plans for MQTT, Kafka, and other protocols.
617    #[derive(Debug, Clone)]
618    pub struct StreamingConnectionServiceClient<T> {
619        inner: tonic::client::Grpc<T>,
620    }
621    impl StreamingConnectionServiceClient<tonic::transport::Channel> {
622        /// Attempt to create a new client by connecting to a given endpoint.
623        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        /// Compress requests with the given encoding.
669        ///
670        /// This requires the server to support it otherwise it might respond with an
671        /// error.
672        #[must_use]
673        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
674            self.inner = self.inner.send_compressed(encoding);
675            self
676        }
677        /// Enable decompressing responses.
678        #[must_use]
679        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
680            self.inner = self.inner.accept_compressed(encoding);
681            self
682        }
683        /// Limits the maximum size of a decoded message.
684        ///
685        /// Default: `4MB`
686        #[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        /// Limits the maximum size of an encoded message.
692        ///
693        /// Default: `usize::MAX`
694        #[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        /// buf:lint:ignore RPC_REQUEST_STANDARD_NAME
700        /// Creates a new streaming connection configuration
701        /// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
702        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        /// Gets the details and status of a streaming connection
732        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        /// List all the streaming connections for a set of workspaces
762        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        /// Update the status of a streaming connection
792        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        /// Starts streaming data for a connection
824        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        /// Stops streaming data for a connection
854        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}