Skip to main content

nominal_api/proto/
nominal.data_connector.v1.rs

1// This file is @generated by prost-build.
2/// Authentication configuration for OPC-UA server connection
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct OpcAuthenticationConfig {
5    /// Authentication configuration for OPC-UA server connection
6    #[prost(
7        oneof = "opc_authentication_config::OpcAuthenticationConfig",
8        tags = "1, 2, 3"
9    )]
10    pub opc_authentication_config: ::core::option::Option<
11        opc_authentication_config::OpcAuthenticationConfig,
12    >,
13}
14/// Nested message and enum types in `OpcAuthenticationConfig`.
15pub mod opc_authentication_config {
16    /// Authentication configuration for OPC-UA server connection
17    #[derive(Clone, PartialEq, ::prost::Oneof)]
18    pub enum OpcAuthenticationConfig {
19        #[prost(message, tag = "1")]
20        Anonymous(super::super::super::super::google::protobuf::Empty),
21        #[prost(message, tag = "2")]
22        UsernamePassword(super::OpcUsernamePasswordAuthentication),
23        #[prost(message, tag = "3")]
24        Token(super::OpcTokenAuthentication),
25    }
26}
27/// Authentication configuration for OPC-UA server connection with secrets
28#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct OpcAuthenticationConfigSecret {
30    #[prost(
31        oneof = "opc_authentication_config_secret::OpcAuthenticationConfig",
32        tags = "1, 2, 3"
33    )]
34    pub opc_authentication_config: ::core::option::Option<
35        opc_authentication_config_secret::OpcAuthenticationConfig,
36    >,
37}
38/// Nested message and enum types in `OpcAuthenticationConfigSecret`.
39pub mod opc_authentication_config_secret {
40    #[derive(Clone, PartialEq, ::prost::Oneof)]
41    pub enum OpcAuthenticationConfig {
42        #[prost(message, tag = "1")]
43        Anonymous(super::super::super::super::google::protobuf::Empty),
44        #[prost(message, tag = "2")]
45        UsernamePassword(super::OpcUsernamePasswordAuthenticationSecret),
46        #[prost(message, tag = "3")]
47        Token(super::OpcTokenAuthenticationSecret),
48    }
49}
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct OpcUsernamePasswordAuthentication {
52    #[prost(string, tag = "1")]
53    pub username: ::prost::alloc::string::String,
54    #[prost(string, tag = "2")]
55    pub password: ::prost::alloc::string::String,
56}
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct OpcUsernamePasswordAuthenticationSecret {
59    #[prost(string, tag = "1")]
60    pub username: ::prost::alloc::string::String,
61    #[prost(string, tag = "2")]
62    pub password: ::prost::alloc::string::String,
63}
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct OpcTokenAuthentication {
66    #[prost(string, tag = "1")]
67    pub token: ::prost::alloc::string::String,
68}
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct OpcTokenAuthenticationSecret {
71    #[prost(string, tag = "1")]
72    pub token: ::prost::alloc::string::String,
73}
74/// The identifier field for an OPC-UA node
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct OpcIdentifierValue {
77    #[prost(oneof = "opc_identifier_value::OpcIdentifierValue", tags = "1, 2")]
78    pub opc_identifier_value: ::core::option::Option<
79        opc_identifier_value::OpcIdentifierValue,
80    >,
81}
82/// Nested message and enum types in `OpcIdentifierValue`.
83pub mod opc_identifier_value {
84    #[derive(Clone, PartialEq, ::prost::Oneof)]
85    pub enum OpcIdentifierValue {
86        #[prost(int32, tag = "1")]
87        Numeric(i32),
88        #[prost(string, tag = "2")]
89        String(::prost::alloc::string::String),
90    }
91}
92/// An OPC-UA node
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct OpcNode {
95    #[prost(uint32, optional, tag = "1")]
96    pub namespace: ::core::option::Option<u32>,
97    #[prost(message, optional, tag = "2")]
98    pub identifier: ::core::option::Option<OpcIdentifierValue>,
99}
100/// How do you want to map the names of OPC-UA nodes to Nominal channels?
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct OpcUaChannelNamingConvention {
103    #[prost(
104        oneof = "opc_ua_channel_naming_convention::NamingConvention",
105        tags = "1, 2, 3, 4"
106    )]
107    pub naming_convention: ::core::option::Option<
108        opc_ua_channel_naming_convention::NamingConvention,
109    >,
110}
111/// Nested message and enum types in `OpcUaChannelNamingConvention`.
112pub mod opc_ua_channel_naming_convention {
113    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
114    pub struct OpcUaNodeId {}
115    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
116    pub struct OpcUaBrowseName {}
117    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
118    pub struct OpcUaDisplayName {}
119    /// Configuration for full path naming convention
120    #[derive(Clone, PartialEq, ::prost::Message)]
121    pub struct OpcUaFullPath {
122        /// We will build path up to any of these nodes, or the Objects folder.
123        #[prost(message, repeated, tag = "1")]
124        pub root_nodes: ::prost::alloc::vec::Vec<super::OpcNode>,
125        /// Custom delimiter for path separation. Defaults to "/" if not specified.
126        #[prost(string, tag = "2")]
127        pub delimiter: ::prost::alloc::string::String,
128        /// Array TagNames to extract out of the path. For example, if the path is "/airplane/wing\[1\]/drag",
129        /// specifying the TagName "wing" would represent this with the channel "/airplane/drag" with "wing":"1" as a tag.
130        #[prost(string, repeated, tag = "3")]
131        pub array_tag_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
132    }
133    #[derive(Clone, PartialEq, ::prost::Oneof)]
134    pub enum NamingConvention {
135        /// For example, "NodeId{ns=3;i=1010}"
136        #[prost(message, tag = "1")]
137        NodeId(OpcUaNodeId),
138        /// The "name" field under the "BrowseName" attribute
139        #[prost(message, tag = "2")]
140        BrowseName(OpcUaBrowseName),
141        /// The "text" field under the "DisplayName" attribute
142        #[prost(message, tag = "3")]
143        DisplayName(OpcUaDisplayName),
144        /// The full path of the node, separated by a delimiter. Use this setting for creating the hierarchical prefix tree.
145        #[prost(message, tag = "4")]
146        FullPath(OpcUaFullPath),
147    }
148}
149/// Configuration for subscription-based data acquisition
150#[derive(Clone, Copy, PartialEq, ::prost::Message)]
151pub struct OpcUaSubscriptionConfig {
152    /// How to handle situations where there are failed monitors.
153    #[prost(enumeration = "OpcUaFailedMonitorHandling", tag = "1")]
154    pub failed_monitor_handling: i32,
155    /// The data change filter to be applied for the monitored items in the subscription.
156    #[prost(message, optional, tag = "2")]
157    pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
158}
159/// Configuration for polling-based data acquisition
160#[derive(Clone, Copy, PartialEq, ::prost::Message)]
161pub struct OpcUaPollingConfig {
162    /// The interval between polls in milliseconds. Defaults to 1000ms if not specified.
163    #[prost(uint64, tag = "1")]
164    pub polling_interval_ms: u64,
165}
166/// Configuration for how data should be acquired from the OPC-UA server
167#[derive(Clone, Copy, PartialEq, ::prost::Message)]
168pub struct OpcUaDataAcquisitionConfig {
169    #[prost(oneof = "opc_ua_data_acquisition_config::AcquisitionMode", tags = "1, 2")]
170    pub acquisition_mode: ::core::option::Option<
171        opc_ua_data_acquisition_config::AcquisitionMode,
172    >,
173}
174/// Nested message and enum types in `OpcUaDataAcquisitionConfig`.
175pub mod opc_ua_data_acquisition_config {
176    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
177    pub enum AcquisitionMode {
178        /// Use OPC-UA subscriptions to receive data changes pushed from the server
179        #[prost(message, tag = "1")]
180        Subscription(super::OpcUaSubscriptionConfig),
181        /// Periodically poll the server for current node values
182        #[prost(message, tag = "2")]
183        Polling(super::OpcUaPollingConfig),
184    }
185}
186/// Configuration for connecting to an OPC-UA server
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct OpcUaConnectorDetails {
189    #[prost(string, tag = "1")]
190    pub uri: ::prost::alloc::string::String,
191    #[prost(message, optional, tag = "2")]
192    pub authentication_config: ::core::option::Option<OpcAuthenticationConfig>,
193    #[prost(message, optional, tag = "3")]
194    pub scraping_config: ::core::option::Option<OpcUaScrapingConfig>,
195}
196/// Updated configuration for connecting to an OPC-UA server
197#[derive(Clone, PartialEq, ::prost::Message)]
198pub struct OpcUaConnectorDetailsUpdates {
199    #[prost(string, optional, tag = "1")]
200    pub uri: ::core::option::Option<::prost::alloc::string::String>,
201    #[prost(message, optional, tag = "2")]
202    pub authentication_config: ::core::option::Option<OpcAuthenticationConfig>,
203    #[prost(message, optional, tag = "3")]
204    pub scraping_config: ::core::option::Option<OpcUaScrapingConfigUpdates>,
205}
206/// Configuration for connecting to an OPC-UA server with secrets
207#[derive(Clone, PartialEq, ::prost::Message)]
208pub struct OpcUaConnectorDetailsSecret {
209    #[prost(string, tag = "1")]
210    pub uri: ::prost::alloc::string::String,
211    #[prost(message, optional, tag = "2")]
212    pub authentication_config: ::core::option::Option<OpcAuthenticationConfigSecret>,
213    #[prost(message, optional, tag = "3")]
214    pub scraping_config: ::core::option::Option<OpcUaScrapingConfig>,
215}
216#[derive(Clone, PartialEq, ::prost::Message)]
217pub struct OpcUaTraversalConfig {
218    /// Root nodes to start traversing for variable nodes. For each node specified here, we will recursively traverse
219    /// child nodes until there are none left. If empty, defaults to starting from the objects folder node
220    /// NodeId{ns=0;i=85}
221    #[prost(message, repeated, tag = "1")]
222    pub root_nodes: ::prost::alloc::vec::Vec<OpcNode>,
223    /// We will not subscribe to any of these nodes.
224    #[prost(message, repeated, tag = "2")]
225    pub skip_nodes: ::prost::alloc::vec::Vec<OpcNode>,
226    /// The type of references that we will follow when traversing the root nodes in the OPC UA server.
227    #[prost(enumeration = "OpcUaReferenceExplorationType", tag = "3")]
228    pub reference_exploration_type: i32,
229}
230#[derive(Clone, PartialEq, ::prost::Message)]
231pub struct OpcUaDirectNodeSubscription {
232    #[prost(message, repeated, tag = "1")]
233    pub nodes: ::prost::alloc::vec::Vec<OpcNode>,
234}
235#[derive(Clone, PartialEq, ::prost::Message)]
236pub struct OpcUaNodeExplorationConfig {
237    #[prost(
238        oneof = "opc_ua_node_exploration_config::OpcUaNodeExplorationConfig",
239        tags = "1, 2"
240    )]
241    pub opc_ua_node_exploration_config: ::core::option::Option<
242        opc_ua_node_exploration_config::OpcUaNodeExplorationConfig,
243    >,
244}
245/// Nested message and enum types in `OpcUaNodeExplorationConfig`.
246pub mod opc_ua_node_exploration_config {
247    #[derive(Clone, PartialEq, ::prost::Oneof)]
248    pub enum OpcUaNodeExplorationConfig {
249        #[prost(message, tag = "1")]
250        OpcUaTraversalConfig(super::OpcUaTraversalConfig),
251        #[prost(message, tag = "2")]
252        OpcUaDirectNodeSubscription(super::OpcUaDirectNodeSubscription),
253    }
254}
255#[derive(Clone, Copy, PartialEq, ::prost::Message)]
256pub struct OpcUaTimestampHandling {
257    #[prost(oneof = "opc_ua_timestamp_handling::TimestampType", tags = "1, 2, 3")]
258    pub timestamp_type: ::core::option::Option<opc_ua_timestamp_handling::TimestampType>,
259}
260/// Nested message and enum types in `OpcUaTimestampHandling`.
261pub mod opc_ua_timestamp_handling {
262    /// Use the server timestamp <https://reference.opcfoundation.org/Core/Part4/v104/docs/7.7.4>
263    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
264    pub struct OpcUaServerTime {}
265    /// Use the source timestamp <https://reference.opcfoundation.org/Core/Part4/v104/docs/7.7.3>
266    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
267    pub struct OpcUaSourceTime {}
268    /// Use the server timestamp, but add an optional offset. By default, the offset will be the time now.
269    /// This is useful for when the server starts at an epoch time of 0.
270    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
271    pub struct OpcUaRelativeTimestamp {
272        #[prost(message, optional, tag = "1")]
273        pub offset: ::core::option::Option<
274            super::super::super::super::google::protobuf::Timestamp,
275        >,
276    }
277    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
278    pub enum TimestampType {
279        #[prost(message, tag = "1")]
280        Server(OpcUaServerTime),
281        #[prost(message, tag = "2")]
282        Source(OpcUaSourceTime),
283        #[prost(message, tag = "3")]
284        Relative(OpcUaRelativeTimestamp),
285    }
286}
287#[derive(Clone, Copy, PartialEq, ::prost::Message)]
288pub struct OpcUaDataChangeFilter {
289    /// The trigger for the data change filter.
290    #[prost(enumeration = "OpcUaDataChangeTrigger", tag = "1")]
291    pub trigger: i32,
292    #[prost(enumeration = "OpcUaDeadbandType", tag = "2")]
293    pub deadband_type: i32,
294    #[prost(double, tag = "3")]
295    pub deadband_value: f64,
296}
297/// Configuration for determining how data is discovered and handled
298#[derive(Clone, PartialEq, ::prost::Message)]
299pub struct OpcUaScrapingConfig {
300    #[prost(message, optional, tag = "1")]
301    pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
302    /// The browse name of the node under which the unit is stored for the nodes we scrape.
303    #[prost(string, tag = "2")]
304    pub unit_node_name: ::prost::alloc::string::String,
305    #[prost(message, optional, tag = "3")]
306    pub channel_naming_convention: ::core::option::Option<OpcUaChannelNamingConvention>,
307    /// If true, we will override the host and port of the OPC UA server with the host and port of the original server URL.
308    #[prost(bool, tag = "4")]
309    pub override_host: bool,
310    /// How we will handle unknown data types when we read them from the server
311    #[prost(enumeration = "OpcUaUnknownDataTypeHandling", tag = "5")]
312    pub unknown_data_type_handling: i32,
313    /// Deprecated: Use data_acquisition_config.subscription.failed_monitor_handling instead.
314    #[deprecated]
315    #[prost(enumeration = "OpcUaFailedMonitorHandling", optional, tag = "6")]
316    pub failed_monitor_handling: ::core::option::Option<i32>,
317    /// What timestamps should we write for the channels?
318    #[prost(message, optional, tag = "7")]
319    pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
320    /// Deprecated: Use data_acquisition_config.subscription.data_change_filter instead.
321    #[deprecated]
322    #[prost(message, optional, tag = "8")]
323    pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
324    /// Configuration for how data should be acquired from the server.
325    /// If not specified, defaults to subscription mode using the deprecated fields above.
326    #[prost(message, optional, tag = "9")]
327    pub data_acquisition_config: ::core::option::Option<OpcUaDataAcquisitionConfig>,
328}
329/// Updated configuration for determining how data is discovered and handled
330#[derive(Clone, PartialEq, ::prost::Message)]
331pub struct OpcUaScrapingConfigUpdates {
332    #[prost(message, optional, tag = "1")]
333    pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
334    /// The browse name of the node under which the unit is stored for the nodes we scrape.
335    #[prost(string, optional, tag = "2")]
336    pub unit_node_name: ::core::option::Option<::prost::alloc::string::String>,
337    #[prost(message, optional, tag = "3")]
338    pub channel_naming_convention: ::core::option::Option<OpcUaChannelNamingConvention>,
339    /// If true, we will override the host and port of the OPC UA server with the host and port of the original server URL.
340    #[prost(bool, optional, tag = "4")]
341    pub override_host: ::core::option::Option<bool>,
342    /// How we will handle unknown data types when we read them from the server
343    #[prost(enumeration = "OpcUaUnknownDataTypeHandling", optional, tag = "5")]
344    pub unknown_data_type_handling: ::core::option::Option<i32>,
345    /// Deprecated: Use data_acquisition_config.subscription.failed_monitor_handling instead.
346    #[deprecated]
347    #[prost(enumeration = "OpcUaFailedMonitorHandling", optional, tag = "6")]
348    pub failed_monitor_handling: ::core::option::Option<i32>,
349    /// What timestamps should we write for the channels?
350    #[prost(message, optional, tag = "7")]
351    pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
352    /// Deprecated: Use data_acquisition_config.subscription.data_change_filter instead.
353    #[deprecated]
354    #[prost(message, optional, tag = "8")]
355    pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
356    /// Configuration for how data should be acquired from the server.
357    #[prost(message, optional, tag = "9")]
358    pub data_acquisition_config: ::core::option::Option<OpcUaDataAcquisitionConfig>,
359}
360#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
361#[repr(i32)]
362pub enum OpcUaReferenceExplorationType {
363    Unspecified = 0,
364    Organizes = 1,
365    HierarchicalReferences = 2,
366}
367impl OpcUaReferenceExplorationType {
368    /// String value of the enum field names used in the ProtoBuf definition.
369    ///
370    /// The values are not transformed in any way and thus are considered stable
371    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
372    pub fn as_str_name(&self) -> &'static str {
373        match self {
374            Self::Unspecified => "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED",
375            Self::Organizes => "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES",
376            Self::HierarchicalReferences => {
377                "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES"
378            }
379        }
380    }
381    /// Creates an enum from field names used in the ProtoBuf definition.
382    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
383        match value {
384            "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
385            "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES" => Some(Self::Organizes),
386            "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES" => {
387                Some(Self::HierarchicalReferences)
388            }
389            _ => None,
390        }
391    }
392}
393#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
394#[repr(i32)]
395pub enum OpcUaUnknownDataTypeHandling {
396    Unspecified = 0,
397    /// If we encounter an unknown data type, we will error out
398    Error = 1,
399    /// If we encounter an unknown data type, we will assume it is a double
400    TreatAsDouble = 2,
401    /// If we encounter an unknown data type, we will assume it is a string
402    TreatAsString = 3,
403}
404impl OpcUaUnknownDataTypeHandling {
405    /// String value of the enum field names used in the ProtoBuf definition.
406    ///
407    /// The values are not transformed in any way and thus are considered stable
408    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
409    pub fn as_str_name(&self) -> &'static str {
410        match self {
411            Self::Unspecified => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED",
412            Self::Error => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR",
413            Self::TreatAsDouble => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE",
414            Self::TreatAsString => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING",
415        }
416    }
417    /// Creates an enum from field names used in the ProtoBuf definition.
418    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
419        match value {
420            "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
421            "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR" => Some(Self::Error),
422            "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE" => {
423                Some(Self::TreatAsDouble)
424            }
425            "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING" => {
426                Some(Self::TreatAsString)
427            }
428            _ => None,
429        }
430    }
431}
432#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
433#[repr(i32)]
434pub enum OpcUaFailedMonitorHandling {
435    Unspecified = 0,
436    Error = 1,
437    Ignore = 2,
438}
439impl OpcUaFailedMonitorHandling {
440    /// String value of the enum field names used in the ProtoBuf definition.
441    ///
442    /// The values are not transformed in any way and thus are considered stable
443    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
444    pub fn as_str_name(&self) -> &'static str {
445        match self {
446            Self::Unspecified => "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED",
447            Self::Error => "OPC_UA_FAILED_MONITOR_HANDLING_ERROR",
448            Self::Ignore => "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE",
449        }
450    }
451    /// Creates an enum from field names used in the ProtoBuf definition.
452    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
453        match value {
454            "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
455            "OPC_UA_FAILED_MONITOR_HANDLING_ERROR" => Some(Self::Error),
456            "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE" => Some(Self::Ignore),
457            _ => None,
458        }
459    }
460}
461#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
462#[repr(i32)]
463pub enum OpcUaDataChangeTrigger {
464    Unspecified = 0,
465    StatusOnly = 1,
466    StatusValue = 2,
467    StatusValueTimestamp = 3,
468}
469impl OpcUaDataChangeTrigger {
470    /// String value of the enum field names used in the ProtoBuf definition.
471    ///
472    /// The values are not transformed in any way and thus are considered stable
473    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
474    pub fn as_str_name(&self) -> &'static str {
475        match self {
476            Self::Unspecified => "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED",
477            Self::StatusOnly => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY",
478            Self::StatusValue => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE",
479            Self::StatusValueTimestamp => {
480                "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP"
481            }
482        }
483    }
484    /// Creates an enum from field names used in the ProtoBuf definition.
485    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
486        match value {
487            "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
488            "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY" => Some(Self::StatusOnly),
489            "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE" => Some(Self::StatusValue),
490            "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP" => {
491                Some(Self::StatusValueTimestamp)
492            }
493            _ => None,
494        }
495    }
496}
497#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
498#[repr(i32)]
499pub enum OpcUaDeadbandType {
500    Unspecified = 0,
501    None = 1,
502    Absolute = 2,
503    Percent = 3,
504}
505impl OpcUaDeadbandType {
506    /// String value of the enum field names used in the ProtoBuf definition.
507    ///
508    /// The values are not transformed in any way and thus are considered stable
509    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
510    pub fn as_str_name(&self) -> &'static str {
511        match self {
512            Self::Unspecified => "OPC_UA_DEADBAND_TYPE_UNSPECIFIED",
513            Self::None => "OPC_UA_DEADBAND_TYPE_NONE",
514            Self::Absolute => "OPC_UA_DEADBAND_TYPE_ABSOLUTE",
515            Self::Percent => "OPC_UA_DEADBAND_TYPE_PERCENT",
516        }
517    }
518    /// Creates an enum from field names used in the ProtoBuf definition.
519    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
520        match value {
521            "OPC_UA_DEADBAND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
522            "OPC_UA_DEADBAND_TYPE_NONE" => Some(Self::None),
523            "OPC_UA_DEADBAND_TYPE_ABSOLUTE" => Some(Self::Absolute),
524            "OPC_UA_DEADBAND_TYPE_PERCENT" => Some(Self::Percent),
525            _ => None,
526        }
527    }
528}
529/// Request to create a new data connector
530#[derive(Clone, PartialEq, ::prost::Message)]
531pub struct CreateDataConnectorRequest {
532    #[prost(string, tag = "1")]
533    pub name: ::prost::alloc::string::String,
534    #[prost(string, optional, tag = "2")]
535    pub description: ::core::option::Option<::prost::alloc::string::String>,
536    #[prost(message, optional, tag = "3")]
537    pub connection_details: ::core::option::Option<DataConnectorDetails>,
538    #[prost(string, tag = "4")]
539    pub workspace_rid: ::prost::alloc::string::String,
540    #[prost(string, tag = "5")]
541    pub target_dataset_rid: ::prost::alloc::string::String,
542}
543/// Response for creating a new data connector
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct CreateDataConnectorResponse {
546    #[prost(message, optional, tag = "1")]
547    pub data_connector: ::core::option::Option<DataConnector>,
548}
549/// A configured data connector
550#[derive(Clone, PartialEq, ::prost::Message)]
551pub struct DataConnector {
552    #[prost(string, tag = "1")]
553    pub data_connector_rid: ::prost::alloc::string::String,
554    #[prost(string, tag = "2")]
555    pub name: ::prost::alloc::string::String,
556    #[prost(string, optional, tag = "3")]
557    pub description: ::core::option::Option<::prost::alloc::string::String>,
558    #[prost(message, optional, tag = "4")]
559    pub connection_details: ::core::option::Option<DataConnectorDetailsSecrets>,
560    #[prost(string, tag = "5")]
561    pub workspace_rid: ::prost::alloc::string::String,
562    #[prost(string, optional, tag = "6")]
563    pub target_dataset_rid: ::core::option::Option<::prost::alloc::string::String>,
564    #[prost(message, optional, tag = "7")]
565    pub created_at: ::core::option::Option<
566        super::super::super::google::protobuf::Timestamp,
567    >,
568}
569/// Union type for different data connector types
570#[derive(Clone, PartialEq, ::prost::Message)]
571pub struct DataConnectorDetails {
572    #[prost(oneof = "data_connector_details::DataConnectorDetails", tags = "1")]
573    pub data_connector_details: ::core::option::Option<
574        data_connector_details::DataConnectorDetails,
575    >,
576}
577/// Nested message and enum types in `DataConnectorDetails`.
578pub mod data_connector_details {
579    #[derive(Clone, PartialEq, ::prost::Oneof)]
580    pub enum DataConnectorDetails {
581        #[prost(message, tag = "1")]
582        OpcUa(super::OpcUaConnectorDetails),
583    }
584}
585#[derive(Clone, PartialEq, ::prost::Message)]
586pub struct DataConnectorDetailsUpdates {
587    #[prost(
588        oneof = "data_connector_details_updates::DataConnectorDetailsUpdates",
589        tags = "1"
590    )]
591    pub data_connector_details_updates: ::core::option::Option<
592        data_connector_details_updates::DataConnectorDetailsUpdates,
593    >,
594}
595/// Nested message and enum types in `DataConnectorDetailsUpdates`.
596pub mod data_connector_details_updates {
597    #[derive(Clone, PartialEq, ::prost::Oneof)]
598    pub enum DataConnectorDetailsUpdates {
599        #[prost(message, tag = "1")]
600        OpcUa(super::OpcUaConnectorDetailsUpdates),
601    }
602}
603/// Union type for different data connector types with secrets
604#[derive(Clone, PartialEq, ::prost::Message)]
605pub struct DataConnectorDetailsSecrets {
606    #[prost(oneof = "data_connector_details_secrets::DataConnectorDetails", tags = "1")]
607    pub data_connector_details: ::core::option::Option<
608        data_connector_details_secrets::DataConnectorDetails,
609    >,
610}
611/// Nested message and enum types in `DataConnectorDetailsSecrets`.
612pub mod data_connector_details_secrets {
613    #[derive(Clone, PartialEq, ::prost::Oneof)]
614    pub enum DataConnectorDetails {
615        #[prost(message, tag = "1")]
616        OpcUa(super::OpcUaConnectorDetailsSecret),
617    }
618}
619#[derive(Clone, PartialEq, ::prost::Message)]
620pub struct UpdateDataConnectorRequest {
621    #[prost(string, tag = "1")]
622    pub data_connector_rid: ::prost::alloc::string::String,
623    #[prost(string, optional, tag = "2")]
624    pub name: ::core::option::Option<::prost::alloc::string::String>,
625    #[prost(string, optional, tag = "3")]
626    pub description: ::core::option::Option<::prost::alloc::string::String>,
627    #[prost(message, optional, tag = "4")]
628    pub connection_details: ::core::option::Option<DataConnectorDetailsUpdates>,
629    #[prost(string, optional, tag = "5")]
630    pub target_dataset_rid: ::core::option::Option<::prost::alloc::string::String>,
631}
632#[derive(Clone, PartialEq, ::prost::Message)]
633pub struct UpdateDataConnectorResponse {
634    #[prost(message, optional, tag = "1")]
635    pub data_connector: ::core::option::Option<DataConnector>,
636}
637#[derive(Clone, PartialEq, ::prost::Message)]
638pub struct GetDataConnectorRequest {
639    #[prost(string, tag = "1")]
640    pub data_connector_rid: ::prost::alloc::string::String,
641}
642#[derive(Clone, PartialEq, ::prost::Message)]
643pub struct GetDataConnectorResponse {
644    #[prost(message, optional, tag = "1")]
645    pub data_connector: ::core::option::Option<DataConnector>,
646}
647#[derive(Clone, PartialEq, ::prost::Message)]
648pub struct NameFilter {
649    #[prost(string, tag = "1")]
650    pub name: ::prost::alloc::string::String,
651}
652#[derive(Clone, PartialEq, ::prost::Message)]
653pub struct DescriptionFilter {
654    #[prost(string, tag = "1")]
655    pub description: ::prost::alloc::string::String,
656}
657#[derive(Clone, PartialEq, ::prost::Message)]
658pub struct TargetDatasetFilter {
659    #[prost(string, tag = "1")]
660    pub target_dataset_rid: ::prost::alloc::string::String,
661}
662#[derive(Clone, PartialEq, ::prost::Message)]
663pub struct AndFilter {
664    #[prost(message, repeated, tag = "1")]
665    pub clauses: ::prost::alloc::vec::Vec<SearchFilter>,
666}
667#[derive(Clone, Copy, PartialEq, ::prost::Message)]
668pub struct SortBy {
669    /// If unspecified, defaults to SORT_FIELD_UPDATE_AT
670    #[prost(enumeration = "SortField", tag = "1")]
671    pub field: i32,
672    /// If unspecified, defaults to SORT_ORDER_DESC
673    #[prost(enumeration = "SortOrder", tag = "2")]
674    pub order: i32,
675}
676#[derive(Clone, PartialEq, ::prost::Message)]
677pub struct SearchFilter {
678    #[prost(oneof = "search_filter::Filter", tags = "1, 2, 3, 4")]
679    pub filter: ::core::option::Option<search_filter::Filter>,
680}
681/// Nested message and enum types in `SearchFilter`.
682pub mod search_filter {
683    #[derive(Clone, PartialEq, ::prost::Oneof)]
684    pub enum Filter {
685        #[prost(message, tag = "1")]
686        Name(super::NameFilter),
687        #[prost(message, tag = "2")]
688        Description(super::DescriptionFilter),
689        #[prost(message, tag = "3")]
690        TargetDataset(super::TargetDatasetFilter),
691        #[prost(message, tag = "4")]
692        And(super::AndFilter),
693    }
694}
695#[derive(Clone, PartialEq, ::prost::Message)]
696pub struct SearchRequest {
697    #[prost(string, tag = "1")]
698    pub workspace_rid: ::prost::alloc::string::String,
699    #[prost(message, optional, tag = "2")]
700    pub filter: ::core::option::Option<SearchFilter>,
701    /// If unspecified, defaults to 100
702    #[prost(int32, tag = "3")]
703    pub page_size: i32,
704    #[prost(string, optional, tag = "4")]
705    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
706    #[prost(message, optional, tag = "5")]
707    pub sort_by: ::core::option::Option<SortBy>,
708}
709#[derive(Clone, PartialEq, ::prost::Message)]
710pub struct SearchResponse {
711    #[prost(message, repeated, tag = "1")]
712    pub data_connectors: ::prost::alloc::vec::Vec<DataConnector>,
713    #[prost(string, optional, tag = "2")]
714    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
715}
716#[derive(Clone, PartialEq, ::prost::Message)]
717pub struct StartSessionRequest {
718    #[prost(string, tag = "1")]
719    pub data_connector_rid: ::prost::alloc::string::String,
720}
721#[derive(Clone, Copy, PartialEq, ::prost::Message)]
722pub struct StartSessionResponse {}
723#[derive(Clone, PartialEq, ::prost::Message)]
724pub struct StopSessionRequest {
725    #[prost(string, tag = "1")]
726    pub data_connector_rid: ::prost::alloc::string::String,
727}
728#[derive(Clone, Copy, PartialEq, ::prost::Message)]
729pub struct StopSessionResponse {}
730#[derive(Clone, PartialEq, ::prost::Message)]
731pub struct GetSessionStatusRequest {
732    #[prost(string, tag = "1")]
733    pub data_connector_rid: ::prost::alloc::string::String,
734}
735#[derive(Clone, PartialEq, ::prost::Message)]
736pub struct ActiveSessionStatus {
737    #[prost(enumeration = "ReplicaStatus", repeated, tag = "1")]
738    pub replica_status: ::prost::alloc::vec::Vec<i32>,
739}
740#[derive(Clone, PartialEq, ::prost::Message)]
741pub struct GetSessionStatusResponse {
742    #[prost(oneof = "get_session_status_response::Status", tags = "1, 2")]
743    pub status: ::core::option::Option<get_session_status_response::Status>,
744}
745/// Nested message and enum types in `GetSessionStatusResponse`.
746pub mod get_session_status_response {
747    #[derive(Clone, PartialEq, ::prost::Oneof)]
748    pub enum Status {
749        #[prost(message, tag = "1")]
750        None(super::super::super::super::google::protobuf::Empty),
751        #[prost(message, tag = "2")]
752        Active(super::ActiveSessionStatus),
753    }
754}
755#[derive(Clone, PartialEq, ::prost::Message)]
756pub struct DeleteDataConnectorRequest {
757    #[prost(string, tag = "1")]
758    pub data_connector_rid: ::prost::alloc::string::String,
759}
760#[derive(Clone, Copy, PartialEq, ::prost::Message)]
761pub struct DeleteDataConnectorResponse {}
762/// Error types for data connector operations
763#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
764#[repr(i32)]
765pub enum DataConnectorErrorType {
766    Unspecified = 0,
767    ConnectorNotFound = 1,
768    ConnectorNotAuthorized = 2,
769    TargetDatasetNotInWorkspace = 3,
770}
771impl DataConnectorErrorType {
772    /// String value of the enum field names used in the ProtoBuf definition.
773    ///
774    /// The values are not transformed in any way and thus are considered stable
775    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
776    pub fn as_str_name(&self) -> &'static str {
777        match self {
778            Self::Unspecified => "DATA_CONNECTOR_ERROR_TYPE_UNSPECIFIED",
779            Self::ConnectorNotFound => "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_FOUND",
780            Self::ConnectorNotAuthorized => {
781                "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_AUTHORIZED"
782            }
783            Self::TargetDatasetNotInWorkspace => {
784                "DATA_CONNECTOR_ERROR_TYPE_TARGET_DATASET_NOT_IN_WORKSPACE"
785            }
786        }
787    }
788    /// Creates an enum from field names used in the ProtoBuf definition.
789    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
790        match value {
791            "DATA_CONNECTOR_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
792            "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_FOUND" => {
793                Some(Self::ConnectorNotFound)
794            }
795            "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_AUTHORIZED" => {
796                Some(Self::ConnectorNotAuthorized)
797            }
798            "DATA_CONNECTOR_ERROR_TYPE_TARGET_DATASET_NOT_IN_WORKSPACE" => {
799                Some(Self::TargetDatasetNotInWorkspace)
800            }
801            _ => None,
802        }
803    }
804}
805#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
806#[repr(i32)]
807pub enum SortField {
808    Unspecified = 0,
809    UpdatedAt = 1,
810}
811impl SortField {
812    /// String value of the enum field names used in the ProtoBuf definition.
813    ///
814    /// The values are not transformed in any way and thus are considered stable
815    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
816    pub fn as_str_name(&self) -> &'static str {
817        match self {
818            Self::Unspecified => "SORT_FIELD_UNSPECIFIED",
819            Self::UpdatedAt => "SORT_FIELD_UPDATED_AT",
820        }
821    }
822    /// Creates an enum from field names used in the ProtoBuf definition.
823    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
824        match value {
825            "SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
826            "SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
827            _ => None,
828        }
829    }
830}
831#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
832#[repr(i32)]
833pub enum SortOrder {
834    Unspecified = 0,
835    Asc = 1,
836    Desc = 2,
837}
838impl SortOrder {
839    /// String value of the enum field names used in the ProtoBuf definition.
840    ///
841    /// The values are not transformed in any way and thus are considered stable
842    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
843    pub fn as_str_name(&self) -> &'static str {
844        match self {
845            Self::Unspecified => "SORT_ORDER_UNSPECIFIED",
846            Self::Asc => "SORT_ORDER_ASC",
847            Self::Desc => "SORT_ORDER_DESC",
848        }
849    }
850    /// Creates an enum from field names used in the ProtoBuf definition.
851    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
852        match value {
853            "SORT_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
854            "SORT_ORDER_ASC" => Some(Self::Asc),
855            "SORT_ORDER_DESC" => Some(Self::Desc),
856            _ => None,
857        }
858    }
859}
860#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
861#[repr(i32)]
862pub enum ReplicaStatus {
863    Unspecified = 0,
864    Starting = 1,
865    Subscribing = 2,
866    Running = 3,
867    Stopping = 4,
868    Stopped = 5,
869}
870impl ReplicaStatus {
871    /// String value of the enum field names used in the ProtoBuf definition.
872    ///
873    /// The values are not transformed in any way and thus are considered stable
874    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
875    pub fn as_str_name(&self) -> &'static str {
876        match self {
877            Self::Unspecified => "REPLICA_STATUS_UNSPECIFIED",
878            Self::Starting => "REPLICA_STATUS_STARTING",
879            Self::Subscribing => "REPLICA_STATUS_SUBSCRIBING",
880            Self::Running => "REPLICA_STATUS_RUNNING",
881            Self::Stopping => "REPLICA_STATUS_STOPPING",
882            Self::Stopped => "REPLICA_STATUS_STOPPED",
883        }
884    }
885    /// Creates an enum from field names used in the ProtoBuf definition.
886    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
887        match value {
888            "REPLICA_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
889            "REPLICA_STATUS_STARTING" => Some(Self::Starting),
890            "REPLICA_STATUS_SUBSCRIBING" => Some(Self::Subscribing),
891            "REPLICA_STATUS_RUNNING" => Some(Self::Running),
892            "REPLICA_STATUS_STOPPING" => Some(Self::Stopping),
893            "REPLICA_STATUS_STOPPED" => Some(Self::Stopped),
894            _ => None,
895        }
896    }
897}
898/// Generated client implementations.
899pub mod data_connector_service_client {
900    #![allow(
901        unused_variables,
902        dead_code,
903        missing_docs,
904        clippy::wildcard_imports,
905        clippy::let_unit_value,
906    )]
907    use tonic::codegen::*;
908    use tonic::codegen::http::Uri;
909    /// Service for managing data connectors to external data sources.
910    /// Supports OPC-UA with plans for MQTT, Kafka, and other protocols.
911    #[derive(Debug, Clone)]
912    pub struct DataConnectorServiceClient<T> {
913        inner: tonic::client::Grpc<T>,
914    }
915    impl DataConnectorServiceClient<tonic::transport::Channel> {
916        /// Attempt to create a new client by connecting to a given endpoint.
917        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
918        where
919            D: TryInto<tonic::transport::Endpoint>,
920            D::Error: Into<StdError>,
921        {
922            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
923            Ok(Self::new(conn))
924        }
925    }
926    impl<T> DataConnectorServiceClient<T>
927    where
928        T: tonic::client::GrpcService<tonic::body::Body>,
929        T::Error: Into<StdError>,
930        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
931        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
932    {
933        pub fn new(inner: T) -> Self {
934            let inner = tonic::client::Grpc::new(inner);
935            Self { inner }
936        }
937        pub fn with_origin(inner: T, origin: Uri) -> Self {
938            let inner = tonic::client::Grpc::with_origin(inner, origin);
939            Self { inner }
940        }
941        pub fn with_interceptor<F>(
942            inner: T,
943            interceptor: F,
944        ) -> DataConnectorServiceClient<InterceptedService<T, F>>
945        where
946            F: tonic::service::Interceptor,
947            T::ResponseBody: Default,
948            T: tonic::codegen::Service<
949                http::Request<tonic::body::Body>,
950                Response = http::Response<
951                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
952                >,
953            >,
954            <T as tonic::codegen::Service<
955                http::Request<tonic::body::Body>,
956            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
957        {
958            DataConnectorServiceClient::new(InterceptedService::new(inner, interceptor))
959        }
960        /// Compress requests with the given encoding.
961        ///
962        /// This requires the server to support it otherwise it might respond with an
963        /// error.
964        #[must_use]
965        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
966            self.inner = self.inner.send_compressed(encoding);
967            self
968        }
969        /// Enable decompressing responses.
970        #[must_use]
971        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
972            self.inner = self.inner.accept_compressed(encoding);
973            self
974        }
975        /// Limits the maximum size of a decoded message.
976        ///
977        /// Default: `4MB`
978        #[must_use]
979        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
980            self.inner = self.inner.max_decoding_message_size(limit);
981            self
982        }
983        /// Limits the maximum size of an encoded message.
984        ///
985        /// Default: `usize::MAX`
986        #[must_use]
987        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
988            self.inner = self.inner.max_encoding_message_size(limit);
989            self
990        }
991        /// Creates a new data connector configuration
992        pub async fn create_data_connector(
993            &mut self,
994            request: impl tonic::IntoRequest<super::CreateDataConnectorRequest>,
995        ) -> std::result::Result<
996            tonic::Response<super::CreateDataConnectorResponse>,
997            tonic::Status,
998        > {
999            self.inner
1000                .ready()
1001                .await
1002                .map_err(|e| {
1003                    tonic::Status::unknown(
1004                        format!("Service was not ready: {}", e.into()),
1005                    )
1006                })?;
1007            let codec = tonic::codec::ProstCodec::default();
1008            let path = http::uri::PathAndQuery::from_static(
1009                "/nominal.data_connector.v1.DataConnectorService/CreateDataConnector",
1010            );
1011            let mut req = request.into_request();
1012            req.extensions_mut()
1013                .insert(
1014                    GrpcMethod::new(
1015                        "nominal.data_connector.v1.DataConnectorService",
1016                        "CreateDataConnector",
1017                    ),
1018                );
1019            self.inner.unary(req, path, codec).await
1020        }
1021        /// Gets the settings for a data connector
1022        pub async fn get_data_connector(
1023            &mut self,
1024            request: impl tonic::IntoRequest<super::GetDataConnectorRequest>,
1025        ) -> std::result::Result<
1026            tonic::Response<super::GetDataConnectorResponse>,
1027            tonic::Status,
1028        > {
1029            self.inner
1030                .ready()
1031                .await
1032                .map_err(|e| {
1033                    tonic::Status::unknown(
1034                        format!("Service was not ready: {}", e.into()),
1035                    )
1036                })?;
1037            let codec = tonic::codec::ProstCodec::default();
1038            let path = http::uri::PathAndQuery::from_static(
1039                "/nominal.data_connector.v1.DataConnectorService/GetDataConnector",
1040            );
1041            let mut req = request.into_request();
1042            req.extensions_mut()
1043                .insert(
1044                    GrpcMethod::new(
1045                        "nominal.data_connector.v1.DataConnectorService",
1046                        "GetDataConnector",
1047                    ),
1048                );
1049            self.inner.unary(req, path, codec).await
1050        }
1051        /// Updates the settings for a data connector
1052        pub async fn update_data_connector(
1053            &mut self,
1054            request: impl tonic::IntoRequest<super::UpdateDataConnectorRequest>,
1055        ) -> std::result::Result<
1056            tonic::Response<super::UpdateDataConnectorResponse>,
1057            tonic::Status,
1058        > {
1059            self.inner
1060                .ready()
1061                .await
1062                .map_err(|e| {
1063                    tonic::Status::unknown(
1064                        format!("Service was not ready: {}", e.into()),
1065                    )
1066                })?;
1067            let codec = tonic::codec::ProstCodec::default();
1068            let path = http::uri::PathAndQuery::from_static(
1069                "/nominal.data_connector.v1.DataConnectorService/UpdateDataConnector",
1070            );
1071            let mut req = request.into_request();
1072            req.extensions_mut()
1073                .insert(
1074                    GrpcMethod::new(
1075                        "nominal.data_connector.v1.DataConnectorService",
1076                        "UpdateDataConnector",
1077                    ),
1078                );
1079            self.inner.unary(req, path, codec).await
1080        }
1081        /// List the data connectors matching the search criteria
1082        pub async fn search(
1083            &mut self,
1084            request: impl tonic::IntoRequest<super::SearchRequest>,
1085        ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
1086            self.inner
1087                .ready()
1088                .await
1089                .map_err(|e| {
1090                    tonic::Status::unknown(
1091                        format!("Service was not ready: {}", e.into()),
1092                    )
1093                })?;
1094            let codec = tonic::codec::ProstCodec::default();
1095            let path = http::uri::PathAndQuery::from_static(
1096                "/nominal.data_connector.v1.DataConnectorService/Search",
1097            );
1098            let mut req = request.into_request();
1099            req.extensions_mut()
1100                .insert(
1101                    GrpcMethod::new(
1102                        "nominal.data_connector.v1.DataConnectorService",
1103                        "Search",
1104                    ),
1105                );
1106            self.inner.unary(req, path, codec).await
1107        }
1108        /// Starts a session for a connection
1109        pub async fn start_session(
1110            &mut self,
1111            request: impl tonic::IntoRequest<super::StartSessionRequest>,
1112        ) -> std::result::Result<
1113            tonic::Response<super::StartSessionResponse>,
1114            tonic::Status,
1115        > {
1116            self.inner
1117                .ready()
1118                .await
1119                .map_err(|e| {
1120                    tonic::Status::unknown(
1121                        format!("Service was not ready: {}", e.into()),
1122                    )
1123                })?;
1124            let codec = tonic::codec::ProstCodec::default();
1125            let path = http::uri::PathAndQuery::from_static(
1126                "/nominal.data_connector.v1.DataConnectorService/StartSession",
1127            );
1128            let mut req = request.into_request();
1129            req.extensions_mut()
1130                .insert(
1131                    GrpcMethod::new(
1132                        "nominal.data_connector.v1.DataConnectorService",
1133                        "StartSession",
1134                    ),
1135                );
1136            self.inner.unary(req, path, codec).await
1137        }
1138        /// Stops a session for a connection
1139        pub async fn stop_session(
1140            &mut self,
1141            request: impl tonic::IntoRequest<super::StopSessionRequest>,
1142        ) -> std::result::Result<
1143            tonic::Response<super::StopSessionResponse>,
1144            tonic::Status,
1145        > {
1146            self.inner
1147                .ready()
1148                .await
1149                .map_err(|e| {
1150                    tonic::Status::unknown(
1151                        format!("Service was not ready: {}", e.into()),
1152                    )
1153                })?;
1154            let codec = tonic::codec::ProstCodec::default();
1155            let path = http::uri::PathAndQuery::from_static(
1156                "/nominal.data_connector.v1.DataConnectorService/StopSession",
1157            );
1158            let mut req = request.into_request();
1159            req.extensions_mut()
1160                .insert(
1161                    GrpcMethod::new(
1162                        "nominal.data_connector.v1.DataConnectorService",
1163                        "StopSession",
1164                    ),
1165                );
1166            self.inner.unary(req, path, codec).await
1167        }
1168        /// Gets the session status for a connection
1169        pub async fn get_session_status(
1170            &mut self,
1171            request: impl tonic::IntoRequest<super::GetSessionStatusRequest>,
1172        ) -> std::result::Result<
1173            tonic::Response<super::GetSessionStatusResponse>,
1174            tonic::Status,
1175        > {
1176            self.inner
1177                .ready()
1178                .await
1179                .map_err(|e| {
1180                    tonic::Status::unknown(
1181                        format!("Service was not ready: {}", e.into()),
1182                    )
1183                })?;
1184            let codec = tonic::codec::ProstCodec::default();
1185            let path = http::uri::PathAndQuery::from_static(
1186                "/nominal.data_connector.v1.DataConnectorService/GetSessionStatus",
1187            );
1188            let mut req = request.into_request();
1189            req.extensions_mut()
1190                .insert(
1191                    GrpcMethod::new(
1192                        "nominal.data_connector.v1.DataConnectorService",
1193                        "GetSessionStatus",
1194                    ),
1195                );
1196            self.inner.unary(req, path, codec).await
1197        }
1198        /// Deletes a data connector. This operation is idempotent.
1199        pub async fn delete_data_connector(
1200            &mut self,
1201            request: impl tonic::IntoRequest<super::DeleteDataConnectorRequest>,
1202        ) -> std::result::Result<
1203            tonic::Response<super::DeleteDataConnectorResponse>,
1204            tonic::Status,
1205        > {
1206            self.inner
1207                .ready()
1208                .await
1209                .map_err(|e| {
1210                    tonic::Status::unknown(
1211                        format!("Service was not ready: {}", e.into()),
1212                    )
1213                })?;
1214            let codec = tonic::codec::ProstCodec::default();
1215            let path = http::uri::PathAndQuery::from_static(
1216                "/nominal.data_connector.v1.DataConnectorService/DeleteDataConnector",
1217            );
1218            let mut req = request.into_request();
1219            req.extensions_mut()
1220                .insert(
1221                    GrpcMethod::new(
1222                        "nominal.data_connector.v1.DataConnectorService",
1223                        "DeleteDataConnector",
1224                    ),
1225                );
1226            self.inner.unary(req, path, codec).await
1227        }
1228    }
1229}