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, 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#[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 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 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 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 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 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 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 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 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}
894pub 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 #[derive(Debug, Clone)]
908 pub struct DataConnectorServiceClient<T> {
909 inner: tonic::client::Grpc<T>,
910 }
911 impl DataConnectorServiceClient<tonic::transport::Channel> {
912 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 #[must_use]
961 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
962 self.inner = self.inner.send_compressed(encoding);
963 self
964 }
965 #[must_use]
967 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
968 self.inner = self.inner.accept_compressed(encoding);
969 self
970 }
971 #[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 #[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 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 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 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 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 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 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 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 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}