// This file is @generated by prost-build.
/// Authentication configuration for OPC-UA server connection
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OpcAuthenticationConfig {
    /// Authentication configuration for OPC-UA server connection
    #[prost(oneof = "opc_authentication_config::OpcAuthenticationConfig", tags = "1")]
    pub opc_authentication_config: ::core::option::Option<
        opc_authentication_config::OpcAuthenticationConfig,
    >,
}
/// Nested message and enum types in `OpcAuthenticationConfig`.
pub mod opc_authentication_config {
    /// Authentication configuration for OPC-UA server connection
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum OpcAuthenticationConfig {
        #[prost(message, tag = "1")]
        Anonymous(super::super::super::super::google::protobuf::Empty),
    }
}
/// The identifier field for an OPC-UA node
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcIdentifierValue {
    #[prost(oneof = "opc_identifier_value::OpcIdentifierValue", tags = "1, 2")]
    pub opc_identifier_value: ::core::option::Option<
        opc_identifier_value::OpcIdentifierValue,
    >,
}
/// Nested message and enum types in `OpcIdentifierValue`.
pub mod opc_identifier_value {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum OpcIdentifierValue {
        #[prost(int32, tag = "1")]
        Numeric(i32),
        #[prost(string, tag = "2")]
        String(::prost::alloc::string::String),
    }
}
/// An OPC-UA node
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcNode {
    #[prost(uint32, optional, tag = "1")]
    pub namespace: ::core::option::Option<u32>,
    #[prost(message, optional, tag = "2")]
    pub identifier: ::core::option::Option<OpcIdentifierValue>,
}
/// How do you want to map the names of OPC-UA nodes to Nominal channels?
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaChannelNamingConvention {
    #[prost(
        oneof = "opc_ua_channel_naming_convention::NamingConvention",
        tags = "1, 2, 3, 4"
    )]
    pub naming_convention: ::core::option::Option<
        opc_ua_channel_naming_convention::NamingConvention,
    >,
}
/// Nested message and enum types in `OpcUaChannelNamingConvention`.
pub mod opc_ua_channel_naming_convention {
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct OpcUaNodeId {}
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct OpcUaBrowseName {}
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct OpcUaDisplayName {}
    /// Configuration for full path naming convention
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct OpcUaFullPath {
        /// We will build path up to any of these nodes, or the Objects folder.
        #[prost(message, repeated, tag = "1")]
        pub root_nodes: ::prost::alloc::vec::Vec<super::OpcNode>,
        /// Custom delimiter for path separation. Defaults to "/" if not specified.
        #[prost(string, tag = "2")]
        pub delimiter: ::prost::alloc::string::String,
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum NamingConvention {
        /// For example, "NodeId{ns=3;i=1010}"
        #[prost(message, tag = "1")]
        NodeId(OpcUaNodeId),
        /// The "name" field under the "BrowseName" attribute
        #[prost(message, tag = "2")]
        BrowseName(OpcUaBrowseName),
        /// The "text" field under the "DisplayName" attribute
        #[prost(message, tag = "3")]
        DisplayName(OpcUaDisplayName),
        /// The full path of the node, separated by a delimiter. Use this setting for creating the hierarchical prefix tree.
        #[prost(message, tag = "4")]
        FullPath(OpcUaFullPath),
    }
}
/// Configuration for connecting to an OPC-UA server
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaConnectionDetails {
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    #[prost(enumeration = "OpcSecurityPolicy", tag = "2")]
    pub security_policy: i32,
    #[prost(message, optional, tag = "3")]
    pub authentication_config: ::core::option::Option<OpcAuthenticationConfig>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaTraversalConfig {
    /// Root nodes to subscribe to. For each node specified here, we will
    /// subscribe to that node and all of its children.
    #[prost(message, repeated, tag = "1")]
    pub root_nodes: ::prost::alloc::vec::Vec<OpcNode>,
    /// We will not subscribe to any of these nodes.
    #[prost(message, repeated, tag = "2")]
    pub skip_nodes: ::prost::alloc::vec::Vec<OpcNode>,
    /// The type of references that we will follow when traversing the root nodes in the OPC UA server.
    #[prost(enumeration = "OpcUaReferenceExplorationType", tag = "3")]
    pub reference_exploration_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaDirectNodeSubscription {
    #[prost(message, repeated, tag = "1")]
    pub nodes: ::prost::alloc::vec::Vec<OpcNode>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaNodeExplorationConfig {
    #[prost(
        oneof = "opc_ua_node_exploration_config::OpcUaNodeExplorationConfig",
        tags = "1, 2"
    )]
    pub opc_ua_node_exploration_config: ::core::option::Option<
        opc_ua_node_exploration_config::OpcUaNodeExplorationConfig,
    >,
}
/// Nested message and enum types in `OpcUaNodeExplorationConfig`.
pub mod opc_ua_node_exploration_config {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum OpcUaNodeExplorationConfig {
        #[prost(message, tag = "1")]
        OpcUaTraversalConfig(super::OpcUaTraversalConfig),
        #[prost(message, tag = "2")]
        OpcUaDirectNodeSubscription(super::OpcUaDirectNodeSubscription),
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OpcUaTimestampHandling {
    #[prost(oneof = "opc_ua_timestamp_handling::TimestampType", tags = "1, 2, 3")]
    pub timestamp_type: ::core::option::Option<opc_ua_timestamp_handling::TimestampType>,
}
/// Nested message and enum types in `OpcUaTimestampHandling`.
pub mod opc_ua_timestamp_handling {
    /// Use the server timestamp <https://reference.opcfoundation.org/Core/Part4/v104/docs/7.7.4>
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct OpcUaServerTime {}
    /// Use the source timestamp <https://reference.opcfoundation.org/Core/Part4/v104/docs/7.7.3>
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct OpcUaSourceTime {}
    /// Use the server timestamp, but add an an optional offset. By default, the offset will be the time now.
    /// This is useful for when the server starts at an epoch time of 0.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct OpcUaRelativeTimestamp {
        #[prost(message, optional, tag = "1")]
        pub offset: ::core::option::Option<
            super::super::super::super::google::protobuf::Timestamp,
        >,
    }
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum TimestampType {
        #[prost(message, tag = "1")]
        Server(OpcUaServerTime),
        #[prost(message, tag = "2")]
        Source(OpcUaSourceTime),
        #[prost(message, tag = "3")]
        Relative(OpcUaRelativeTimestamp),
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OpcUaDataChangeFilter {
    /// The trigger for the data change filter.
    #[prost(enumeration = "OpcUaDataChangeTrigger", tag = "1")]
    pub trigger: i32,
    #[prost(enumeration = "OpcUaDeadbandType", tag = "2")]
    pub deadband_type: i32,
    #[prost(double, tag = "3")]
    pub deadband_value: f64,
}
/// Configuration for determining which nodes to scrape and how.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaScrapingConfig {
    #[prost(message, optional, tag = "1")]
    pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
    /// The browse name of the node under which the unit is stored for the nodes we scrape.
    #[prost(string, tag = "2")]
    pub unit_node_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub channel_naming_convention: ::core::option::Option<OpcUaChannelNamingConvention>,
    /// If true, we will override the host and port of the OPC UA server with the host and port of the original server URL.
    #[prost(bool, tag = "4")]
    pub override_host: bool,
    /// How we will handle unknown data types when we read them from the server
    #[prost(enumeration = "OpcUaUnknownDataTypeHandling", tag = "5")]
    pub unknown_data_type_handling: i32,
    /// How to handle situations where there are failed monitors.
    #[prost(enumeration = "OpcUaFailedMonitorHandling", tag = "6")]
    pub failed_monitor_handling: i32,
    /// What timestamps should we write for the channels?
    #[prost(message, optional, tag = "7")]
    pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
    /// The data change filter to be applied for the monitored items in the subscription.
    #[prost(message, optional, tag = "8")]
    pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
}
/// Security policies supported for OPC-UA connections
/// buf:lint:ignore ENUM_VALUE_PREFIX
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OpcSecurityPolicy {
    Unspecified = 0,
    None = 1,
}
impl OpcSecurityPolicy {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "OPC_SECURITY_POLICY_UNSPECIFIED",
            Self::None => "NONE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OPC_SECURITY_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
            "NONE" => Some(Self::None),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OpcUaReferenceExplorationType {
    Unspecified = 0,
    Organizes = 1,
    HierarchicalReferences = 2,
}
impl OpcUaReferenceExplorationType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED",
            Self::Organizes => "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES",
            Self::HierarchicalReferences => {
                "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OPC_UA_REFERENCE_EXPLORATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "OPC_UA_REFERENCE_EXPLORATION_TYPE_ORGANIZES" => Some(Self::Organizes),
            "OPC_UA_REFERENCE_EXPLORATION_TYPE_HIERARCHICAL_REFERENCES" => {
                Some(Self::HierarchicalReferences)
            }
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OpcUaUnknownDataTypeHandling {
    Unspecified = 0,
    /// If we encounter an unknown data type, we will error out
    Error = 1,
    /// If we encounter an unknown data type, we will assume it is a double
    TreatAsDouble = 2,
    /// If we encounter an unknown data type, we will assume it is a string
    TreatAsString = 3,
}
impl OpcUaUnknownDataTypeHandling {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED",
            Self::Error => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR",
            Self::TreatAsDouble => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE",
            Self::TreatAsString => "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
            "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_ERROR" => Some(Self::Error),
            "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_DOUBLE" => {
                Some(Self::TreatAsDouble)
            }
            "OPC_UA_UNKNOWN_DATA_TYPE_HANDLING_TREAT_AS_STRING" => {
                Some(Self::TreatAsString)
            }
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OpcUaFailedMonitorHandling {
    Unspecified = 0,
    Error = 1,
    Ignore = 2,
}
impl OpcUaFailedMonitorHandling {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED",
            Self::Error => "OPC_UA_FAILED_MONITOR_HANDLING_ERROR",
            Self::Ignore => "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OPC_UA_FAILED_MONITOR_HANDLING_UNSPECIFIED" => Some(Self::Unspecified),
            "OPC_UA_FAILED_MONITOR_HANDLING_ERROR" => Some(Self::Error),
            "OPC_UA_FAILED_MONITOR_HANDLING_IGNORE" => Some(Self::Ignore),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OpcUaDataChangeTrigger {
    Unspecified = 0,
    StatusOnly = 1,
    StatusValue = 2,
    StatusValueTimestamp = 3,
}
impl OpcUaDataChangeTrigger {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED",
            Self::StatusOnly => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY",
            Self::StatusValue => "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE",
            Self::StatusValueTimestamp => {
                "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OPC_UA_DATA_CHANGE_TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
            "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_ONLY" => Some(Self::StatusOnly),
            "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE" => Some(Self::StatusValue),
            "OPC_UA_DATA_CHANGE_TRIGGER_STATUS_VALUE_TIMESTAMP" => {
                Some(Self::StatusValueTimestamp)
            }
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OpcUaDeadbandType {
    Unspecified = 0,
    None = 1,
    Absolute = 2,
    Percent = 3,
}
impl OpcUaDeadbandType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "OPC_UA_DEADBAND_TYPE_UNSPECIFIED",
            Self::None => "OPC_UA_DEADBAND_TYPE_NONE",
            Self::Absolute => "OPC_UA_DEADBAND_TYPE_ABSOLUTE",
            Self::Percent => "OPC_UA_DEADBAND_TYPE_PERCENT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OPC_UA_DEADBAND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "OPC_UA_DEADBAND_TYPE_NONE" => Some(Self::None),
            "OPC_UA_DEADBAND_TYPE_ABSOLUTE" => Some(Self::Absolute),
            "OPC_UA_DEADBAND_TYPE_PERCENT" => Some(Self::Percent),
            _ => None,
        }
    }
}
/// Request to create a new streaming connection
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateStreamingConnectionRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "3")]
    pub connection_details: ::core::option::Option<StreamingConnectionDetails>,
    #[prost(string, optional, tag = "4")]
    pub workspace_rid: ::core::option::Option<::prost::alloc::string::String>,
}
/// Response for creating a new streaming connection
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateStreamingConnectionResponse {
    #[prost(string, tag = "1")]
    pub streaming_connection_rid: ::prost::alloc::string::String,
}
/// Response for stream operations
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StopStreamResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StartStreamResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
}
/// A configured streaming connection
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamingConnection {
    #[prost(string, tag = "1")]
    pub streaming_connection_rid: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "3")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "4")]
    pub connection_details: ::core::option::Option<StreamingConnectionDetails>,
    #[prost(enumeration = "StreamingConnectionStatus", tag = "6")]
    pub status: i32,
    #[prost(message, optional, tag = "7")]
    pub created_at: ::core::option::Option<
        super::super::super::google::protobuf::Timestamp,
    >,
}
/// Union type for different streaming connection types
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamingConnectionDetails {
    /// Union type for different streaming connection types
    #[prost(
        oneof = "streaming_connection_details::StreamingConnectionDetails",
        tags = "1"
    )]
    pub streaming_connection_details: ::core::option::Option<
        streaming_connection_details::StreamingConnectionDetails,
    >,
}
/// Nested message and enum types in `StreamingConnectionDetails`.
pub mod streaming_connection_details {
    /// Union type for different streaming connection types
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum StreamingConnectionDetails {
        #[prost(message, tag = "1")]
        OpcUa(super::OpcUaConnectionDetails),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamingScrapingConfig {
    /// Union type for different streaming scraping types
    #[prost(oneof = "streaming_scraping_config::StreamingScrapingConfig", tags = "1")]
    pub streaming_scraping_config: ::core::option::Option<
        streaming_scraping_config::StreamingScrapingConfig,
    >,
}
/// Nested message and enum types in `StreamingScrapingConfig`.
pub mod streaming_scraping_config {
    /// Union type for different streaming scraping types
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum StreamingScrapingConfig {
        #[prost(message, tag = "1")]
        OpcUa(super::OpcUaScrapingConfig),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetStreamingConnectionRequest {
    #[prost(string, tag = "1")]
    pub streaming_connection_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetStreamingConnectionResponse {
    #[prost(message, optional, tag = "1")]
    pub streaming_connection: ::core::option::Option<StreamingConnection>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListStreamingConnectionsRequest {
    #[prost(string, repeated, tag = "1")]
    pub workspace_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListStreamingConnectionsResponse {
    #[prost(message, repeated, tag = "1")]
    pub streaming_connections: ::prost::alloc::vec::Vec<StreamingConnection>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStreamingConnectionStatusRequest {
    #[prost(string, tag = "1")]
    pub streaming_connection_rid: ::prost::alloc::string::String,
    #[prost(enumeration = "StreamingConnectionStatus", tag = "2")]
    pub status: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStreamingConnectionStatusResponse {
    #[prost(message, optional, tag = "1")]
    pub streaming_connection: ::core::option::Option<StreamingConnection>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartStreamRequest {
    #[prost(string, tag = "1")]
    pub streaming_connection_rid: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub scraping_config: ::core::option::Option<StreamingScrapingConfig>,
    #[prost(string, tag = "3")]
    pub target_dataset_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopStreamRequest {
    #[prost(string, tag = "1")]
    pub streaming_connection_rid: ::prost::alloc::string::String,
}
/// Error types for streaming connection operations
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StreamingConnectionErrorType {
    Unspecified = 0,
    ConnectionNotFound = 1,
    WorkflowNotFound = 2,
    StreamingConnectionAlreadyRunning = 3,
}
impl StreamingConnectionErrorType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED",
            Self::ConnectionNotFound => {
                "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND"
            }
            Self::WorkflowNotFound => {
                "STREAMING_CONNECTION_ERROR_TYPE_WORKFLOW_NOT_FOUND"
            }
            Self::StreamingConnectionAlreadyRunning => {
                "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "STREAMING_CONNECTION_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "STREAMING_CONNECTION_ERROR_TYPE_CONNECTION_NOT_FOUND" => {
                Some(Self::ConnectionNotFound)
            }
            "STREAMING_CONNECTION_ERROR_TYPE_WORKFLOW_NOT_FOUND" => {
                Some(Self::WorkflowNotFound)
            }
            "STREAMING_CONNECTION_ERROR_TYPE_STREAMING_CONNECTION_ALREADY_RUNNING" => {
                Some(Self::StreamingConnectionAlreadyRunning)
            }
            _ => None,
        }
    }
}
/// The current status of a streaming connection
/// buf:lint:ignore ENUM_VALUE_PREFIX
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StreamingConnectionStatus {
    Unspecified = 0,
    Connected = 1,
    Disconnected = 2,
}
impl StreamingConnectionStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "STREAMING_CONNECTION_STATUS_UNSPECIFIED",
            Self::Connected => "CONNECTED",
            Self::Disconnected => "DISCONNECTED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "STREAMING_CONNECTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "CONNECTED" => Some(Self::Connected),
            "DISCONNECTED" => Some(Self::Disconnected),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod streaming_connection_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service for managing streaming connections to external data sources.
    /// Supports OPC-UA with plans for MQTT, Kafka, and other protocols.
    #[derive(Debug, Clone)]
    pub struct StreamingConnectionServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl StreamingConnectionServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> StreamingConnectionServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> StreamingConnectionServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            StreamingConnectionServiceClient::new(
                InterceptedService::new(inner, interceptor),
            )
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// buf:lint:ignore RPC_REQUEST_STANDARD_NAME
        /// Creates a new streaming connection configuration
        /// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
        pub async fn create_streaming_connection(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateStreamingConnectionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateStreamingConnectionResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.streaming_connection_service.v1.StreamingConnectionService/CreateStreamingConnection",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.streaming_connection_service.v1.StreamingConnectionService",
                        "CreateStreamingConnection",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the details and status of a streaming connection
        pub async fn get_streaming_connection(
            &mut self,
            request: impl tonic::IntoRequest<super::GetStreamingConnectionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetStreamingConnectionResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.streaming_connection_service.v1.StreamingConnectionService/GetStreamingConnection",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.streaming_connection_service.v1.StreamingConnectionService",
                        "GetStreamingConnection",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// List all the streaming connections for a set of workspaces
        pub async fn list_streaming_connections(
            &mut self,
            request: impl tonic::IntoRequest<super::ListStreamingConnectionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListStreamingConnectionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.streaming_connection_service.v1.StreamingConnectionService/ListStreamingConnections",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.streaming_connection_service.v1.StreamingConnectionService",
                        "ListStreamingConnections",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Update the status of a streaming connection
        pub async fn update_streaming_connection_status(
            &mut self,
            request: impl tonic::IntoRequest<
                super::UpdateStreamingConnectionStatusRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::UpdateStreamingConnectionStatusResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.streaming_connection_service.v1.StreamingConnectionService/UpdateStreamingConnectionStatus",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.streaming_connection_service.v1.StreamingConnectionService",
                        "UpdateStreamingConnectionStatus",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Starts streaming data for a connection
        pub async fn start_stream(
            &mut self,
            request: impl tonic::IntoRequest<super::StartStreamRequest>,
        ) -> std::result::Result<
            tonic::Response<super::StartStreamResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.streaming_connection_service.v1.StreamingConnectionService/StartStream",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.streaming_connection_service.v1.StreamingConnectionService",
                        "StartStream",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Stops streaming data for a connection
        pub async fn stop_stream(
            &mut self,
            request: impl tonic::IntoRequest<super::StopStreamRequest>,
        ) -> std::result::Result<
            tonic::Response<super::StopStreamResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.streaming_connection_service.v1.StreamingConnectionService/StopStream",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.streaming_connection_service.v1.StreamingConnectionService",
                        "StopStream",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
