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