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, 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#[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#[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 #[prost(message, repeated, tag = "1")]
180 pub root_nodes: ::prost::alloc::vec::Vec<OpcNode>,
181 #[prost(message, repeated, tag = "2")]
183 pub skip_nodes: ::prost::alloc::vec::Vec<OpcNode>,
184 #[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}
203pub 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}
218pub mod opc_ua_timestamp_handling {
220 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
222 pub struct OpcUaServerTime {}
223 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
225 pub struct OpcUaSourceTime {}
226 #[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 #[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#[derive(Clone, PartialEq, ::prost::Message)]
257pub struct OpcUaScrapingConfig {
258 #[prost(message, optional, tag = "1")]
259 pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
260 #[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 #[prost(bool, tag = "4")]
267 pub override_host: bool,
268 #[prost(enumeration = "OpcUaUnknownDataTypeHandling", tag = "5")]
270 pub unknown_data_type_handling: i32,
271 #[prost(enumeration = "OpcUaFailedMonitorHandling", tag = "6")]
273 pub failed_monitor_handling: i32,
274 #[prost(message, optional, tag = "7")]
276 pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
277 #[prost(message, optional, tag = "8")]
279 pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
280}
281#[derive(Clone, PartialEq, ::prost::Message)]
283pub struct OpcUaScrapingConfigUpdates {
284 #[prost(message, optional, tag = "1")]
285 pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
286 #[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 #[prost(bool, optional, tag = "4")]
293 pub override_host: ::core::option::Option<bool>,
294 #[prost(enumeration = "OpcUaUnknownDataTypeHandling", optional, tag = "5")]
296 pub unknown_data_type_handling: ::core::option::Option<i32>,
297 #[prost(enumeration = "OpcUaFailedMonitorHandling", optional, tag = "6")]
299 pub failed_monitor_handling: ::core::option::Option<i32>,
300 #[prost(message, optional, tag = "7")]
302 pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
303 #[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 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 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 Error = 1,
346 TreatAsDouble = 2,
348 TreatAsString = 3,
350}
351impl OpcUaUnknownDataTypeHandling {
352 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 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 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 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 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 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 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 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#[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#[derive(Clone, PartialEq, ::prost::Message)]
492pub struct CreateDataConnectorResponse {
493 #[prost(message, optional, tag = "1")]
494 pub data_connector: ::core::option::Option<DataConnector>,
495}
496#[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, tag = "6")]
510 pub target_dataset_rid: ::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#[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}
524pub 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}
542pub 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#[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}
558pub 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, Copy, PartialEq, ::prost::Message)]
610pub struct ReplicaStatusFilter {
611 #[prost(enumeration = "ReplicaStatus", tag = "1")]
612 pub replica_status: i32,
613}
614#[derive(Clone, PartialEq, ::prost::Message)]
615pub struct AndFilter {
616 #[prost(message, repeated, tag = "1")]
617 pub clauses: ::prost::alloc::vec::Vec<SearchFilter>,
618}
619#[derive(Clone, Copy, PartialEq, ::prost::Message)]
620pub struct SortBy {
621 #[prost(enumeration = "SortField", tag = "1")]
623 pub field: i32,
624 #[prost(enumeration = "SortOrder", tag = "2")]
626 pub order: i32,
627}
628#[derive(Clone, PartialEq, ::prost::Message)]
629pub struct SearchFilter {
630 #[prost(oneof = "search_filter::Filter", tags = "1, 2, 3, 4, 5")]
631 pub filter: ::core::option::Option<search_filter::Filter>,
632}
633pub mod search_filter {
635 #[derive(Clone, PartialEq, ::prost::Oneof)]
636 pub enum Filter {
637 #[prost(message, tag = "1")]
638 Name(super::NameFilter),
639 #[prost(message, tag = "2")]
640 Description(super::DescriptionFilter),
641 #[prost(message, tag = "3")]
642 TargetDataset(super::TargetDatasetFilter),
643 #[prost(message, tag = "4")]
644 ReplicaStatus(super::ReplicaStatusFilter),
645 #[prost(message, tag = "5")]
646 And(super::AndFilter),
647 }
648}
649#[derive(Clone, PartialEq, ::prost::Message)]
650pub struct SearchRequest {
651 #[prost(string, tag = "1")]
652 pub workspace_rid: ::prost::alloc::string::String,
653 #[prost(message, optional, tag = "2")]
654 pub filter: ::core::option::Option<SearchFilter>,
655 #[prost(int32, tag = "3")]
656 pub page_size: i32,
657 #[prost(string, optional, tag = "4")]
658 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
659 #[prost(message, optional, tag = "5")]
660 pub sort_by: ::core::option::Option<SortBy>,
661}
662#[derive(Clone, PartialEq, ::prost::Message)]
663pub struct SearchResponse {
664 #[prost(message, repeated, tag = "1")]
665 pub data_connectors: ::prost::alloc::vec::Vec<DataConnector>,
666 #[prost(string, optional, tag = "2")]
667 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
668}
669#[derive(Clone, PartialEq, ::prost::Message)]
670pub struct StartSessionRequest {
671 #[prost(string, tag = "1")]
672 pub data_connector_rid: ::prost::alloc::string::String,
673}
674#[derive(Clone, Copy, PartialEq, ::prost::Message)]
675pub struct StartSessionResponse {}
676#[derive(Clone, PartialEq, ::prost::Message)]
677pub struct StopSessionRequest {
678 #[prost(string, tag = "1")]
679 pub data_connector_rid: ::prost::alloc::string::String,
680}
681#[derive(Clone, Copy, PartialEq, ::prost::Message)]
682pub struct StopSessionResponse {}
683#[derive(Clone, PartialEq, ::prost::Message)]
684pub struct GetSessionStatusRequest {
685 #[prost(string, tag = "1")]
686 pub data_connector_rid: ::prost::alloc::string::String,
687}
688#[derive(Clone, PartialEq, ::prost::Message)]
689pub struct ActiveSessionStatus {
690 #[prost(enumeration = "ReplicaStatus", repeated, tag = "1")]
691 pub replica_status: ::prost::alloc::vec::Vec<i32>,
692}
693#[derive(Clone, PartialEq, ::prost::Message)]
694pub struct GetSessionStatusResponse {
695 #[prost(oneof = "get_session_status_response::Status", tags = "1, 2")]
696 pub status: ::core::option::Option<get_session_status_response::Status>,
697}
698pub mod get_session_status_response {
700 #[derive(Clone, PartialEq, ::prost::Oneof)]
701 pub enum Status {
702 #[prost(message, tag = "1")]
703 None(super::super::super::super::google::protobuf::Empty),
704 #[prost(message, tag = "2")]
705 Active(super::ActiveSessionStatus),
706 }
707}
708#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
710#[repr(i32)]
711pub enum DataConnectorErrorType {
712 Unspecified = 0,
713 ConnectorNotFound = 1,
714 ConnectorNotAuthorized = 2,
715 TargetDatasetNotInWorkspace = 3,
716}
717impl DataConnectorErrorType {
718 pub fn as_str_name(&self) -> &'static str {
723 match self {
724 Self::Unspecified => "DATA_CONNECTOR_ERROR_TYPE_UNSPECIFIED",
725 Self::ConnectorNotFound => "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_FOUND",
726 Self::ConnectorNotAuthorized => {
727 "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_AUTHORIZED"
728 }
729 Self::TargetDatasetNotInWorkspace => {
730 "DATA_CONNECTOR_ERROR_TYPE_TARGET_DATASET_NOT_IN_WORKSPACE"
731 }
732 }
733 }
734 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
736 match value {
737 "DATA_CONNECTOR_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
738 "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_FOUND" => {
739 Some(Self::ConnectorNotFound)
740 }
741 "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_AUTHORIZED" => {
742 Some(Self::ConnectorNotAuthorized)
743 }
744 "DATA_CONNECTOR_ERROR_TYPE_TARGET_DATASET_NOT_IN_WORKSPACE" => {
745 Some(Self::TargetDatasetNotInWorkspace)
746 }
747 _ => None,
748 }
749 }
750}
751#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
752#[repr(i32)]
753pub enum SortField {
754 Unspecified = 0,
755 UpdatedAt = 1,
756}
757impl SortField {
758 pub fn as_str_name(&self) -> &'static str {
763 match self {
764 Self::Unspecified => "SORT_FIELD_UNSPECIFIED",
765 Self::UpdatedAt => "SORT_FIELD_UPDATED_AT",
766 }
767 }
768 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
770 match value {
771 "SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
772 "SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
773 _ => None,
774 }
775 }
776}
777#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
778#[repr(i32)]
779pub enum SortOrder {
780 Unspecified = 0,
781 Asc = 1,
782 Desc = 2,
783}
784impl SortOrder {
785 pub fn as_str_name(&self) -> &'static str {
790 match self {
791 Self::Unspecified => "SORT_ORDER_UNSPECIFIED",
792 Self::Asc => "SORT_ORDER_ASC",
793 Self::Desc => "SORT_ORDER_DESC",
794 }
795 }
796 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
798 match value {
799 "SORT_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
800 "SORT_ORDER_ASC" => Some(Self::Asc),
801 "SORT_ORDER_DESC" => Some(Self::Desc),
802 _ => None,
803 }
804 }
805}
806#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
807#[repr(i32)]
808pub enum ReplicaStatus {
809 Unspecified = 0,
810 Starting = 1,
811 Subscribing = 2,
812 Running = 3,
813 Stopping = 4,
814 Stopped = 5,
815}
816impl ReplicaStatus {
817 pub fn as_str_name(&self) -> &'static str {
822 match self {
823 Self::Unspecified => "REPLICA_STATUS_UNSPECIFIED",
824 Self::Starting => "REPLICA_STATUS_STARTING",
825 Self::Subscribing => "REPLICA_STATUS_SUBSCRIBING",
826 Self::Running => "REPLICA_STATUS_RUNNING",
827 Self::Stopping => "REPLICA_STATUS_STOPPING",
828 Self::Stopped => "REPLICA_STATUS_STOPPED",
829 }
830 }
831 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
833 match value {
834 "REPLICA_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
835 "REPLICA_STATUS_STARTING" => Some(Self::Starting),
836 "REPLICA_STATUS_SUBSCRIBING" => Some(Self::Subscribing),
837 "REPLICA_STATUS_RUNNING" => Some(Self::Running),
838 "REPLICA_STATUS_STOPPING" => Some(Self::Stopping),
839 "REPLICA_STATUS_STOPPED" => Some(Self::Stopped),
840 _ => None,
841 }
842 }
843}
844pub mod data_connector_service_client {
846 #![allow(
847 unused_variables,
848 dead_code,
849 missing_docs,
850 clippy::wildcard_imports,
851 clippy::let_unit_value,
852 )]
853 use tonic::codegen::*;
854 use tonic::codegen::http::Uri;
855 #[derive(Debug, Clone)]
858 pub struct DataConnectorServiceClient<T> {
859 inner: tonic::client::Grpc<T>,
860 }
861 impl DataConnectorServiceClient<tonic::transport::Channel> {
862 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
864 where
865 D: TryInto<tonic::transport::Endpoint>,
866 D::Error: Into<StdError>,
867 {
868 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
869 Ok(Self::new(conn))
870 }
871 }
872 impl<T> DataConnectorServiceClient<T>
873 where
874 T: tonic::client::GrpcService<tonic::body::Body>,
875 T::Error: Into<StdError>,
876 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
877 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
878 {
879 pub fn new(inner: T) -> Self {
880 let inner = tonic::client::Grpc::new(inner);
881 Self { inner }
882 }
883 pub fn with_origin(inner: T, origin: Uri) -> Self {
884 let inner = tonic::client::Grpc::with_origin(inner, origin);
885 Self { inner }
886 }
887 pub fn with_interceptor<F>(
888 inner: T,
889 interceptor: F,
890 ) -> DataConnectorServiceClient<InterceptedService<T, F>>
891 where
892 F: tonic::service::Interceptor,
893 T::ResponseBody: Default,
894 T: tonic::codegen::Service<
895 http::Request<tonic::body::Body>,
896 Response = http::Response<
897 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
898 >,
899 >,
900 <T as tonic::codegen::Service<
901 http::Request<tonic::body::Body>,
902 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
903 {
904 DataConnectorServiceClient::new(InterceptedService::new(inner, interceptor))
905 }
906 #[must_use]
911 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
912 self.inner = self.inner.send_compressed(encoding);
913 self
914 }
915 #[must_use]
917 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
918 self.inner = self.inner.accept_compressed(encoding);
919 self
920 }
921 #[must_use]
925 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
926 self.inner = self.inner.max_decoding_message_size(limit);
927 self
928 }
929 #[must_use]
933 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
934 self.inner = self.inner.max_encoding_message_size(limit);
935 self
936 }
937 pub async fn create_data_connector(
939 &mut self,
940 request: impl tonic::IntoRequest<super::CreateDataConnectorRequest>,
941 ) -> std::result::Result<
942 tonic::Response<super::CreateDataConnectorResponse>,
943 tonic::Status,
944 > {
945 self.inner
946 .ready()
947 .await
948 .map_err(|e| {
949 tonic::Status::unknown(
950 format!("Service was not ready: {}", e.into()),
951 )
952 })?;
953 let codec = tonic::codec::ProstCodec::default();
954 let path = http::uri::PathAndQuery::from_static(
955 "/nominal.data_connector.v1.DataConnectorService/CreateDataConnector",
956 );
957 let mut req = request.into_request();
958 req.extensions_mut()
959 .insert(
960 GrpcMethod::new(
961 "nominal.data_connector.v1.DataConnectorService",
962 "CreateDataConnector",
963 ),
964 );
965 self.inner.unary(req, path, codec).await
966 }
967 pub async fn get_data_connector(
969 &mut self,
970 request: impl tonic::IntoRequest<super::GetDataConnectorRequest>,
971 ) -> std::result::Result<
972 tonic::Response<super::GetDataConnectorResponse>,
973 tonic::Status,
974 > {
975 self.inner
976 .ready()
977 .await
978 .map_err(|e| {
979 tonic::Status::unknown(
980 format!("Service was not ready: {}", e.into()),
981 )
982 })?;
983 let codec = tonic::codec::ProstCodec::default();
984 let path = http::uri::PathAndQuery::from_static(
985 "/nominal.data_connector.v1.DataConnectorService/GetDataConnector",
986 );
987 let mut req = request.into_request();
988 req.extensions_mut()
989 .insert(
990 GrpcMethod::new(
991 "nominal.data_connector.v1.DataConnectorService",
992 "GetDataConnector",
993 ),
994 );
995 self.inner.unary(req, path, codec).await
996 }
997 pub async fn update_data_connector(
999 &mut self,
1000 request: impl tonic::IntoRequest<super::UpdateDataConnectorRequest>,
1001 ) -> std::result::Result<
1002 tonic::Response<super::UpdateDataConnectorResponse>,
1003 tonic::Status,
1004 > {
1005 self.inner
1006 .ready()
1007 .await
1008 .map_err(|e| {
1009 tonic::Status::unknown(
1010 format!("Service was not ready: {}", e.into()),
1011 )
1012 })?;
1013 let codec = tonic::codec::ProstCodec::default();
1014 let path = http::uri::PathAndQuery::from_static(
1015 "/nominal.data_connector.v1.DataConnectorService/UpdateDataConnector",
1016 );
1017 let mut req = request.into_request();
1018 req.extensions_mut()
1019 .insert(
1020 GrpcMethod::new(
1021 "nominal.data_connector.v1.DataConnectorService",
1022 "UpdateDataConnector",
1023 ),
1024 );
1025 self.inner.unary(req, path, codec).await
1026 }
1027 pub async fn search(
1029 &mut self,
1030 request: impl tonic::IntoRequest<super::SearchRequest>,
1031 ) -> std::result::Result<tonic::Response<super::SearchResponse>, tonic::Status> {
1032 self.inner
1033 .ready()
1034 .await
1035 .map_err(|e| {
1036 tonic::Status::unknown(
1037 format!("Service was not ready: {}", e.into()),
1038 )
1039 })?;
1040 let codec = tonic::codec::ProstCodec::default();
1041 let path = http::uri::PathAndQuery::from_static(
1042 "/nominal.data_connector.v1.DataConnectorService/Search",
1043 );
1044 let mut req = request.into_request();
1045 req.extensions_mut()
1046 .insert(
1047 GrpcMethod::new(
1048 "nominal.data_connector.v1.DataConnectorService",
1049 "Search",
1050 ),
1051 );
1052 self.inner.unary(req, path, codec).await
1053 }
1054 pub async fn start_session(
1056 &mut self,
1057 request: impl tonic::IntoRequest<super::StartSessionRequest>,
1058 ) -> std::result::Result<
1059 tonic::Response<super::StartSessionResponse>,
1060 tonic::Status,
1061 > {
1062 self.inner
1063 .ready()
1064 .await
1065 .map_err(|e| {
1066 tonic::Status::unknown(
1067 format!("Service was not ready: {}", e.into()),
1068 )
1069 })?;
1070 let codec = tonic::codec::ProstCodec::default();
1071 let path = http::uri::PathAndQuery::from_static(
1072 "/nominal.data_connector.v1.DataConnectorService/StartSession",
1073 );
1074 let mut req = request.into_request();
1075 req.extensions_mut()
1076 .insert(
1077 GrpcMethod::new(
1078 "nominal.data_connector.v1.DataConnectorService",
1079 "StartSession",
1080 ),
1081 );
1082 self.inner.unary(req, path, codec).await
1083 }
1084 pub async fn stop_session(
1086 &mut self,
1087 request: impl tonic::IntoRequest<super::StopSessionRequest>,
1088 ) -> std::result::Result<
1089 tonic::Response<super::StopSessionResponse>,
1090 tonic::Status,
1091 > {
1092 self.inner
1093 .ready()
1094 .await
1095 .map_err(|e| {
1096 tonic::Status::unknown(
1097 format!("Service was not ready: {}", e.into()),
1098 )
1099 })?;
1100 let codec = tonic::codec::ProstCodec::default();
1101 let path = http::uri::PathAndQuery::from_static(
1102 "/nominal.data_connector.v1.DataConnectorService/StopSession",
1103 );
1104 let mut req = request.into_request();
1105 req.extensions_mut()
1106 .insert(
1107 GrpcMethod::new(
1108 "nominal.data_connector.v1.DataConnectorService",
1109 "StopSession",
1110 ),
1111 );
1112 self.inner.unary(req, path, codec).await
1113 }
1114 pub async fn get_session_status(
1116 &mut self,
1117 request: impl tonic::IntoRequest<super::GetSessionStatusRequest>,
1118 ) -> std::result::Result<
1119 tonic::Response<super::GetSessionStatusResponse>,
1120 tonic::Status,
1121 > {
1122 self.inner
1123 .ready()
1124 .await
1125 .map_err(|e| {
1126 tonic::Status::unknown(
1127 format!("Service was not ready: {}", e.into()),
1128 )
1129 })?;
1130 let codec = tonic::codec::ProstCodec::default();
1131 let path = http::uri::PathAndQuery::from_static(
1132 "/nominal.data_connector.v1.DataConnectorService/GetSessionStatus",
1133 );
1134 let mut req = request.into_request();
1135 req.extensions_mut()
1136 .insert(
1137 GrpcMethod::new(
1138 "nominal.data_connector.v1.DataConnectorService",
1139 "GetSessionStatus",
1140 ),
1141 );
1142 self.inner.unary(req, path, codec).await
1143 }
1144 }
1145}