#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeRange {
#[prost(message, optional, tag = "1")]
pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Locator {
#[prost(string, tag = "1")]
pub data_source_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub asset_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub run_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub data_scope: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub time_range: ::core::option::Option<TimeRange>,
#[prost(map = "string, string", tag = "6")]
pub injected_tags: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExpandedLocator {
#[prost(message, optional, tag = "1")]
pub locator: ::core::option::Option<Locator>,
#[prost(string, repeated, tag = "2")]
pub scope_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SeriesId {
#[prost(oneof = "series_id::Id", tags = "1, 2")]
pub id: ::core::option::Option<series_id::Id>,
}
pub mod series_id {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Id {
#[prost(string, tag = "1")]
SeriesMetadataRid(::prost::alloc::string::String),
#[prost(string, tag = "2")]
LogicalSeriesRid(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelLocation {
#[prost(message, optional, tag = "1")]
pub locator: ::core::option::Option<ExpandedLocator>,
#[prost(string, optional, tag = "2")]
pub unit: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(
enumeration = "super::super::types::series::SeriesDataType",
optional,
tag = "4"
)]
pub data_type: ::core::option::Option<i32>,
#[prost(message, optional, tag = "5")]
pub series_id: ::core::option::Option<SeriesId>,
#[prost(message, optional, tag = "6")]
pub property_value: ::core::option::Option<super::super::types::TypedPropertyValue>,
#[prost(
enumeration = "super::super::types::series::ChannelKind",
optional,
tag = "7"
)]
pub channel_kind: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelEntry {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "ChannelEntryKind", tag = "2")]
pub kind: i32,
#[prost(message, repeated, tag = "3")]
pub locations: ::prost::alloc::vec::Vec<ChannelLocation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelSearchText {
#[prost(oneof = "channel_search_text::Match", tags = "1, 2, 3")]
pub r#match: ::core::option::Option<channel_search_text::Match>,
}
pub mod channel_search_text {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Match {
#[prost(string, tag = "1")]
Substring(::prost::alloc::string::String),
#[prost(string, tag = "2")]
Subsequence(::prost::alloc::string::String),
#[prost(string, tag = "3")]
Fuzzy(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchChannelsRequest {
#[prost(message, optional, tag = "1")]
pub scope: ::core::option::Option<super::super::compute::v1::DatasetScope>,
#[prost(message, optional, tag = "2")]
pub query: ::core::option::Option<ChannelSearchText>,
#[prost(message, optional, tag = "3")]
pub time_range: ::core::option::Option<TimeRange>,
#[prost(
enumeration = "super::super::types::series::SeriesDataType",
repeated,
packed = "false",
tag = "4"
)]
pub data_types: ::prost::alloc::vec::Vec<i32>,
#[prost(bool, tag = "5")]
pub include_properties: bool,
#[prost(int32, tag = "6")]
pub page_size: i32,
#[prost(string, tag = "7")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchChannelsResponse {
#[prost(message, repeated, tag = "1")]
pub channels: ::prost::alloc::vec::Vec<ChannelEntry>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchSearchChannelsRequest {
#[prost(map = "string, message", tag = "1")]
pub scopes: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::compute::v1::DatasetScope,
>,
#[prost(message, optional, tag = "2")]
pub query: ::core::option::Option<ChannelSearchText>,
#[prost(message, optional, tag = "3")]
pub time_range: ::core::option::Option<TimeRange>,
#[prost(
enumeration = "super::super::types::series::SeriesDataType",
repeated,
packed = "false",
tag = "4"
)]
pub data_types: ::prost::alloc::vec::Vec<i32>,
#[prost(bool, tag = "5")]
pub include_properties: bool,
#[prost(int32, tag = "6")]
pub page_size: i32,
#[prost(string, tag = "7")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchSearchChannelsResponse {
#[prost(message, repeated, tag = "1")]
pub channels: ::prost::alloc::vec::Vec<ChannelEntry>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelPrefix {
#[prost(string, tag = "1")]
pub part: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub present_at: ::prost::alloc::vec::Vec<ExpandedLocator>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelChild {
#[prost(oneof = "channel_child::Child", tags = "1, 2")]
pub child: ::core::option::Option<channel_child::Child>,
}
pub mod channel_child {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Child {
#[prost(message, tag = "1")]
Channel(super::ChannelEntry),
#[prost(message, tag = "2")]
Prefix(super::ChannelPrefix),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListChannelChildrenRequest {
#[prost(message, optional, tag = "1")]
pub scope: ::core::option::Option<super::super::compute::v1::DatasetScope>,
#[prost(string, repeated, tag = "2")]
pub parent: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub time_range: ::core::option::Option<TimeRange>,
#[prost(int32, tag = "4")]
pub page_size: i32,
#[prost(string, tag = "5")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListChannelChildrenResponse {
#[prost(message, repeated, tag = "1")]
pub children: ::prost::alloc::vec::Vec<ChannelChild>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchListChannelChildrenRequest {
#[prost(map = "string, message", tag = "1")]
pub scopes: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::compute::v1::DatasetScope,
>,
#[prost(string, repeated, tag = "2")]
pub parent: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub time_range: ::core::option::Option<TimeRange>,
#[prost(int32, tag = "4")]
pub page_size: i32,
#[prost(string, tag = "5")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchListChannelChildrenResponse {
#[prost(message, repeated, tag = "1")]
pub children: ::prost::alloc::vec::Vec<ChannelChild>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocatorDetails {
#[prost(message, optional, tag = "1")]
pub locator: ::core::option::Option<ExpandedLocator>,
#[prost(string, optional, tag = "2")]
pub delimiter: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLocatorsRequest {
#[prost(message, optional, tag = "1")]
pub scope: ::core::option::Option<super::super::compute::v1::DatasetScope>,
#[prost(message, optional, tag = "2")]
pub time_range: ::core::option::Option<TimeRange>,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLocatorsResponse {
#[prost(message, repeated, tag = "1")]
pub locators: ::prost::alloc::vec::Vec<LocatorDetails>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchListLocatorsRequest {
#[prost(map = "string, message", tag = "1")]
pub scopes: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::compute::v1::DatasetScope,
>,
#[prost(message, optional, tag = "2")]
pub time_range: ::core::option::Option<TimeRange>,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchListLocatorsResponse {
#[prost(message, repeated, tag = "1")]
pub locators: ::prost::alloc::vec::Vec<LocatorDetails>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ChannelEntryKind {
Unspecified = 0,
Channel = 1,
Property = 2,
}
impl ChannelEntryKind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "CHANNEL_ENTRY_KIND_UNSPECIFIED",
Self::Channel => "CHANNEL_ENTRY_KIND_CHANNEL",
Self::Property => "CHANNEL_ENTRY_KIND_PROPERTY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CHANNEL_ENTRY_KIND_UNSPECIFIED" => Some(Self::Unspecified),
"CHANNEL_ENTRY_KIND_CHANNEL" => Some(Self::Channel),
"CHANNEL_ENTRY_KIND_PROPERTY" => Some(Self::Property),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ChannelSearchError {
InvalidPageToken = 0,
}
impl ChannelSearchError {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::InvalidPageToken => "CHANNEL_SEARCH_ERROR_INVALID_PAGE_TOKEN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CHANNEL_SEARCH_ERROR_INVALID_PAGE_TOKEN" => Some(Self::InvalidPageToken),
_ => None,
}
}
}
pub mod channel_search_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 ChannelSearchServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ChannelSearchServiceClient<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> ChannelSearchServiceClient<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,
) -> ChannelSearchServiceClient<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,
{
ChannelSearchServiceClient::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 search_channels(
&mut self,
request: impl tonic::IntoRequest<super::SearchChannelsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchChannelsResponse>,
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.channelsearch.v1.ChannelSearchService/SearchChannels",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.channelsearch.v1.ChannelSearchService",
"SearchChannels",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_search_channels(
&mut self,
request: impl tonic::IntoRequest<super::BatchSearchChannelsRequest>,
) -> std::result::Result<
tonic::Response<super::BatchSearchChannelsResponse>,
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.channelsearch.v1.ChannelSearchService/BatchSearchChannels",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.channelsearch.v1.ChannelSearchService",
"BatchSearchChannels",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_channel_children(
&mut self,
request: impl tonic::IntoRequest<super::ListChannelChildrenRequest>,
) -> std::result::Result<
tonic::Response<super::ListChannelChildrenResponse>,
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.channelsearch.v1.ChannelSearchService/ListChannelChildren",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.channelsearch.v1.ChannelSearchService",
"ListChannelChildren",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_list_channel_children(
&mut self,
request: impl tonic::IntoRequest<super::BatchListChannelChildrenRequest>,
) -> std::result::Result<
tonic::Response<super::BatchListChannelChildrenResponse>,
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.channelsearch.v1.ChannelSearchService/BatchListChannelChildren",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.channelsearch.v1.ChannelSearchService",
"BatchListChannelChildren",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_locators(
&mut self,
request: impl tonic::IntoRequest<super::ListLocatorsRequest>,
) -> std::result::Result<
tonic::Response<super::ListLocatorsResponse>,
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.channelsearch.v1.ChannelSearchService/ListLocators",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.channelsearch.v1.ChannelSearchService",
"ListLocators",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_list_locators(
&mut self,
request: impl tonic::IntoRequest<super::BatchListLocatorsRequest>,
) -> std::result::Result<
tonic::Response<super::BatchListLocatorsResponse>,
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.channelsearch.v1.ChannelSearchService/BatchListLocators",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.channelsearch.v1.ChannelSearchService",
"BatchListLocators",
),
);
self.inner.unary(req, path, codec).await
}
}
}