1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct OpcAuthenticationConfig {
5 #[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}
14pub mod opc_authentication_config {
16 #[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#[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}
38pub 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#[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}
82pub 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#[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#[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}
111pub 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 #[derive(Clone, PartialEq, ::prost::Message)]
121 pub struct OpcUaFullPath {
122 #[prost(message, repeated, tag = "1")]
124 pub root_nodes: ::prost::alloc::vec::Vec<super::OpcNode>,
125 #[prost(string, tag = "2")]
127 pub delimiter: ::prost::alloc::string::String,
128 }
129 #[derive(Clone, PartialEq, ::prost::Oneof)]
130 pub enum NamingConvention {
131 #[prost(message, tag = "1")]
133 NodeId(OpcUaNodeId),
134 #[prost(message, tag = "2")]
136 BrowseName(OpcUaBrowseName),
137 #[prost(message, tag = "3")]
139 DisplayName(OpcUaDisplayName),
140 #[prost(message, tag = "4")]
142 FullPath(OpcUaFullPath),
143 }
144}
145#[derive(Clone, Copy, PartialEq, ::prost::Message)]
147pub struct OpcUaSubscriptionConfig {
148 #[prost(enumeration = "OpcUaFailedMonitorHandling", tag = "1")]
150 pub failed_monitor_handling: i32,
151 #[prost(message, optional, tag = "2")]
153 pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
154}
155#[derive(Clone, Copy, PartialEq, ::prost::Message)]
157pub struct OpcUaPollingConfig {
158 #[prost(uint64, tag = "1")]
160 pub polling_interval_ms: u64,
161}
162#[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}
170pub mod opc_ua_data_acquisition_config {
172 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
173 pub enum AcquisitionMode {
174 #[prost(message, tag = "1")]
176 Subscription(super::OpcUaSubscriptionConfig),
177 #[prost(message, tag = "2")]
179 Polling(super::OpcUaPollingConfig),
180 }
181}
182#[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#[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#[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 #[prost(message, repeated, tag = "1")]
218 pub root_nodes: ::prost::alloc::vec::Vec<OpcNode>,
219 #[prost(message, repeated, tag = "2")]
221 pub skip_nodes: ::prost::alloc::vec::Vec<OpcNode>,
222 #[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}
241pub 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}
256pub mod opc_ua_timestamp_handling {
258 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
260 pub struct OpcUaServerTime {}
261 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
263 pub struct OpcUaSourceTime {}
264 #[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 #[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#[derive(Clone, PartialEq, ::prost::Message)]
295pub struct OpcUaScrapingConfig {
296 #[prost(message, optional, tag = "1")]
297 pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
298 #[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 #[prost(bool, tag = "4")]
305 pub override_host: bool,
306 #[prost(enumeration = "OpcUaUnknownDataTypeHandling", tag = "5")]
308 pub unknown_data_type_handling: i32,
309 #[deprecated]
311 #[prost(enumeration = "OpcUaFailedMonitorHandling", optional, tag = "6")]
312 pub failed_monitor_handling: ::core::option::Option<i32>,
313 #[prost(message, optional, tag = "7")]
315 pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
316 #[deprecated]
318 #[prost(message, optional, tag = "8")]
319 pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
320 #[prost(message, optional, tag = "9")]
323 pub data_acquisition_config: ::core::option::Option<OpcUaDataAcquisitionConfig>,
324}
325#[derive(Clone, PartialEq, ::prost::Message)]
327pub struct OpcUaScrapingConfigUpdates {
328 #[prost(message, optional, tag = "1")]
329 pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
330 #[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 #[prost(bool, optional, tag = "4")]
337 pub override_host: ::core::option::Option<bool>,
338 #[prost(enumeration = "OpcUaUnknownDataTypeHandling", optional, tag = "5")]
340 pub unknown_data_type_handling: ::core::option::Option<i32>,
341 #[deprecated]
343 #[prost(enumeration = "OpcUaFailedMonitorHandling", optional, tag = "6")]
344 pub failed_monitor_handling: ::core::option::Option<i32>,
345 #[prost(message, optional, tag = "7")]
347 pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
348 #[deprecated]
350 #[prost(message, optional, tag = "8")]
351 pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
352 #[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 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 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 Error = 1,
395 TreatAsDouble = 2,
397 TreatAsString = 3,
399}
400impl OpcUaUnknownDataTypeHandling {
401 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 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 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 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 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 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 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 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#[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#[derive(Clone, PartialEq, ::prost::Message)]
541pub struct CreateDataConnectorResponse {
542 #[prost(message, optional, tag = "1")]
543 pub data_connector: ::core::option::Option<DataConnector>,
544}
545#[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#[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}
573pub 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}
591pub 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#[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}
607pub 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 #[prost(enumeration = "SortField", tag = "1")]
667 pub field: i32,
668 #[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}
677pub 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 #[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}
741pub 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, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
753#[repr(i32)]
754pub enum DataConnectorErrorType {
755 Unspecified = 0,
756 ConnectorNotFound = 1,
757 ConnectorNotAuthorized = 2,
758 TargetDatasetNotInWorkspace = 3,
759}
760impl DataConnectorErrorType {
761 pub fn as_str_name(&self) -> &'static str {
766 match self {
767 Self::Unspecified => "DATA_CONNECTOR_ERROR_TYPE_UNSPECIFIED",
768 Self::ConnectorNotFound => "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_FOUND",
769 Self::ConnectorNotAuthorized => {
770 "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_AUTHORIZED"
771 }
772 Self::TargetDatasetNotInWorkspace => {
773 "DATA_CONNECTOR_ERROR_TYPE_TARGET_DATASET_NOT_IN_WORKSPACE"
774 }
775 }
776 }
777 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
779 match value {
780 "DATA_CONNECTOR_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
781 "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_FOUND" => {
782 Some(Self::ConnectorNotFound)
783 }
784 "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_AUTHORIZED" => {
785 Some(Self::ConnectorNotAuthorized)
786 }
787 "DATA_CONNECTOR_ERROR_TYPE_TARGET_DATASET_NOT_IN_WORKSPACE" => {
788 Some(Self::TargetDatasetNotInWorkspace)
789 }
790 _ => None,
791 }
792 }
793}
794#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
795#[repr(i32)]
796pub enum SortField {
797 Unspecified = 0,
798 UpdatedAt = 1,
799}
800impl SortField {
801 pub fn as_str_name(&self) -> &'static str {
806 match self {
807 Self::Unspecified => "SORT_FIELD_UNSPECIFIED",
808 Self::UpdatedAt => "SORT_FIELD_UPDATED_AT",
809 }
810 }
811 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
813 match value {
814 "SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
815 "SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
816 _ => None,
817 }
818 }
819}
820#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
821#[repr(i32)]
822pub enum SortOrder {
823 Unspecified = 0,
824 Asc = 1,
825 Desc = 2,
826}
827impl SortOrder {
828 pub fn as_str_name(&self) -> &'static str {
833 match self {
834 Self::Unspecified => "SORT_ORDER_UNSPECIFIED",
835 Self::Asc => "SORT_ORDER_ASC",
836 Self::Desc => "SORT_ORDER_DESC",
837 }
838 }
839 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
841 match value {
842 "SORT_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
843 "SORT_ORDER_ASC" => Some(Self::Asc),
844 "SORT_ORDER_DESC" => Some(Self::Desc),
845 _ => None,
846 }
847 }
848}
849#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
850#[repr(i32)]
851pub enum ReplicaStatus {
852 Unspecified = 0,
853 Starting = 1,
854 Subscribing = 2,
855 Running = 3,
856 Stopping = 4,
857 Stopped = 5,
858}
859impl ReplicaStatus {
860 pub fn as_str_name(&self) -> &'static str {
865 match self {
866 Self::Unspecified => "REPLICA_STATUS_UNSPECIFIED",
867 Self::Starting => "REPLICA_STATUS_STARTING",
868 Self::Subscribing => "REPLICA_STATUS_SUBSCRIBING",
869 Self::Running => "REPLICA_STATUS_RUNNING",
870 Self::Stopping => "REPLICA_STATUS_STOPPING",
871 Self::Stopped => "REPLICA_STATUS_STOPPED",
872 }
873 }
874 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
876 match value {
877 "REPLICA_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
878 "REPLICA_STATUS_STARTING" => Some(Self::Starting),
879 "REPLICA_STATUS_SUBSCRIBING" => Some(Self::Subscribing),
880 "REPLICA_STATUS_RUNNING" => Some(Self::Running),
881 "REPLICA_STATUS_STOPPING" => Some(Self::Stopping),
882 "REPLICA_STATUS_STOPPED" => Some(Self::Stopped),
883 _ => None,
884 }
885 }
886}
887pub mod data_connector_service_client {
889 #![allow(
890 unused_variables,
891 dead_code,
892 missing_docs,
893 clippy::wildcard_imports,
894 clippy::let_unit_value,
895 )]
896 use tonic::codegen::*;
897 use tonic::codegen::http::Uri;
898 #[derive(Debug, Clone)]
901 pub struct DataConnectorServiceClient<T> {
902 inner: tonic::client::Grpc<T>,
903 }
904 impl DataConnectorServiceClient<tonic::transport::Channel> {
905 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
907 where
908 D: TryInto<tonic::transport::Endpoint>,
909 D::Error: Into<StdError>,
910 {
911 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
912 Ok(Self::new(conn))
913 }
914 }
915 impl<T> DataConnectorServiceClient<T>
916 where
917 T: tonic::client::GrpcService<tonic::body::Body>,
918 T::Error: Into<StdError>,
919 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
920 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
921 {
922 pub fn new(inner: T) -> Self {
923 let inner = tonic::client::Grpc::new(inner);
924 Self { inner }
925 }
926 pub fn with_origin(inner: T, origin: Uri) -> Self {
927 let inner = tonic::client::Grpc::with_origin(inner, origin);
928 Self { inner }
929 }
930 pub fn with_interceptor<F>(
931 inner: T,
932 interceptor: F,
933 ) -> DataConnectorServiceClient<InterceptedService<T, F>>
934 where
935 F: tonic::service::Interceptor,
936 T::ResponseBody: Default,
937 T: tonic::codegen::Service<
938 http::Request<tonic::body::Body>,
939 Response = http::Response<
940 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
941 >,
942 >,
943 <T as tonic::codegen::Service<
944 http::Request<tonic::body::Body>,
945 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
946 {
947 DataConnectorServiceClient::new(InterceptedService::new(inner, interceptor))
948 }
949 #[must_use]
954 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
955 self.inner = self.inner.send_compressed(encoding);
956 self
957 }
958 #[must_use]
960 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
961 self.inner = self.inner.accept_compressed(encoding);
962 self
963 }
964 #[must_use]
968 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
969 self.inner = self.inner.max_decoding_message_size(limit);
970 self
971 }
972 #[must_use]
976 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
977 self.inner = self.inner.max_encoding_message_size(limit);
978 self
979 }
980 pub async fn create_data_connector(
982 &mut self,
983 request: impl tonic::IntoRequest<super::CreateDataConnectorRequest>,
984 ) -> std::result::Result<
985 tonic::Response<super::CreateDataConnectorResponse>,
986 tonic::Status,
987 > {
988 self.inner
989 .ready()
990 .await
991 .map_err(|e| {
992 tonic::Status::unknown(
993 format!("Service was not ready: {}", e.into()),
994 )
995 })?;
996 let codec = tonic::codec::ProstCodec::default();
997 let path = http::uri::PathAndQuery::from_static(
998 "/nominal.data_connector.v1.DataConnectorService/CreateDataConnector",
999 );
1000 let mut req = request.into_request();
1001 req.extensions_mut()
1002 .insert(
1003 GrpcMethod::new(
1004 "nominal.data_connector.v1.DataConnectorService",
1005 "CreateDataConnector",
1006 ),
1007 );
1008 self.inner.unary(req, path, codec).await
1009 }
1010 pub async fn get_data_connector(
1012 &mut self,
1013 request: impl tonic::IntoRequest<super::GetDataConnectorRequest>,
1014 ) -> std::result::Result<
1015 tonic::Response<super::GetDataConnectorResponse>,
1016 tonic::Status,
1017 > {
1018 self.inner
1019 .ready()
1020 .await
1021 .map_err(|e| {
1022 tonic::Status::unknown(
1023 format!("Service was not ready: {}", e.into()),
1024 )
1025 })?;
1026 let codec = tonic::codec::ProstCodec::default();
1027 let path = http::uri::PathAndQuery::from_static(
1028 "/nominal.data_connector.v1.DataConnectorService/GetDataConnector",
1029 );
1030 let mut req = request.into_request();
1031 req.extensions_mut()
1032 .insert(
1033 GrpcMethod::new(
1034 "nominal.data_connector.v1.DataConnectorService",
1035 "GetDataConnector",
1036 ),
1037 );
1038 self.inner.unary(req, path, codec).await
1039 }
1040 pub async fn update_data_connector(
1042 &mut self,
1043 request: impl tonic::IntoRequest<super::UpdateDataConnectorRequest>,
1044 ) -> std::result::Result<
1045 tonic::Response<super::UpdateDataConnectorResponse>,
1046 tonic::Status,
1047 > {
1048 self.inner
1049 .ready()
1050 .await
1051 .map_err(|e| {
1052 tonic::Status::unknown(
1053 format!("Service was not ready: {}", e.into()),
1054 )
1055 })?;
1056 let codec = tonic::codec::ProstCodec::default();
1057 let path = http::uri::PathAndQuery::from_static(
1058 "/nominal.data_connector.v1.DataConnectorService/UpdateDataConnector",
1059 );
1060 let mut req = request.into_request();
1061 req.extensions_mut()
1062 .insert(
1063 GrpcMethod::new(
1064 "nominal.data_connector.v1.DataConnectorService",
1065 "UpdateDataConnector",
1066 ),
1067 );
1068 self.inner.unary(req, path, codec).await
1069 }
1070 pub async fn search(
1072 &mut self,
1073 request: impl tonic::IntoRequest<super::SearchRequest>,
1074 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
1075 self.inner
1076 .ready()
1077 .await
1078 .map_err(|e| {
1079 tonic::Status::unknown(
1080 format!("Service was not ready: {}", e.into()),
1081 )
1082 })?;
1083 let codec = tonic::codec::ProstCodec::default();
1084 let path = http::uri::PathAndQuery::from_static(
1085 "/nominal.data_connector.v1.DataConnectorService/Search",
1086 );
1087 let mut req = request.into_request();
1088 req.extensions_mut()
1089 .insert(
1090 GrpcMethod::new(
1091 "nominal.data_connector.v1.DataConnectorService",
1092 "Search",
1093 ),
1094 );
1095 self.inner.unary(req, path, codec).await
1096 }
1097 pub async fn start_session(
1099 &mut self,
1100 request: impl tonic::IntoRequest<super::StartSessionRequest>,
1101 ) -> std::result::Result<
1102 tonic::Response<super::StartSessionResponse>,
1103 tonic::Status,
1104 > {
1105 self.inner
1106 .ready()
1107 .await
1108 .map_err(|e| {
1109 tonic::Status::unknown(
1110 format!("Service was not ready: {}", e.into()),
1111 )
1112 })?;
1113 let codec = tonic::codec::ProstCodec::default();
1114 let path = http::uri::PathAndQuery::from_static(
1115 "/nominal.data_connector.v1.DataConnectorService/StartSession",
1116 );
1117 let mut req = request.into_request();
1118 req.extensions_mut()
1119 .insert(
1120 GrpcMethod::new(
1121 "nominal.data_connector.v1.DataConnectorService",
1122 "StartSession",
1123 ),
1124 );
1125 self.inner.unary(req, path, codec).await
1126 }
1127 pub async fn stop_session(
1129 &mut self,
1130 request: impl tonic::IntoRequest<super::StopSessionRequest>,
1131 ) -> std::result::Result<
1132 tonic::Response<super::StopSessionResponse>,
1133 tonic::Status,
1134 > {
1135 self.inner
1136 .ready()
1137 .await
1138 .map_err(|e| {
1139 tonic::Status::unknown(
1140 format!("Service was not ready: {}", e.into()),
1141 )
1142 })?;
1143 let codec = tonic::codec::ProstCodec::default();
1144 let path = http::uri::PathAndQuery::from_static(
1145 "/nominal.data_connector.v1.DataConnectorService/StopSession",
1146 );
1147 let mut req = request.into_request();
1148 req.extensions_mut()
1149 .insert(
1150 GrpcMethod::new(
1151 "nominal.data_connector.v1.DataConnectorService",
1152 "StopSession",
1153 ),
1154 );
1155 self.inner.unary(req, path, codec).await
1156 }
1157 pub async fn get_session_status(
1159 &mut self,
1160 request: impl tonic::IntoRequest<super::GetSessionStatusRequest>,
1161 ) -> std::result::Result<
1162 tonic::Response<super::GetSessionStatusResponse>,
1163 tonic::Status,
1164 > {
1165 self.inner
1166 .ready()
1167 .await
1168 .map_err(|e| {
1169 tonic::Status::unknown(
1170 format!("Service was not ready: {}", e.into()),
1171 )
1172 })?;
1173 let codec = tonic::codec::ProstCodec::default();
1174 let path = http::uri::PathAndQuery::from_static(
1175 "/nominal.data_connector.v1.DataConnectorService/GetSessionStatus",
1176 );
1177 let mut req = request.into_request();
1178 req.extensions_mut()
1179 .insert(
1180 GrpcMethod::new(
1181 "nominal.data_connector.v1.DataConnectorService",
1182 "GetSessionStatus",
1183 ),
1184 );
1185 self.inner.unary(req, path, codec).await
1186 }
1187 }
1188}