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    Basic256Sha256 = 2,
215}
216impl OpcSecurityPolicy {
217    /// String value of the enum field names used in the ProtoBuf definition.
218    ///
219    /// The values are not transformed in any way and thus are considered stable
220    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
221    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    /// Creates an enum from field names used in the ProtoBuf definition.
229    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    /// String value of the enum field names used in the ProtoBuf definition.
247    ///
248    /// The values are not transformed in any way and thus are considered stable
249    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
250    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    /// Creates an enum from field names used in the ProtoBuf definition.
260    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    /// If we encounter an unknown data type, we will error out
276    Error = 1,
277    /// If we encounter an unknown data type, we will assume it is a double
278    TreatAsDouble = 2,
279    /// If we encounter an unknown data type, we will assume it is a string
280    TreatAsString = 3,
281}
282impl OpcUaUnknownDataTypeHandling {
283    /// String value of the enum field names used in the ProtoBuf definition.
284    ///
285    /// The values are not transformed in any way and thus are considered stable
286    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
287    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    /// Creates an enum from field names used in the ProtoBuf definition.
296    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    /// String value of the enum field names used in the ProtoBuf definition.
319    ///
320    /// The values are not transformed in any way and thus are considered stable
321    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
322    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    /// Creates an enum from field names used in the ProtoBuf definition.
330    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    /// String value of the enum field names used in the ProtoBuf definition.
349    ///
350    /// The values are not transformed in any way and thus are considered stable
351    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
352    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    /// Creates an enum from field names used in the ProtoBuf definition.
363    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    /// String value of the enum field names used in the ProtoBuf definition.
385    ///
386    /// The values are not transformed in any way and thus are considered stable
387    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
388    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    /// Creates an enum from field names used in the ProtoBuf definition.
397    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/// Request to create a new streaming connection
408#[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/// Response for creating a new streaming connection
420#[derive(Clone, PartialEq, ::prost::Message)]
421pub struct CreateStreamingConnectionResponse {
422    #[prost(string, tag = "1")]
423    pub streaming_connection_rid: ::prost::alloc::string::String,
424}
425/// Response for stream operations
426#[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/// A configured streaming connection
437#[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/// Union type for different streaming connection types
455#[derive(Clone, PartialEq, ::prost::Message)]
456pub struct StreamingConnectionDetails {
457    /// Union type for different streaming connection types
458    #[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}
466/// Nested message and enum types in `StreamingConnectionDetails`.
467pub mod streaming_connection_details {
468    /// Union type for different streaming connection types
469    #[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    /// Union type for different streaming scraping types
478    #[prost(oneof = "streaming_scraping_config::StreamingScrapingConfig", tags = "1")]
479    pub streaming_scraping_config: ::core::option::Option<
480        streaming_scraping_config::StreamingScrapingConfig,
481    >,
482}
483/// Nested message and enum types in `StreamingScrapingConfig`.
484pub mod streaming_scraping_config {
485    /// Union type for different streaming scraping types
486    #[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/// Error types for streaming connection operations
539#[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    /// String value of the enum field names used in the ProtoBuf definition.
548    ///
549    /// The values are not transformed in any way and thus are considered stable
550    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
551    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    /// Creates an enum from field names used in the ProtoBuf definition.
563    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/// The current status of a streaming connection
577/// buf:lint:ignore ENUM_VALUE_PREFIX
578#[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    /// String value of the enum field names used in the ProtoBuf definition.
587    ///
588    /// The values are not transformed in any way and thus are considered stable
589    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
590    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    /// Creates an enum from field names used in the ProtoBuf definition.
598    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}
607/// Generated client implementations.
608pub 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    /// Service for managing streaming connections to external data sources.
619    /// Supports OPC-UA with plans for MQTT, Kafka, and other protocols.
620    #[derive(Debug, Clone)]
621    pub struct StreamingConnectionServiceClient<T> {
622        inner: tonic::client::Grpc<T>,
623    }
624    impl StreamingConnectionServiceClient<tonic::transport::Channel> {
625        /// Attempt to create a new client by connecting to a given endpoint.
626        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        /// Compress requests with the given encoding.
672        ///
673        /// This requires the server to support it otherwise it might respond with an
674        /// error.
675        #[must_use]
676        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
677            self.inner = self.inner.send_compressed(encoding);
678            self
679        }
680        /// Enable decompressing responses.
681        #[must_use]
682        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
683            self.inner = self.inner.accept_compressed(encoding);
684            self
685        }
686        /// Limits the maximum size of a decoded message.
687        ///
688        /// Default: `4MB`
689        #[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        /// Limits the maximum size of an encoded message.
695        ///
696        /// Default: `usize::MAX`
697        #[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        /// buf:lint:ignore RPC_REQUEST_STANDARD_NAME
703        /// Creates a new streaming connection configuration
704        /// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
705        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        /// Gets the details and status of a streaming connection
735        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        /// List all the streaming connections for a set of workspaces
765        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        /// Update the status of a streaming connection
795        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        /// Starts streaming data for a connection
827        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        /// Stops streaming data for a connection
857        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}