#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcAuthenticationConfig {
#[prost(
oneof = "opc_authentication_config::OpcAuthenticationConfig",
tags = "1, 2, 3"
)]
pub opc_authentication_config: ::core::option::Option<
opc_authentication_config::OpcAuthenticationConfig,
>,
}
pub mod opc_authentication_config {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum OpcAuthenticationConfig {
#[prost(message, tag = "1")]
Anonymous(super::super::super::super::google::protobuf::Empty),
#[prost(message, tag = "2")]
UsernamePassword(super::OpcUsernamePasswordAuthentication),
#[prost(message, tag = "3")]
Token(super::OpcTokenAuthentication),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcAuthenticationConfigSecret {
#[prost(
oneof = "opc_authentication_config_secret::OpcAuthenticationConfig",
tags = "1, 2, 3"
)]
pub opc_authentication_config: ::core::option::Option<
opc_authentication_config_secret::OpcAuthenticationConfig,
>,
}
pub mod opc_authentication_config_secret {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum OpcAuthenticationConfig {
#[prost(message, tag = "1")]
Anonymous(super::super::super::super::google::protobuf::Empty),
#[prost(message, tag = "2")]
UsernamePassword(super::OpcUsernamePasswordAuthenticationSecret),
#[prost(message, tag = "3")]
Token(super::OpcTokenAuthenticationSecret),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUsernamePasswordAuthentication {
#[prost(string, tag = "1")]
pub username: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub password: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUsernamePasswordAuthenticationSecret {
#[prost(string, tag = "1")]
pub username: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub password: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcTokenAuthentication {
#[prost(string, tag = "1")]
pub token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcTokenAuthenticationSecret {
#[prost(string, tag = "1")]
pub token: ::prost::alloc::string::String,
}
#[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,
>,
}
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),
}
}
#[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>,
}
#[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,
>,
}
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 {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaFullPath {
#[prost(message, repeated, tag = "1")]
pub root_nodes: ::prost::alloc::vec::Vec<super::OpcNode>,
#[prost(string, tag = "2")]
pub delimiter: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub array_tag_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum NamingConvention {
#[prost(message, tag = "1")]
NodeId(OpcUaNodeId),
#[prost(message, tag = "2")]
BrowseName(OpcUaBrowseName),
#[prost(message, tag = "3")]
DisplayName(OpcUaDisplayName),
#[prost(message, tag = "4")]
FullPath(OpcUaFullPath),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OpcUaSubscriptionConfig {
#[prost(enumeration = "OpcUaFailedMonitorHandling", tag = "1")]
pub failed_monitor_handling: i32,
#[prost(message, optional, tag = "2")]
pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OpcUaPollingConfig {
#[prost(uint64, tag = "1")]
pub polling_interval_ms: u64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OpcUaDataAcquisitionConfig {
#[prost(oneof = "opc_ua_data_acquisition_config::AcquisitionMode", tags = "1, 2")]
pub acquisition_mode: ::core::option::Option<
opc_ua_data_acquisition_config::AcquisitionMode,
>,
}
pub mod opc_ua_data_acquisition_config {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum AcquisitionMode {
#[prost(message, tag = "1")]
Subscription(super::OpcUaSubscriptionConfig),
#[prost(message, tag = "2")]
Polling(super::OpcUaPollingConfig),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaConnectorDetails {
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub authentication_config: ::core::option::Option<OpcAuthenticationConfig>,
#[prost(message, optional, tag = "3")]
pub scraping_config: ::core::option::Option<OpcUaScrapingConfig>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaConnectorDetailsUpdates {
#[prost(string, optional, tag = "1")]
pub uri: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub authentication_config: ::core::option::Option<OpcAuthenticationConfig>,
#[prost(message, optional, tag = "3")]
pub scraping_config: ::core::option::Option<OpcUaScrapingConfigUpdates>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaConnectorDetailsSecret {
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub authentication_config: ::core::option::Option<OpcAuthenticationConfigSecret>,
#[prost(message, optional, tag = "3")]
pub scraping_config: ::core::option::Option<OpcUaScrapingConfig>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaTraversalConfig {
#[prost(message, repeated, tag = "1")]
pub root_nodes: ::prost::alloc::vec::Vec<OpcNode>,
#[prost(message, repeated, tag = "2")]
pub skip_nodes: ::prost::alloc::vec::Vec<OpcNode>,
#[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,
>,
}
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>,
}
pub mod opc_ua_timestamp_handling {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OpcUaServerTime {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OpcUaSourceTime {}
#[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 {
#[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,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaScrapingConfig {
#[prost(message, optional, tag = "1")]
pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
#[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>,
#[prost(bool, tag = "4")]
pub override_host: bool,
#[prost(enumeration = "OpcUaUnknownDataTypeHandling", tag = "5")]
pub unknown_data_type_handling: i32,
#[deprecated]
#[prost(enumeration = "OpcUaFailedMonitorHandling", optional, tag = "6")]
pub failed_monitor_handling: ::core::option::Option<i32>,
#[prost(message, optional, tag = "7")]
pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
#[deprecated]
#[prost(message, optional, tag = "8")]
pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
#[prost(message, optional, tag = "9")]
pub data_acquisition_config: ::core::option::Option<OpcUaDataAcquisitionConfig>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpcUaScrapingConfigUpdates {
#[prost(message, optional, tag = "1")]
pub node_exploration_config: ::core::option::Option<OpcUaNodeExplorationConfig>,
#[prost(string, optional, tag = "2")]
pub unit_node_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub channel_naming_convention: ::core::option::Option<OpcUaChannelNamingConvention>,
#[prost(bool, optional, tag = "4")]
pub override_host: ::core::option::Option<bool>,
#[prost(enumeration = "OpcUaUnknownDataTypeHandling", optional, tag = "5")]
pub unknown_data_type_handling: ::core::option::Option<i32>,
#[deprecated]
#[prost(enumeration = "OpcUaFailedMonitorHandling", optional, tag = "6")]
pub failed_monitor_handling: ::core::option::Option<i32>,
#[prost(message, optional, tag = "7")]
pub timestamp_handling: ::core::option::Option<OpcUaTimestampHandling>,
#[deprecated]
#[prost(message, optional, tag = "8")]
pub data_change_filter: ::core::option::Option<OpcUaDataChangeFilter>,
#[prost(message, optional, tag = "9")]
pub data_acquisition_config: ::core::option::Option<OpcUaDataAcquisitionConfig>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OpcUaReferenceExplorationType {
Unspecified = 0,
Organizes = 1,
HierarchicalReferences = 2,
}
impl OpcUaReferenceExplorationType {
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"
}
}
}
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,
Error = 1,
TreatAsDouble = 2,
TreatAsString = 3,
}
impl OpcUaUnknownDataTypeHandling {
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",
}
}
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 {
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",
}
}
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 {
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"
}
}
}
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 {
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",
}
}
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,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDataConnectorRequest {
#[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<DataConnectorDetails>,
#[prost(string, tag = "4")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub target_dataset_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDataConnectorResponse {
#[prost(message, optional, tag = "1")]
pub data_connector: ::core::option::Option<DataConnector>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataConnector {
#[prost(string, tag = "1")]
pub data_connector_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<DataConnectorDetailsSecrets>,
#[prost(string, tag = "5")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "6")]
pub target_dataset_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "7")]
pub created_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataConnectorDetails {
#[prost(oneof = "data_connector_details::DataConnectorDetails", tags = "1")]
pub data_connector_details: ::core::option::Option<
data_connector_details::DataConnectorDetails,
>,
}
pub mod data_connector_details {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DataConnectorDetails {
#[prost(message, tag = "1")]
OpcUa(super::OpcUaConnectorDetails),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataConnectorDetailsUpdates {
#[prost(
oneof = "data_connector_details_updates::DataConnectorDetailsUpdates",
tags = "1"
)]
pub data_connector_details_updates: ::core::option::Option<
data_connector_details_updates::DataConnectorDetailsUpdates,
>,
}
pub mod data_connector_details_updates {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DataConnectorDetailsUpdates {
#[prost(message, tag = "1")]
OpcUa(super::OpcUaConnectorDetailsUpdates),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataConnectorDetailsSecrets {
#[prost(oneof = "data_connector_details_secrets::DataConnectorDetails", tags = "1")]
pub data_connector_details: ::core::option::Option<
data_connector_details_secrets::DataConnectorDetails,
>,
}
pub mod data_connector_details_secrets {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DataConnectorDetails {
#[prost(message, tag = "1")]
OpcUa(super::OpcUaConnectorDetailsSecret),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDataConnectorRequest {
#[prost(string, tag = "1")]
pub data_connector_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub name: ::core::option::Option<::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<DataConnectorDetailsUpdates>,
#[prost(string, optional, tag = "5")]
pub target_dataset_rid: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDataConnectorResponse {
#[prost(message, optional, tag = "1")]
pub data_connector: ::core::option::Option<DataConnector>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDataConnectorRequest {
#[prost(string, tag = "1")]
pub data_connector_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDataConnectorResponse {
#[prost(message, optional, tag = "1")]
pub data_connector: ::core::option::Option<DataConnector>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NameFilter {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescriptionFilter {
#[prost(string, tag = "1")]
pub description: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetDatasetFilter {
#[prost(string, tag = "1")]
pub target_dataset_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndFilter {
#[prost(message, repeated, tag = "1")]
pub clauses: ::prost::alloc::vec::Vec<SearchFilter>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SortBy {
#[prost(enumeration = "SortField", tag = "1")]
pub field: i32,
#[prost(enumeration = "SortOrder", tag = "2")]
pub order: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchFilter {
#[prost(oneof = "search_filter::Filter", tags = "1, 2, 3, 4")]
pub filter: ::core::option::Option<search_filter::Filter>,
}
pub mod search_filter {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Filter {
#[prost(message, tag = "1")]
Name(super::NameFilter),
#[prost(message, tag = "2")]
Description(super::DescriptionFilter),
#[prost(message, tag = "3")]
TargetDataset(super::TargetDatasetFilter),
#[prost(message, tag = "4")]
And(super::AndFilter),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub filter: ::core::option::Option<SearchFilter>,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, optional, tag = "4")]
pub page_token: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub sort_by: ::core::option::Option<SortBy>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchResponse {
#[prost(message, repeated, tag = "1")]
pub data_connectors: ::prost::alloc::vec::Vec<DataConnector>,
#[prost(string, optional, tag = "2")]
pub page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartSessionRequest {
#[prost(string, tag = "1")]
pub data_connector_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StartSessionResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopSessionRequest {
#[prost(string, tag = "1")]
pub data_connector_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StopSessionResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSessionStatusRequest {
#[prost(string, tag = "1")]
pub data_connector_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActiveSessionStatus {
#[prost(enumeration = "ReplicaStatus", repeated, tag = "1")]
pub replica_status: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSessionStatusResponse {
#[prost(oneof = "get_session_status_response::Status", tags = "1, 2")]
pub status: ::core::option::Option<get_session_status_response::Status>,
}
pub mod get_session_status_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Status {
#[prost(message, tag = "1")]
None(super::super::super::super::google::protobuf::Empty),
#[prost(message, tag = "2")]
Active(super::ActiveSessionStatus),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDataConnectorRequest {
#[prost(string, tag = "1")]
pub data_connector_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteDataConnectorResponse {}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DataConnectorErrorType {
Unspecified = 0,
ConnectorNotFound = 1,
ConnectorNotAuthorized = 2,
TargetDatasetNotInWorkspace = 3,
}
impl DataConnectorErrorType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "DATA_CONNECTOR_ERROR_TYPE_UNSPECIFIED",
Self::ConnectorNotFound => "DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_FOUND",
Self::ConnectorNotAuthorized => {
"DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_AUTHORIZED"
}
Self::TargetDatasetNotInWorkspace => {
"DATA_CONNECTOR_ERROR_TYPE_TARGET_DATASET_NOT_IN_WORKSPACE"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DATA_CONNECTOR_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_FOUND" => {
Some(Self::ConnectorNotFound)
}
"DATA_CONNECTOR_ERROR_TYPE_CONNECTOR_NOT_AUTHORIZED" => {
Some(Self::ConnectorNotAuthorized)
}
"DATA_CONNECTOR_ERROR_TYPE_TARGET_DATASET_NOT_IN_WORKSPACE" => {
Some(Self::TargetDatasetNotInWorkspace)
}
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SortField {
Unspecified = 0,
UpdatedAt = 1,
}
impl SortField {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SORT_FIELD_UNSPECIFIED",
Self::UpdatedAt => "SORT_FIELD_UPDATED_AT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
"SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SortOrder {
Unspecified = 0,
Asc = 1,
Desc = 2,
}
impl SortOrder {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SORT_ORDER_UNSPECIFIED",
Self::Asc => "SORT_ORDER_ASC",
Self::Desc => "SORT_ORDER_DESC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SORT_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
"SORT_ORDER_ASC" => Some(Self::Asc),
"SORT_ORDER_DESC" => Some(Self::Desc),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ReplicaStatus {
Unspecified = 0,
Starting = 1,
Subscribing = 2,
Running = 3,
Stopping = 4,
Stopped = 5,
}
impl ReplicaStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "REPLICA_STATUS_UNSPECIFIED",
Self::Starting => "REPLICA_STATUS_STARTING",
Self::Subscribing => "REPLICA_STATUS_SUBSCRIBING",
Self::Running => "REPLICA_STATUS_RUNNING",
Self::Stopping => "REPLICA_STATUS_STOPPING",
Self::Stopped => "REPLICA_STATUS_STOPPED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REPLICA_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"REPLICA_STATUS_STARTING" => Some(Self::Starting),
"REPLICA_STATUS_SUBSCRIBING" => Some(Self::Subscribing),
"REPLICA_STATUS_RUNNING" => Some(Self::Running),
"REPLICA_STATUS_STOPPING" => Some(Self::Stopping),
"REPLICA_STATUS_STOPPED" => Some(Self::Stopped),
_ => None,
}
}
}
pub mod data_connector_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct DataConnectorServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DataConnectorServiceClient<tonic::transport::Channel> {
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> DataConnectorServiceClient<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,
) -> DataConnectorServiceClient<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,
{
DataConnectorServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_data_connector(
&mut self,
request: impl tonic::IntoRequest<super::CreateDataConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::CreateDataConnectorResponse>,
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.data_connector.v1.DataConnectorService/CreateDataConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.data_connector.v1.DataConnectorService",
"CreateDataConnector",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_data_connector(
&mut self,
request: impl tonic::IntoRequest<super::GetDataConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::GetDataConnectorResponse>,
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.data_connector.v1.DataConnectorService/GetDataConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.data_connector.v1.DataConnectorService",
"GetDataConnector",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_data_connector(
&mut self,
request: impl tonic::IntoRequest<super::UpdateDataConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateDataConnectorResponse>,
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.data_connector.v1.DataConnectorService/UpdateDataConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.data_connector.v1.DataConnectorService",
"UpdateDataConnector",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn search(
&mut self,
request: impl tonic::IntoRequest<super::SearchRequest>,
) -> std::result::Result<tonic::Response<super::SearchResponse>, 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.data_connector.v1.DataConnectorService/Search",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.data_connector.v1.DataConnectorService",
"Search",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn start_session(
&mut self,
request: impl tonic::IntoRequest<super::StartSessionRequest>,
) -> std::result::Result<
tonic::Response<super::StartSessionResponse>,
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.data_connector.v1.DataConnectorService/StartSession",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.data_connector.v1.DataConnectorService",
"StartSession",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn stop_session(
&mut self,
request: impl tonic::IntoRequest<super::StopSessionRequest>,
) -> std::result::Result<
tonic::Response<super::StopSessionResponse>,
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.data_connector.v1.DataConnectorService/StopSession",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.data_connector.v1.DataConnectorService",
"StopSession",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_session_status(
&mut self,
request: impl tonic::IntoRequest<super::GetSessionStatusRequest>,
) -> std::result::Result<
tonic::Response<super::GetSessionStatusResponse>,
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.data_connector.v1.DataConnectorService/GetSessionStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.data_connector.v1.DataConnectorService",
"GetSessionStatus",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_data_connector(
&mut self,
request: impl tonic::IntoRequest<super::DeleteDataConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteDataConnectorResponse>,
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.data_connector.v1.DataConnectorService/DeleteDataConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.data_connector.v1.DataConnectorService",
"DeleteDataConnector",
),
);
self.inner.unary(req, path, codec).await
}
}
}