1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct OpcAuthenticationConfig {
5 #[prost(
6 oneof = "opc_authentication_config::OpcAuthenticationConfig",
7 tags = "1, 2, 3"
8 )]
9 pub opc_authentication_config: ::core::option::Option<
10 opc_authentication_config::OpcAuthenticationConfig,
11 >,
12}
13pub mod opc_authentication_config {
15 #[derive(Clone, PartialEq, ::prost::Oneof)]
16 pub enum OpcAuthenticationConfig {
17 #[prost(message, tag = "1")]
18 Anonymous(super::super::super::super::google::protobuf::Empty),
19 #[prost(message, tag = "2")]
20 UsernamePassword(super::OpcUsernamePasswordAuthentication),
21 #[prost(message, tag = "3")]
22 Token(super::OpcTokenAuthentication),
23 }
24}
25#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct OpcAuthenticationConfigSecret {
28 #[prost(
29 oneof = "opc_authentication_config_secret::OpcAuthenticationConfig",
30 tags = "1, 2, 3"
31 )]
32 pub opc_authentication_config: ::core::option::Option<
33 opc_authentication_config_secret::OpcAuthenticationConfig,
34 >,
35}
36pub mod opc_authentication_config_secret {
38 #[derive(Clone, PartialEq, ::prost::Oneof)]
39 pub enum OpcAuthenticationConfig {
40 #[prost(message, tag = "1")]
41 Anonymous(super::super::super::super::google::protobuf::Empty),
42 #[prost(message, tag = "2")]
43 UsernamePassword(super::OpcUsernamePasswordAuthenticationSecret),
44 #[prost(message, tag = "3")]
45 Token(super::OpcTokenAuthenticationSecret),
46 }
47}
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct OpcUsernamePasswordAuthentication {
50 #[prost(string, tag = "1")]
51 pub username: ::prost::alloc::string::String,
52 #[prost(string, tag = "2")]
53 pub password: ::prost::alloc::string::String,
54}
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct OpcUsernamePasswordAuthenticationSecret {
57 #[prost(string, tag = "1")]
58 pub username: ::prost::alloc::string::String,
59 #[prost(string, tag = "2")]
60 pub password: ::prost::alloc::string::String,
61}
62#[derive(Clone, PartialEq, ::prost::Message)]
63pub struct OpcTokenAuthentication {
64 #[prost(string, tag = "1")]
65 pub token: ::prost::alloc::string::String,
66}
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct OpcTokenAuthenticationSecret {
69 #[prost(string, tag = "1")]
70 pub token: ::prost::alloc::string::String,
71}
72#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct OpcIdentifierValue {
75 #[prost(oneof = "opc_identifier_value::OpcIdentifierValue", tags = "1, 2")]
76 pub opc_identifier_value: ::core::option::Option<
77 opc_identifier_value::OpcIdentifierValue,
78 >,
79}
80pub mod opc_identifier_value {
82 #[derive(Clone, PartialEq, ::prost::Oneof)]
83 pub enum OpcIdentifierValue {
84 #[prost(int32, tag = "1")]
85 Numeric(i32),
86 #[prost(string, tag = "2")]
87 String(::prost::alloc::string::String),
88 }
89}
90#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct OpcNode {
93 #[prost(uint32, optional, tag = "1")]
94 pub namespace: ::core::option::Option<u32>,
95 #[prost(message, optional, tag = "2")]
96 pub identifier: ::core::option::Option<OpcIdentifierValue>,
97}
98#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct OpcUaChannelNamingConvention {
101 #[prost(
102 oneof = "opc_ua_channel_naming_convention::NamingConvention",
103 tags = "1, 2, 3, 4"
104 )]
105 pub naming_convention: ::core::option::Option<
106 opc_ua_channel_naming_convention::NamingConvention,
107 >,
108}
109pub mod opc_ua_channel_naming_convention {
111 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
112 pub struct OpcUaNodeId {}
113 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
114 pub struct OpcUaBrowseName {}
115 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
116 pub struct OpcUaDisplayName {}
117 #[derive(Clone, PartialEq, ::prost::Message)]
119 pub struct OpcUaFullPath {
120 #[prost(message, repeated, tag = "1")]
122 pub root_nodes: ::prost::alloc::vec::Vec<super::OpcNode>,
123 #[prost(string, tag = "2")]
125 pub delimiter: ::prost::alloc::string::String,
126 }
127 #[derive(Clone, PartialEq, ::prost::Oneof)]
128 pub enum NamingConvention {
129 #[prost(message, tag = "1")]
131 NodeId(OpcUaNodeId),
132 #[prost(message, tag = "2")]
134 BrowseName(OpcUaBrowseName),
135 #[prost(message, tag = "3")]
137 DisplayName(OpcUaDisplayName),
138 #[prost(message, tag = "4")]
140 FullPath(OpcUaFullPath),
141 }
142}
143#[derive(Clone, PartialEq, ::prost::Message)]
145pub struct OpcUaConnectionDetails {
146 #[prost(string, tag = "1")]
147 pub uri: ::prost::alloc::string::String,
148 #[prost(enumeration = "OpcSecurityPolicy", tag = "2")]
149 pub security_policy: i32,
150 #[prost(message, optional, tag = "3")]
151 pub authentication_config: ::core::option::Option<OpcAuthenticationConfig>,
152}
153#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct OpcUaConnectionDetailsSecret {
156 #[prost(string, tag = "1")]
157 pub uri: ::prost::alloc::string::String,
158 #[prost(enumeration = "OpcSecurityPolicy", tag = "2")]
159 pub security_policy: i32,
160 #[prost(message, optional, tag = "3")]
161 pub authentication_config: ::core::option::Option<OpcAuthenticationConfigSecret>,
162}
163#[derive(Clone, PartialEq, ::prost::Message)]
164pub struct OpcUaTraversalConfig {
165 #[prost(message, repeated, tag = "1")]
168 pub root_nodes: ::prost::alloc::vec::Vec<OpcNode>,
169 #[prost(message, repeated, tag = "2")]
171 pub skip_nodes: ::prost::alloc::vec::Vec<OpcNode>,
172 #[prost(enumeration = "OpcUaReferenceExplorationType", tag = "3")]
174 pub reference_exploration_type: i32,
175}
176#[derive(Clone, PartialEq, ::prost::Message)]
177pub struct OpcUaDirectNodeSubscription {
178 #[prost(message, repeated, tag = "1")]
179 pub nodes: ::prost::alloc::vec::Vec<OpcNode>,
180}
181#[derive(Clone, PartialEq, ::prost::Message)]
182pub struct OpcUaNodeExplorationConfig {
183 #[prost(
184 oneof = "opc_ua_node_exploration_config::OpcUaNodeExplorationConfig",
185 tags = "1, 2"
186 )]
187 pub opc_ua_node_exploration_config: ::core::option::Option<
188 opc_ua_node_exploration_config::OpcUaNodeExplorationConfig,
189 >,
190}
191pub mod opc_ua_node_exploration_config {
193 #[derive(Clone, PartialEq, ::prost::Oneof)]
194 pub enum OpcUaNodeExplorationConfig {
195 #[prost(message, tag = "1")]
196 OpcUaTraversalConfig(super::OpcUaTraversalConfig),
197 #[prost(message, tag = "2")]
198 OpcUaDirectNodeSubscription(super::OpcUaDirectNodeSubscription),
199 }
200}
201#[derive(Clone, Copy, PartialEq, ::prost::Message)]
202pub struct OpcUaTimestampHandling {
203 #[prost(oneof = "opc_ua_timestamp_handling::TimestampType", tags = "1, 2, 3")]
204 pub timestamp_type: ::core::option::Option<opc_ua_timestamp_handling::TimestampType>,
205}
206pub mod opc_ua_timestamp_handling {
208 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
210 pub struct OpcUaServerTime {}
211 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
213 pub struct OpcUaSourceTime {}
214 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
217 pub struct OpcUaRelativeTimestamp {
218 #[prost(message, optional, tag = "1")]
219 pub offset: ::core::option::Option<
220 super::super::super::super::google::protobuf::Timestamp,
221 >,
222 }
223 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
224 pub enum TimestampType {
225 #[prost(message, tag = "1")]
226 Server(OpcUaServerTime),
227 #[prost(message, tag = "2")]
228 Source(OpcUaSourceTime),
229 #[prost(message, tag = "3")]
230 Relative(OpcUaRelativeTimestamp),
231 }
232}
233#[derive(Clone, Copy, PartialEq, ::prost::Message)]
234pub struct OpcUaDataChangeFilter {
235 #[prost(enumeration = "OpcUaDataChangeTrigger", tag = "1")]
237 pub trigger: i32,
238 #[prost(enumeration = "OpcUaDeadbandType", tag = "2")]
239 pub deadband_type: i32,
240 #[prost(double, tag = "3")]
241 pub deadband_value: f64,
242}
243#[derive(Clone, PartialEq, ::prost::Message)]
245pub struct OpcUaScrapingConfig {
246 #[prost(message, optional, tag = "1")]
247 pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
248 #[prost(string, tag = "2")]
250 pub unit_node_name: ::prost::alloc::string::String,
251 #[prost(message, optional, tag = "3")]
252 pub channel_naming_convention: ::core::option::Option<OpcUaChannelNamingConvention>,
253 #[prost(bool, tag = "4")]
255 pub override_host: bool,
256 #[prost(enumeration = "OpcUaUnknownDataTypeHandling", tag = "5")]
258 pub unknown_data_type_handling: i32,
259 #[prost(enumeration = "OpcUaFailedMonitorHandling", tag = "6")]
261 pub failed_monitor_handling: i32,
262 #[prost(message, optional, tag = "7")]
264 pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
265 #[prost(message, optional, tag = "8")]
267 pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
268}
269#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
272#[repr(i32)]
273pub enum OpcSecurityPolicy {
274 Unspecified = 0,
275 None = 1,
276 Basic256Sha256 = 2,
277}
278impl OpcSecurityPolicy {
279 pub fn as_str_name(&self) -> &'static str {
284 match self {
285 Self::Unspecified => "OPC_SECURITY_POLICY_UNSPECIFIED",
286 Self::None => "NONE",
287 Self::Basic256Sha256 => "BASIC_256_SHA_256",
288 }
289 }
290 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
292 match value {
293 "OPC_SECURITY_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
294 "NONE" => Some(Self::None),
295 "BASIC_256_SHA_256" => Some(Self::Basic256Sha256),
296 _ => None,
297 }
298 }
299}
300#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
301#[repr(i32)]
302pub enum OpcUaReferenceExplorationType {
303 Unspecified = 0,
304 Organizes = 1,
305 HierarchicalReferences = 2,
306}
307impl OpcUaReferenceExplorationType {
308 pub fn as_str_name(&self) -> &'static str {
313 match self {
314 Self::Unspecified => "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED",
315 Self::Organizes => "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES",
316 Self::HierarchicalReferences => {
317 "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES"
318 }
319 }
320 }
321 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
323 match value {
324 "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
325 "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES" => Some(Self::Organizes),
326 "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES" => {
327 Some(Self::HierarchicalReferences)
328 }
329 _ => None,
330 }
331 }
332}
333#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
334#[repr(i32)]
335pub enum OpcUaUnknownDataTypeHandling {
336 Unspecified = 0,
337 Error = 1,
339 TreatAsDouble = 2,
341 TreatAsString = 3,
343}
344impl OpcUaUnknownDataTypeHandling {
345 pub fn as_str_name(&self) -> &'static str {
350 match self {
351 Self::Unspecified => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED",
352 Self::Error => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR",
353 Self::TreatAsDouble => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE",
354 Self::TreatAsString => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING",
355 }
356 }
357 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
359 match value {
360 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
361 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR" => Some(Self::Error),
362 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE" => {
363 Some(Self::TreatAsDouble)
364 }
365 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING" => {
366 Some(Self::TreatAsString)
367 }
368 _ => None,
369 }
370 }
371}
372#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
373#[repr(i32)]
374pub enum OpcUaFailedMonitorHandling {
375 Unspecified = 0,
376 Error = 1,
377 Ignore = 2,
378}
379impl OpcUaFailedMonitorHandling {
380 pub fn as_str_name(&self) -> &'static str {
385 match self {
386 Self::Unspecified => "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED",
387 Self::Error => "OPC_UA_FAILED_MONITOR_HANDLING_ERROR",
388 Self::Ignore => "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE",
389 }
390 }
391 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
393 match value {
394 "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
395 "OPC_UA_FAILED_MONITOR_HANDLING_ERROR" => Some(Self::Error),
396 "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE" => Some(Self::Ignore),
397 _ => None,
398 }
399 }
400}
401#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
402#[repr(i32)]
403pub enum OpcUaDataChangeTrigger {
404 Unspecified = 0,
405 StatusOnly = 1,
406 StatusValue = 2,
407 StatusValueTimestamp = 3,
408}
409impl OpcUaDataChangeTrigger {
410 pub fn as_str_name(&self) -> &'static str {
415 match self {
416 Self::Unspecified => "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED",
417 Self::StatusOnly => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY",
418 Self::StatusValue => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE",
419 Self::StatusValueTimestamp => {
420 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP"
421 }
422 }
423 }
424 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
426 match value {
427 "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
428 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY" => Some(Self::StatusOnly),
429 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE" => Some(Self::StatusValue),
430 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP" => {
431 Some(Self::StatusValueTimestamp)
432 }
433 _ => None,
434 }
435 }
436}
437#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
438#[repr(i32)]
439pub enum OpcUaDeadbandType {
440 Unspecified = 0,
441 None = 1,
442 Absolute = 2,
443 Percent = 3,
444}
445impl OpcUaDeadbandType {
446 pub fn as_str_name(&self) -> &'static str {
451 match self {
452 Self::Unspecified => "OPC_UA_DEADBAND_TYPE_UNSPECIFIED",
453 Self::None => "OPC_UA_DEADBAND_TYPE_NONE",
454 Self::Absolute => "OPC_UA_DEADBAND_TYPE_ABSOLUTE",
455 Self::Percent => "OPC_UA_DEADBAND_TYPE_PERCENT",
456 }
457 }
458 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
460 match value {
461 "OPC_UA_DEADBAND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
462 "OPC_UA_DEADBAND_TYPE_NONE" => Some(Self::None),
463 "OPC_UA_DEADBAND_TYPE_ABSOLUTE" => Some(Self::Absolute),
464 "OPC_UA_DEADBAND_TYPE_PERCENT" => Some(Self::Percent),
465 _ => None,
466 }
467 }
468}
469#[derive(Clone, PartialEq, ::prost::Message)]
471pub struct CreateStreamingConnectionRequest {
472 #[prost(string, tag = "1")]
473 pub name: ::prost::alloc::string::String,
474 #[prost(string, optional, tag = "2")]
475 pub description: ::core::option::Option<::prost::alloc::string::String>,
476 #[prost(message, optional, tag = "3")]
477 pub connection_details: ::core::option::Option<StreamingConnectionDetails>,
478 #[prost(string, optional, tag = "4")]
479 pub workspace_rid: ::core::option::Option<::prost::alloc::string::String>,
480}
481#[derive(Clone, PartialEq, ::prost::Message)]
483pub struct CreateStreamingConnectionResponse {
484 #[prost(string, tag = "1")]
485 pub streaming_connection_rid: ::prost::alloc::string::String,
486}
487#[derive(Clone, Copy, PartialEq, ::prost::Message)]
489pub struct StopStreamResponse {
490 #[prost(bool, tag = "1")]
491 pub success: bool,
492}
493#[derive(Clone, Copy, PartialEq, ::prost::Message)]
494pub struct StartStreamResponse {
495 #[prost(bool, tag = "1")]
496 pub success: bool,
497}
498#[derive(Clone, PartialEq, ::prost::Message)]
500pub struct StreamingConnection {
501 #[prost(string, tag = "1")]
502 pub streaming_connection_rid: ::prost::alloc::string::String,
503 #[prost(string, tag = "2")]
504 pub name: ::prost::alloc::string::String,
505 #[prost(string, optional, tag = "3")]
506 pub description: ::core::option::Option<::prost::alloc::string::String>,
507 #[prost(message, optional, tag = "4")]
508 pub connection_details: ::core::option::Option<StreamingConnectionDetailsSecret>,
509 #[prost(enumeration = "StreamingConnectionStatus", tag = "6")]
510 pub status: i32,
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 StreamingConnectionDetails {
519 #[prost(
520 oneof = "streaming_connection_details::StreamingConnectionDetails",
521 tags = "1"
522 )]
523 pub streaming_connection_details: ::core::option::Option<
524 streaming_connection_details::StreamingConnectionDetails,
525 >,
526}
527pub mod streaming_connection_details {
529 #[derive(Clone, PartialEq, ::prost::Oneof)]
530 pub enum StreamingConnectionDetails {
531 #[prost(message, tag = "1")]
532 OpcUa(super::OpcUaConnectionDetails),
533 }
534}
535#[derive(Clone, PartialEq, ::prost::Message)]
537pub struct StreamingConnectionDetailsSecret {
538 #[prost(
539 oneof = "streaming_connection_details_secret::StreamingConnectionDetails",
540 tags = "1"
541 )]
542 pub streaming_connection_details: ::core::option::Option<
543 streaming_connection_details_secret::StreamingConnectionDetails,
544 >,
545}
546pub mod streaming_connection_details_secret {
548 #[derive(Clone, PartialEq, ::prost::Oneof)]
549 pub enum StreamingConnectionDetails {
550 #[prost(message, tag = "1")]
551 OpcUa(super::OpcUaConnectionDetailsSecret),
552 }
553}
554#[derive(Clone, PartialEq, ::prost::Message)]
556pub struct StreamingScrapingConfig {
557 #[prost(oneof = "streaming_scraping_config::StreamingScrapingConfig", tags = "1")]
558 pub streaming_scraping_config: ::core::option::Option<
559 streaming_scraping_config::StreamingScrapingConfig,
560 >,
561}
562pub mod streaming_scraping_config {
564 #[derive(Clone, PartialEq, ::prost::Oneof)]
565 pub enum StreamingScrapingConfig {
566 #[prost(message, tag = "1")]
567 OpcUa(super::OpcUaScrapingConfig),
568 }
569}
570#[derive(Clone, PartialEq, ::prost::Message)]
571pub struct GetStreamingConnectionRequest {
572 #[prost(string, tag = "1")]
573 pub streaming_connection_rid: ::prost::alloc::string::String,
574}
575#[derive(Clone, PartialEq, ::prost::Message)]
576pub struct GetStreamingConnectionResponse {
577 #[prost(message, optional, tag = "1")]
578 pub streaming_connection: ::core::option::Option<StreamingConnection>,
579}
580#[derive(Clone, PartialEq, ::prost::Message)]
581pub struct ListStreamingConnectionsRequest {
582 #[prost(string, repeated, tag = "1")]
583 pub workspace_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
584}
585#[derive(Clone, PartialEq, ::prost::Message)]
586pub struct ListStreamingConnectionsResponse {
587 #[prost(message, repeated, tag = "1")]
588 pub streaming_connections: ::prost::alloc::vec::Vec<StreamingConnection>,
589}
590#[derive(Clone, PartialEq, ::prost::Message)]
591pub struct UpdateStreamingConnectionStatusRequest {
592 #[prost(string, tag = "1")]
593 pub streaming_connection_rid: ::prost::alloc::string::String,
594 #[prost(enumeration = "StreamingConnectionStatus", tag = "2")]
595 pub status: i32,
596}
597#[derive(Clone, PartialEq, ::prost::Message)]
598pub struct UpdateStreamingConnectionStatusResponse {
599 #[prost(message, optional, tag = "1")]
600 pub streaming_connection: ::core::option::Option<StreamingConnection>,
601}
602#[derive(Clone, PartialEq, ::prost::Message)]
603pub struct StartStreamRequest {
604 #[prost(string, tag = "1")]
605 pub streaming_connection_rid: ::prost::alloc::string::String,
606 #[prost(message, optional, tag = "2")]
607 pub scraping_config: ::core::option::Option<StreamingScrapingConfig>,
608 #[prost(string, tag = "3")]
609 pub target_dataset_rid: ::prost::alloc::string::String,
610}
611#[derive(Clone, PartialEq, ::prost::Message)]
612pub struct StopStreamRequest {
613 #[prost(string, tag = "1")]
614 pub streaming_connection_rid: ::prost::alloc::string::String,
615}
616#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
618#[repr(i32)]
619pub enum StreamingConnectionErrorType {
620 Unspecified = 0,
621 ConnectionNotFound = 1,
622 StreamingConnectionAlreadyRunning = 2,
623}
624impl StreamingConnectionErrorType {
625 pub fn as_str_name(&self) -> &'static str {
630 match self {
631 Self::Unspecified => "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED",
632 Self::ConnectionNotFound => {
633 "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND"
634 }
635 Self::StreamingConnectionAlreadyRunning => {
636 "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING"
637 }
638 }
639 }
640 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
642 match value {
643 "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
644 "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND" => {
645 Some(Self::ConnectionNotFound)
646 }
647 "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING" => {
648 Some(Self::StreamingConnectionAlreadyRunning)
649 }
650 _ => None,
651 }
652 }
653}
654#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
657#[repr(i32)]
658pub enum StreamingConnectionStatus {
659 Unspecified = 0,
660 Connected = 1,
661 Disconnected = 2,
662}
663impl StreamingConnectionStatus {
664 pub fn as_str_name(&self) -> &'static str {
669 match self {
670 Self::Unspecified => "STREAMING_CONNECTION_STATUS_UNSPECIFIED",
671 Self::Connected => "CONNECTED",
672 Self::Disconnected => "DISCONNECTED",
673 }
674 }
675 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
677 match value {
678 "STREAMING_CONNECTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
679 "CONNECTED" => Some(Self::Connected),
680 "DISCONNECTED" => Some(Self::Disconnected),
681 _ => None,
682 }
683 }
684}
685pub mod streaming_connection_service_client {
687 #![allow(
688 unused_variables,
689 dead_code,
690 missing_docs,
691 clippy::wildcard_imports,
692 clippy::let_unit_value,
693 )]
694 use tonic::codegen::*;
695 use tonic::codegen::http::Uri;
696 #[derive(Debug, Clone)]
699 pub struct StreamingConnectionServiceClient<T> {
700 inner: tonic::client::Grpc<T>,
701 }
702 impl StreamingConnectionServiceClient<tonic::transport::Channel> {
703 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
705 where
706 D: TryInto<tonic::transport::Endpoint>,
707 D::Error: Into<StdError>,
708 {
709 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
710 Ok(Self::new(conn))
711 }
712 }
713 impl<T> StreamingConnectionServiceClient<T>
714 where
715 T: tonic::client::GrpcService<tonic::body::Body>,
716 T::Error: Into<StdError>,
717 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
718 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
719 {
720 pub fn new(inner: T) -> Self {
721 let inner = tonic::client::Grpc::new(inner);
722 Self { inner }
723 }
724 pub fn with_origin(inner: T, origin: Uri) -> Self {
725 let inner = tonic::client::Grpc::with_origin(inner, origin);
726 Self { inner }
727 }
728 pub fn with_interceptor<F>(
729 inner: T,
730 interceptor: F,
731 ) -> StreamingConnectionServiceClient<InterceptedService<T, F>>
732 where
733 F: tonic::service::Interceptor,
734 T::ResponseBody: Default,
735 T: tonic::codegen::Service<
736 http::Request<tonic::body::Body>,
737 Response = http::Response<
738 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
739 >,
740 >,
741 <T as tonic::codegen::Service<
742 http::Request<tonic::body::Body>,
743 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
744 {
745 StreamingConnectionServiceClient::new(
746 InterceptedService::new(inner, interceptor),
747 )
748 }
749 #[must_use]
754 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
755 self.inner = self.inner.send_compressed(encoding);
756 self
757 }
758 #[must_use]
760 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
761 self.inner = self.inner.accept_compressed(encoding);
762 self
763 }
764 #[must_use]
768 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
769 self.inner = self.inner.max_decoding_message_size(limit);
770 self
771 }
772 #[must_use]
776 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
777 self.inner = self.inner.max_encoding_message_size(limit);
778 self
779 }
780 pub async fn create_streaming_connection(
784 &mut self,
785 request: impl tonic::IntoRequest<super::CreateStreamingConnectionRequest>,
786 ) -> std::result::Result<
787 tonic::Response<super::CreateStreamingConnectionResponse>,
788 tonic::Status,
789 > {
790 self.inner
791 .ready()
792 .await
793 .map_err(|e| {
794 tonic::Status::unknown(
795 format!("Service was not ready: {}", e.into()),
796 )
797 })?;
798 let codec = tonic::codec::ProstCodec::default();
799 let path = http::uri::PathAndQuery::from_static(
800 "/nominal.streaming_connection_service.v1.StreamingConnectionService/CreateStreamingConnection",
801 );
802 let mut req = request.into_request();
803 req.extensions_mut()
804 .insert(
805 GrpcMethod::new(
806 "nominal.streaming_connection_service.v1.StreamingConnectionService",
807 "CreateStreamingConnection",
808 ),
809 );
810 self.inner.unary(req, path, codec).await
811 }
812 pub async fn get_streaming_connection(
814 &mut self,
815 request: impl tonic::IntoRequest<super::GetStreamingConnectionRequest>,
816 ) -> std::result::Result<
817 tonic::Response<super::GetStreamingConnectionResponse>,
818 tonic::Status,
819 > {
820 self.inner
821 .ready()
822 .await
823 .map_err(|e| {
824 tonic::Status::unknown(
825 format!("Service was not ready: {}", e.into()),
826 )
827 })?;
828 let codec = tonic::codec::ProstCodec::default();
829 let path = http::uri::PathAndQuery::from_static(
830 "/nominal.streaming_connection_service.v1.StreamingConnectionService/GetStreamingConnection",
831 );
832 let mut req = request.into_request();
833 req.extensions_mut()
834 .insert(
835 GrpcMethod::new(
836 "nominal.streaming_connection_service.v1.StreamingConnectionService",
837 "GetStreamingConnection",
838 ),
839 );
840 self.inner.unary(req, path, codec).await
841 }
842 pub async fn list_streaming_connections(
844 &mut self,
845 request: impl tonic::IntoRequest<super::ListStreamingConnectionsRequest>,
846 ) -> std::result::Result<
847 tonic::Response<super::ListStreamingConnectionsResponse>,
848 tonic::Status,
849 > {
850 self.inner
851 .ready()
852 .await
853 .map_err(|e| {
854 tonic::Status::unknown(
855 format!("Service was not ready: {}", e.into()),
856 )
857 })?;
858 let codec = tonic::codec::ProstCodec::default();
859 let path = http::uri::PathAndQuery::from_static(
860 "/nominal.streaming_connection_service.v1.StreamingConnectionService/ListStreamingConnections",
861 );
862 let mut req = request.into_request();
863 req.extensions_mut()
864 .insert(
865 GrpcMethod::new(
866 "nominal.streaming_connection_service.v1.StreamingConnectionService",
867 "ListStreamingConnections",
868 ),
869 );
870 self.inner.unary(req, path, codec).await
871 }
872 pub async fn update_streaming_connection_status(
874 &mut self,
875 request: impl tonic::IntoRequest<
876 super::UpdateStreamingConnectionStatusRequest,
877 >,
878 ) -> std::result::Result<
879 tonic::Response<super::UpdateStreamingConnectionStatusResponse>,
880 tonic::Status,
881 > {
882 self.inner
883 .ready()
884 .await
885 .map_err(|e| {
886 tonic::Status::unknown(
887 format!("Service was not ready: {}", e.into()),
888 )
889 })?;
890 let codec = tonic::codec::ProstCodec::default();
891 let path = http::uri::PathAndQuery::from_static(
892 "/nominal.streaming_connection_service.v1.StreamingConnectionService/UpdateStreamingConnectionStatus",
893 );
894 let mut req = request.into_request();
895 req.extensions_mut()
896 .insert(
897 GrpcMethod::new(
898 "nominal.streaming_connection_service.v1.StreamingConnectionService",
899 "UpdateStreamingConnectionStatus",
900 ),
901 );
902 self.inner.unary(req, path, codec).await
903 }
904 pub async fn start_stream(
906 &mut self,
907 request: impl tonic::IntoRequest<super::StartStreamRequest>,
908 ) -> std::result::Result<
909 tonic::Response<super::StartStreamResponse>,
910 tonic::Status,
911 > {
912 self.inner
913 .ready()
914 .await
915 .map_err(|e| {
916 tonic::Status::unknown(
917 format!("Service was not ready: {}", e.into()),
918 )
919 })?;
920 let codec = tonic::codec::ProstCodec::default();
921 let path = http::uri::PathAndQuery::from_static(
922 "/nominal.streaming_connection_service.v1.StreamingConnectionService/StartStream",
923 );
924 let mut req = request.into_request();
925 req.extensions_mut()
926 .insert(
927 GrpcMethod::new(
928 "nominal.streaming_connection_service.v1.StreamingConnectionService",
929 "StartStream",
930 ),
931 );
932 self.inner.unary(req, path, codec).await
933 }
934 pub async fn stop_stream(
936 &mut self,
937 request: impl tonic::IntoRequest<super::StopStreamRequest>,
938 ) -> std::result::Result<
939 tonic::Response<super::StopStreamResponse>,
940 tonic::Status,
941 > {
942 self.inner
943 .ready()
944 .await
945 .map_err(|e| {
946 tonic::Status::unknown(
947 format!("Service was not ready: {}", e.into()),
948 )
949 })?;
950 let codec = tonic::codec::ProstCodec::default();
951 let path = http::uri::PathAndQuery::from_static(
952 "/nominal.streaming_connection_service.v1.StreamingConnectionService/StopStream",
953 );
954 let mut req = request.into_request();
955 req.extensions_mut()
956 .insert(
957 GrpcMethod::new(
958 "nominal.streaming_connection_service.v1.StreamingConnectionService",
959 "StopStream",
960 ),
961 );
962 self.inner.unary(req, path, codec).await
963 }
964 }
965}