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