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}
277impl OpcSecurityPolicy {
278 pub fn as_str_name(&self) -> &'static str {
283 match self {
284 Self::Unspecified => "OPC_SECURITY_POLICY_UNSPECIFIED",
285 Self::None => "NONE",
286 }
287 }
288 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
290 match value {
291 "OPC_SECURITY_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
292 "NONE" => Some(Self::None),
293 _ => None,
294 }
295 }
296}
297#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
298#[repr(i32)]
299pub enum OpcUaReferenceExplorationType {
300 Unspecified = 0,
301 Organizes = 1,
302 HierarchicalReferences = 2,
303}
304impl OpcUaReferenceExplorationType {
305 pub fn as_str_name(&self) -> &'static str {
310 match self {
311 Self::Unspecified => "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED",
312 Self::Organizes => "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES",
313 Self::HierarchicalReferences => {
314 "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES"
315 }
316 }
317 }
318 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
320 match value {
321 "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
322 "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES" => Some(Self::Organizes),
323 "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES" => {
324 Some(Self::HierarchicalReferences)
325 }
326 _ => None,
327 }
328 }
329}
330#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
331#[repr(i32)]
332pub enum OpcUaUnknownDataTypeHandling {
333 Unspecified = 0,
334 Error = 1,
336 TreatAsDouble = 2,
338 TreatAsString = 3,
340}
341impl OpcUaUnknownDataTypeHandling {
342 pub fn as_str_name(&self) -> &'static str {
347 match self {
348 Self::Unspecified => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED",
349 Self::Error => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR",
350 Self::TreatAsDouble => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE",
351 Self::TreatAsString => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING",
352 }
353 }
354 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
356 match value {
357 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
358 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR" => Some(Self::Error),
359 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE" => {
360 Some(Self::TreatAsDouble)
361 }
362 "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING" => {
363 Some(Self::TreatAsString)
364 }
365 _ => None,
366 }
367 }
368}
369#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
370#[repr(i32)]
371pub enum OpcUaFailedMonitorHandling {
372 Unspecified = 0,
373 Error = 1,
374 Ignore = 2,
375}
376impl OpcUaFailedMonitorHandling {
377 pub fn as_str_name(&self) -> &'static str {
382 match self {
383 Self::Unspecified => "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED",
384 Self::Error => "OPC_UA_FAILED_MONITOR_HANDLING_ERROR",
385 Self::Ignore => "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE",
386 }
387 }
388 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
390 match value {
391 "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
392 "OPC_UA_FAILED_MONITOR_HANDLING_ERROR" => Some(Self::Error),
393 "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE" => Some(Self::Ignore),
394 _ => None,
395 }
396 }
397}
398#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
399#[repr(i32)]
400pub enum OpcUaDataChangeTrigger {
401 Unspecified = 0,
402 StatusOnly = 1,
403 StatusValue = 2,
404 StatusValueTimestamp = 3,
405}
406impl OpcUaDataChangeTrigger {
407 pub fn as_str_name(&self) -> &'static str {
412 match self {
413 Self::Unspecified => "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED",
414 Self::StatusOnly => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY",
415 Self::StatusValue => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE",
416 Self::StatusValueTimestamp => {
417 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP"
418 }
419 }
420 }
421 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
423 match value {
424 "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
425 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY" => Some(Self::StatusOnly),
426 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE" => Some(Self::StatusValue),
427 "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP" => {
428 Some(Self::StatusValueTimestamp)
429 }
430 _ => None,
431 }
432 }
433}
434#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
435#[repr(i32)]
436pub enum OpcUaDeadbandType {
437 Unspecified = 0,
438 None = 1,
439 Absolute = 2,
440 Percent = 3,
441}
442impl OpcUaDeadbandType {
443 pub fn as_str_name(&self) -> &'static str {
448 match self {
449 Self::Unspecified => "OPC_UA_DEADBAND_TYPE_UNSPECIFIED",
450 Self::None => "OPC_UA_DEADBAND_TYPE_NONE",
451 Self::Absolute => "OPC_UA_DEADBAND_TYPE_ABSOLUTE",
452 Self::Percent => "OPC_UA_DEADBAND_TYPE_PERCENT",
453 }
454 }
455 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
457 match value {
458 "OPC_UA_DEADBAND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
459 "OPC_UA_DEADBAND_TYPE_NONE" => Some(Self::None),
460 "OPC_UA_DEADBAND_TYPE_ABSOLUTE" => Some(Self::Absolute),
461 "OPC_UA_DEADBAND_TYPE_PERCENT" => Some(Self::Percent),
462 _ => None,
463 }
464 }
465}
466#[derive(Clone, PartialEq, ::prost::Message)]
468pub struct CreateStreamingConnectionRequest {
469 #[prost(string, tag = "1")]
470 pub name: ::prost::alloc::string::String,
471 #[prost(string, optional, tag = "2")]
472 pub description: ::core::option::Option<::prost::alloc::string::String>,
473 #[prost(message, optional, tag = "3")]
474 pub connection_details: ::core::option::Option<StreamingConnectionDetails>,
475 #[prost(string, optional, tag = "4")]
476 pub workspace_rid: ::core::option::Option<::prost::alloc::string::String>,
477}
478#[derive(Clone, PartialEq, ::prost::Message)]
480pub struct CreateStreamingConnectionResponse {
481 #[prost(string, tag = "1")]
482 pub streaming_connection_rid: ::prost::alloc::string::String,
483}
484#[derive(Clone, Copy, PartialEq, ::prost::Message)]
486pub struct StopStreamResponse {
487 #[prost(bool, tag = "1")]
488 pub success: bool,
489}
490#[derive(Clone, Copy, PartialEq, ::prost::Message)]
491pub struct StartStreamResponse {
492 #[prost(bool, tag = "1")]
493 pub success: bool,
494}
495#[derive(Clone, PartialEq, ::prost::Message)]
497pub struct StreamingConnection {
498 #[prost(string, tag = "1")]
499 pub streaming_connection_rid: ::prost::alloc::string::String,
500 #[prost(string, tag = "2")]
501 pub name: ::prost::alloc::string::String,
502 #[prost(string, optional, tag = "3")]
503 pub description: ::core::option::Option<::prost::alloc::string::String>,
504 #[prost(message, optional, tag = "4")]
505 pub connection_details: ::core::option::Option<StreamingConnectionDetailsSecret>,
506 #[prost(enumeration = "StreamingConnectionStatus", tag = "6")]
507 pub status: i32,
508 #[prost(message, optional, tag = "7")]
509 pub created_at: ::core::option::Option<
510 super::super::super::google::protobuf::Timestamp,
511 >,
512}
513#[derive(Clone, PartialEq, ::prost::Message)]
515pub struct StreamingConnectionDetails {
516 #[prost(
517 oneof = "streaming_connection_details::StreamingConnectionDetails",
518 tags = "1"
519 )]
520 pub streaming_connection_details: ::core::option::Option<
521 streaming_connection_details::StreamingConnectionDetails,
522 >,
523}
524pub mod streaming_connection_details {
526 #[derive(Clone, PartialEq, ::prost::Oneof)]
527 pub enum StreamingConnectionDetails {
528 #[prost(message, tag = "1")]
529 OpcUa(super::OpcUaConnectionDetails),
530 }
531}
532#[derive(Clone, PartialEq, ::prost::Message)]
534pub struct StreamingConnectionDetailsSecret {
535 #[prost(
536 oneof = "streaming_connection_details_secret::StreamingConnectionDetails",
537 tags = "1"
538 )]
539 pub streaming_connection_details: ::core::option::Option<
540 streaming_connection_details_secret::StreamingConnectionDetails,
541 >,
542}
543pub mod streaming_connection_details_secret {
545 #[derive(Clone, PartialEq, ::prost::Oneof)]
546 pub enum StreamingConnectionDetails {
547 #[prost(message, tag = "1")]
548 OpcUa(super::OpcUaConnectionDetailsSecret),
549 }
550}
551#[derive(Clone, PartialEq, ::prost::Message)]
553pub struct StreamingScrapingConfig {
554 #[prost(oneof = "streaming_scraping_config::StreamingScrapingConfig", tags = "1")]
555 pub streaming_scraping_config: ::core::option::Option<
556 streaming_scraping_config::StreamingScrapingConfig,
557 >,
558}
559pub mod streaming_scraping_config {
561 #[derive(Clone, PartialEq, ::prost::Oneof)]
562 pub enum StreamingScrapingConfig {
563 #[prost(message, tag = "1")]
564 OpcUa(super::OpcUaScrapingConfig),
565 }
566}
567#[derive(Clone, PartialEq, ::prost::Message)]
568pub struct GetStreamingConnectionRequest {
569 #[prost(string, tag = "1")]
570 pub streaming_connection_rid: ::prost::alloc::string::String,
571}
572#[derive(Clone, PartialEq, ::prost::Message)]
573pub struct GetStreamingConnectionResponse {
574 #[prost(message, optional, tag = "1")]
575 pub streaming_connection: ::core::option::Option<StreamingConnection>,
576}
577#[derive(Clone, PartialEq, ::prost::Message)]
578pub struct ListStreamingConnectionsRequest {
579 #[prost(string, repeated, tag = "1")]
580 pub workspace_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
581}
582#[derive(Clone, PartialEq, ::prost::Message)]
583pub struct ListStreamingConnectionsResponse {
584 #[prost(message, repeated, tag = "1")]
585 pub streaming_connections: ::prost::alloc::vec::Vec<StreamingConnection>,
586}
587#[derive(Clone, PartialEq, ::prost::Message)]
588pub struct UpdateStreamingConnectionStatusRequest {
589 #[prost(string, tag = "1")]
590 pub streaming_connection_rid: ::prost::alloc::string::String,
591 #[prost(enumeration = "StreamingConnectionStatus", tag = "2")]
592 pub status: i32,
593}
594#[derive(Clone, PartialEq, ::prost::Message)]
595pub struct UpdateStreamingConnectionStatusResponse {
596 #[prost(message, optional, tag = "1")]
597 pub streaming_connection: ::core::option::Option<StreamingConnection>,
598}
599#[derive(Clone, PartialEq, ::prost::Message)]
600pub struct StartStreamRequest {
601 #[prost(string, tag = "1")]
602 pub streaming_connection_rid: ::prost::alloc::string::String,
603 #[prost(message, optional, tag = "2")]
604 pub scraping_config: ::core::option::Option<StreamingScrapingConfig>,
605 #[prost(string, tag = "3")]
606 pub target_dataset_rid: ::prost::alloc::string::String,
607}
608#[derive(Clone, PartialEq, ::prost::Message)]
609pub struct StopStreamRequest {
610 #[prost(string, tag = "1")]
611 pub streaming_connection_rid: ::prost::alloc::string::String,
612}
613#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
615#[repr(i32)]
616pub enum StreamingConnectionErrorType {
617 Unspecified = 0,
618 ConnectionNotFound = 1,
619 StreamingConnectionAlreadyRunning = 2,
620}
621impl StreamingConnectionErrorType {
622 pub fn as_str_name(&self) -> &'static str {
627 match self {
628 Self::Unspecified => "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED",
629 Self::ConnectionNotFound => {
630 "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND"
631 }
632 Self::StreamingConnectionAlreadyRunning => {
633 "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING"
634 }
635 }
636 }
637 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
639 match value {
640 "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
641 "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND" => {
642 Some(Self::ConnectionNotFound)
643 }
644 "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING" => {
645 Some(Self::StreamingConnectionAlreadyRunning)
646 }
647 _ => None,
648 }
649 }
650}
651#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
654#[repr(i32)]
655pub enum StreamingConnectionStatus {
656 Unspecified = 0,
657 Connected = 1,
658 Disconnected = 2,
659}
660impl StreamingConnectionStatus {
661 pub fn as_str_name(&self) -> &'static str {
666 match self {
667 Self::Unspecified => "STREAMING_CONNECTION_STATUS_UNSPECIFIED",
668 Self::Connected => "CONNECTED",
669 Self::Disconnected => "DISCONNECTED",
670 }
671 }
672 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
674 match value {
675 "STREAMING_CONNECTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
676 "CONNECTED" => Some(Self::Connected),
677 "DISCONNECTED" => Some(Self::Disconnected),
678 _ => None,
679 }
680 }
681}
682pub mod streaming_connection_service_client {
684 #![allow(
685 unused_variables,
686 dead_code,
687 missing_docs,
688 clippy::wildcard_imports,
689 clippy::let_unit_value,
690 )]
691 use tonic::codegen::*;
692 use tonic::codegen::http::Uri;
693 #[derive(Debug, Clone)]
696 pub struct StreamingConnectionServiceClient<T> {
697 inner: tonic::client::Grpc<T>,
698 }
699 impl StreamingConnectionServiceClient<tonic::transport::Channel> {
700 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
702 where
703 D: TryInto<tonic::transport::Endpoint>,
704 D::Error: Into<StdError>,
705 {
706 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
707 Ok(Self::new(conn))
708 }
709 }
710 impl<T> StreamingConnectionServiceClient<T>
711 where
712 T: tonic::client::GrpcService<tonic::body::Body>,
713 T::Error: Into<StdError>,
714 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
715 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
716 {
717 pub fn new(inner: T) -> Self {
718 let inner = tonic::client::Grpc::new(inner);
719 Self { inner }
720 }
721 pub fn with_origin(inner: T, origin: Uri) -> Self {
722 let inner = tonic::client::Grpc::with_origin(inner, origin);
723 Self { inner }
724 }
725 pub fn with_interceptor<F>(
726 inner: T,
727 interceptor: F,
728 ) -> StreamingConnectionServiceClient<InterceptedService<T, F>>
729 where
730 F: tonic::service::Interceptor,
731 T::ResponseBody: Default,
732 T: tonic::codegen::Service<
733 http::Request<tonic::body::Body>,
734 Response = http::Response<
735 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
736 >,
737 >,
738 <T as tonic::codegen::Service<
739 http::Request<tonic::body::Body>,
740 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
741 {
742 StreamingConnectionServiceClient::new(
743 InterceptedService::new(inner, interceptor),
744 )
745 }
746 #[must_use]
751 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
752 self.inner = self.inner.send_compressed(encoding);
753 self
754 }
755 #[must_use]
757 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
758 self.inner = self.inner.accept_compressed(encoding);
759 self
760 }
761 #[must_use]
765 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
766 self.inner = self.inner.max_decoding_message_size(limit);
767 self
768 }
769 #[must_use]
773 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
774 self.inner = self.inner.max_encoding_message_size(limit);
775 self
776 }
777 pub async fn create_streaming_connection(
781 &mut self,
782 request: impl tonic::IntoRequest<super::CreateStreamingConnectionRequest>,
783 ) -> std::result::Result<
784 tonic::Response<super::CreateStreamingConnectionResponse>,
785 tonic::Status,
786 > {
787 self.inner
788 .ready()
789 .await
790 .map_err(|e| {
791 tonic::Status::unknown(
792 format!("Service was not ready: {}", e.into()),
793 )
794 })?;
795 let codec = tonic::codec::ProstCodec::default();
796 let path = http::uri::PathAndQuery::from_static(
797 "/nominal.streaming_connection_service.v1.StreamingConnectionService/CreateStreamingConnection",
798 );
799 let mut req = request.into_request();
800 req.extensions_mut()
801 .insert(
802 GrpcMethod::new(
803 "nominal.streaming_connection_service.v1.StreamingConnectionService",
804 "CreateStreamingConnection",
805 ),
806 );
807 self.inner.unary(req, path, codec).await
808 }
809 pub async fn get_streaming_connection(
811 &mut self,
812 request: impl tonic::IntoRequest<super::GetStreamingConnectionRequest>,
813 ) -> std::result::Result<
814 tonic::Response<super::GetStreamingConnectionResponse>,
815 tonic::Status,
816 > {
817 self.inner
818 .ready()
819 .await
820 .map_err(|e| {
821 tonic::Status::unknown(
822 format!("Service was not ready: {}", e.into()),
823 )
824 })?;
825 let codec = tonic::codec::ProstCodec::default();
826 let path = http::uri::PathAndQuery::from_static(
827 "/nominal.streaming_connection_service.v1.StreamingConnectionService/GetStreamingConnection",
828 );
829 let mut req = request.into_request();
830 req.extensions_mut()
831 .insert(
832 GrpcMethod::new(
833 "nominal.streaming_connection_service.v1.StreamingConnectionService",
834 "GetStreamingConnection",
835 ),
836 );
837 self.inner.unary(req, path, codec).await
838 }
839 pub async fn list_streaming_connections(
841 &mut self,
842 request: impl tonic::IntoRequest<super::ListStreamingConnectionsRequest>,
843 ) -> std::result::Result<
844 tonic::Response<super::ListStreamingConnectionsResponse>,
845 tonic::Status,
846 > {
847 self.inner
848 .ready()
849 .await
850 .map_err(|e| {
851 tonic::Status::unknown(
852 format!("Service was not ready: {}", e.into()),
853 )
854 })?;
855 let codec = tonic::codec::ProstCodec::default();
856 let path = http::uri::PathAndQuery::from_static(
857 "/nominal.streaming_connection_service.v1.StreamingConnectionService/ListStreamingConnections",
858 );
859 let mut req = request.into_request();
860 req.extensions_mut()
861 .insert(
862 GrpcMethod::new(
863 "nominal.streaming_connection_service.v1.StreamingConnectionService",
864 "ListStreamingConnections",
865 ),
866 );
867 self.inner.unary(req, path, codec).await
868 }
869 pub async fn update_streaming_connection_status(
871 &mut self,
872 request: impl tonic::IntoRequest<
873 super::UpdateStreamingConnectionStatusRequest,
874 >,
875 ) -> std::result::Result<
876 tonic::Response<super::UpdateStreamingConnectionStatusResponse>,
877 tonic::Status,
878 > {
879 self.inner
880 .ready()
881 .await
882 .map_err(|e| {
883 tonic::Status::unknown(
884 format!("Service was not ready: {}", e.into()),
885 )
886 })?;
887 let codec = tonic::codec::ProstCodec::default();
888 let path = http::uri::PathAndQuery::from_static(
889 "/nominal.streaming_connection_service.v1.StreamingConnectionService/UpdateStreamingConnectionStatus",
890 );
891 let mut req = request.into_request();
892 req.extensions_mut()
893 .insert(
894 GrpcMethod::new(
895 "nominal.streaming_connection_service.v1.StreamingConnectionService",
896 "UpdateStreamingConnectionStatus",
897 ),
898 );
899 self.inner.unary(req, path, codec).await
900 }
901 pub async fn start_stream(
903 &mut self,
904 request: impl tonic::IntoRequest<super::StartStreamRequest>,
905 ) -> std::result::Result<
906 tonic::Response<super::StartStreamResponse>,
907 tonic::Status,
908 > {
909 self.inner
910 .ready()
911 .await
912 .map_err(|e| {
913 tonic::Status::unknown(
914 format!("Service was not ready: {}", e.into()),
915 )
916 })?;
917 let codec = tonic::codec::ProstCodec::default();
918 let path = http::uri::PathAndQuery::from_static(
919 "/nominal.streaming_connection_service.v1.StreamingConnectionService/StartStream",
920 );
921 let mut req = request.into_request();
922 req.extensions_mut()
923 .insert(
924 GrpcMethod::new(
925 "nominal.streaming_connection_service.v1.StreamingConnectionService",
926 "StartStream",
927 ),
928 );
929 self.inner.unary(req, path, codec).await
930 }
931 pub async fn stop_stream(
933 &mut self,
934 request: impl tonic::IntoRequest<super::StopStreamRequest>,
935 ) -> std::result::Result<
936 tonic::Response<super::StopStreamResponse>,
937 tonic::Status,
938 > {
939 self.inner
940 .ready()
941 .await
942 .map_err(|e| {
943 tonic::Status::unknown(
944 format!("Service was not ready: {}", e.into()),
945 )
946 })?;
947 let codec = tonic::codec::ProstCodec::default();
948 let path = http::uri::PathAndQuery::from_static(
949 "/nominal.streaming_connection_service.v1.StreamingConnectionService/StopStream",
950 );
951 let mut req = request.into_request();
952 req.extensions_mut()
953 .insert(
954 GrpcMethod::new(
955 "nominal.streaming_connection_service.v1.StreamingConnectionService",
956 "StopStream",
957 ),
958 );
959 self.inner.unary(req, path, codec).await
960 }
961 }
962}