#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryRequest {
#[prost(message, optional, tag = "1")]
pub query: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub metadata: ::core::option::Option<Metadata>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metadata {
#[prost(message, optional, tag = "1")]
pub start_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub default_source: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "metadata::Tier", optional, tag = "4")]
pub tier: ::core::option::Option<i32>,
#[prost(enumeration = "QuerySyntax", optional, tag = "5")]
pub syntax: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "6")]
pub limit: ::core::option::Option<i32>,
#[prost(bool, optional, tag = "7")]
pub strict_fields_validation: ::core::option::Option<bool>,
#[prost(message, optional, tag = "8")]
pub now_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
pub mod metadata {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Tier {
Unspecified = 0,
Archive = 1,
FrequentSearch = 2,
}
impl Tier {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TIER_UNSPECIFIED",
Self::Archive => "TIER_ARCHIVE",
Self::FrequentSearch => "TIER_FREQUENT_SEARCH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TIER_UNSPECIFIED" => Some(Self::Unspecified),
"TIER_ARCHIVE" => Some(Self::Archive),
"TIER_FREQUENT_SEARCH" => Some(Self::FrequentSearch),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum QuerySyntax {
Unspecified = 0,
Lucene = 1,
Dataprime = 2,
}
impl QuerySyntax {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "QUERY_SYNTAX_UNSPECIFIED",
Self::Lucene => "QUERY_SYNTAX_LUCENE",
Self::Dataprime => "QUERY_SYNTAX_DATAPRIME",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"QUERY_SYNTAX_UNSPECIFIED" => Some(Self::Unspecified),
"QUERY_SYNTAX_LUCENE" => Some(Self::Lucene),
"QUERY_SYNTAX_DATAPRIME" => Some(Self::Dataprime),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryResponse {
#[prost(oneof = "query_response::Message", tags = "1, 2, 3, 4")]
pub message: ::core::option::Option<query_response::Message>,
}
pub mod query_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Message {
#[prost(message, tag = "1")]
Error(super::DataprimeError),
#[prost(message, tag = "2")]
Result(super::DataprimeResult),
#[prost(message, tag = "3")]
Warning(super::DataprimeWarning),
#[prost(message, tag = "4")]
QueryId(super::QueryId),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataprimeWarning {
#[prost(
oneof = "dataprime_warning::WarningType",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11"
)]
pub warning_type: ::core::option::Option<dataprime_warning::WarningType>,
}
pub mod dataprime_warning {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum WarningType {
#[prost(message, tag = "1")]
CompileWarning(super::CompileWarning),
#[prost(message, tag = "2")]
TimeRangeWarning(super::TimeRangeWarning),
#[prost(message, tag = "3")]
NumberOfResultsLimitWarning(super::NumberOfResultsLimitWarning),
#[prost(message, tag = "4")]
BytesScannedLimitWarning(super::BytesScannedLimitWarning),
#[prost(message, tag = "5")]
DeprecationWarning(super::DeprecationWarning),
#[prost(message, tag = "6")]
BlocksLimitWarning(super::BlocksLimitWarning),
#[prost(message, tag = "7")]
AggregationBucketsLimitWarning(super::AggregationBucketsLimitWarning),
#[prost(message, tag = "8")]
ArchiveWarning(super::ArchiveWarning),
#[prost(message, tag = "9")]
ScrollTimeoutWarning(super::ScrollTimeoutWarning),
#[prost(message, tag = "10")]
FieldCountLimitWarning(super::FieldCountLimitWarning),
#[prost(message, tag = "11")]
ShuffleFileSizeLimitReachedWarning(super::ShuffleFileSizeLimitReachedWarning),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompileWarning {
#[prost(string, tag = "1")]
pub warning_message: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeRangeWarning {
#[prost(string, tag = "1")]
pub warning_message: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub start_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub end_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NumberOfResultsLimitWarning {
#[prost(int32, tag = "1")]
pub number_of_results_limit: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BytesScannedLimitWarning {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AggregationBucketsLimitWarning {
#[prost(int32, tag = "1")]
pub aggregation_buckets_limit: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeprecationWarning {
#[prost(string, tag = "1")]
pub warning_message: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BlocksLimitWarning {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataprimeResult {
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<DataprimeResults>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataprimeResults {
#[prost(message, repeated, tag = "1")]
pub metadata: ::prost::alloc::vec::Vec<dataprime_results::KeyValue>,
#[prost(message, repeated, tag = "2")]
pub labels: ::prost::alloc::vec::Vec<dataprime_results::KeyValue>,
#[prost(string, tag = "3")]
pub user_data: ::prost::alloc::string::String,
}
pub mod dataprime_results {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyValue {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataprimeError {
#[prost(message, optional, tag = "1")]
pub message: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub code: ::core::option::Option<dataprime_error::Code>,
}
pub mod dataprime_error {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RateLimitReached {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Code {
#[prost(oneof = "code::Message", tags = "1")]
pub message: ::core::option::Option<code::Message>,
}
pub mod code {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Message {
#[prost(message, tag = "1")]
RateLimitReached(super::RateLimitReached),
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SerializedDataprime {
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryId {
#[prost(string, tag = "1")]
pub query_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ArchiveWarning {
#[prost(oneof = "archive_warning::WarningType", tags = "1, 2, 3, 4")]
pub warning_type: ::core::option::Option<archive_warning::WarningType>,
}
pub mod archive_warning {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NoMetastoreData {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BucketAccessDenied {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BucketReadFailed {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MissingData {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum WarningType {
#[prost(message, tag = "1")]
NoMetastoreData(NoMetastoreData),
#[prost(message, tag = "2")]
BucketAccessDenied(BucketAccessDenied),
#[prost(message, tag = "3")]
BucketReadFailed(BucketReadFailed),
#[prost(message, tag = "4")]
MissingData(MissingData),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ScrollTimeoutWarning {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FieldCountLimitWarning {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ShuffleFileSizeLimitReachedWarning {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ResponseMetadata {
#[prost(oneof = "response_metadata::Message", tags = "1")]
pub message: ::core::option::Option<response_metadata::Message>,
}
pub mod response_metadata {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Statistics {
#[prost(int64, tag = "1")]
pub bytes_scanned: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Message {
#[prost(message, tag = "1")]
Statistics(Statistics),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitBackgroundQueryRequest {
#[prost(message, optional, tag = "1")]
pub query: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "QuerySyntax", tag = "2")]
pub syntax: i32,
#[prost(message, optional, tag = "3")]
pub start_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub end_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub now_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackgroundQueryStatusRequest {
#[prost(string, tag = "1")]
pub query_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackgroundQueryDataRequest {
#[prost(string, tag = "1")]
pub query_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelBackgroundQueryRequest {
#[prost(string, tag = "1")]
pub query_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitBackgroundQueryResponse {
#[prost(string, tag = "1")]
pub query_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub warnings: ::prost::alloc::vec::Vec<DataprimeWarning>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackgroundQueryStatusResponse {
#[prost(message, optional, tag = "4")]
pub submitted_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, repeated, tag = "5")]
pub metadata: ::prost::alloc::vec::Vec<ResponseMetadata>,
#[prost(message, repeated, tag = "6")]
pub warnings: ::prost::alloc::vec::Vec<DataprimeWarning>,
#[prost(oneof = "get_background_query_status_response::Status", tags = "1, 2, 3")]
pub status: ::core::option::Option<get_background_query_status_response::Status>,
}
pub mod get_background_query_status_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WaitingForExecution {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Running {
#[prost(message, optional, tag = "1")]
pub running_since: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Terminated {
#[prost(message, optional, tag = "2")]
pub running_since: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub terminated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(oneof = "terminated::Status", tags = "4, 5, 6")]
pub status: ::core::option::Option<terminated::Status>,
}
pub mod terminated {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Success {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Cancelled {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Error {
#[prost(oneof = "error::Error", tags = "1, 2, 3")]
pub error: ::core::option::Option<error::Error>,
}
pub mod error {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimedOut {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Cancelled {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Failed {
#[prost(message, optional, tag = "1")]
pub reason: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Error {
#[prost(message, tag = "1")]
TimedOut(TimedOut),
#[prost(message, tag = "2")]
Cancelled(Cancelled),
#[prost(message, tag = "3")]
Failed(Failed),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Status {
#[prost(message, tag = "4")]
Success(Success),
#[prost(message, tag = "5")]
Error(Error),
#[prost(message, tag = "6")]
Cancelled(Cancelled),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Status {
#[prost(message, tag = "1")]
Running(Running),
#[prost(message, tag = "2")]
Terminated(Terminated),
#[prost(message, tag = "3")]
WaitingForExecution(WaitingForExecution),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackgroundQueryDataResponse {
#[prost(oneof = "get_background_query_data_response::Message", tags = "1")]
pub message: ::core::option::Option<get_background_query_data_response::Message>,
}
pub mod get_background_query_data_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Message {
#[prost(message, tag = "1")]
Response(super::GetDataResponse),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDataResponse {
#[prost(message, optional, tag = "1")]
pub results: ::core::option::Option<DataprimeResult>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CancelBackgroundQueryResponse {}
pub mod dataprime_query_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 DataprimeQueryServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DataprimeQueryServiceClient<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> DataprimeQueryServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
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,
) -> DataprimeQueryServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
DataprimeQueryServiceClient::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 query(
&mut self,
request: impl tonic::IntoRequest<super::QueryRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::QueryResponse>>,
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(
"/com.coralogixapis.dataprime.v1.DataprimeQueryService/Query",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dataprime.v1.DataprimeQueryService",
"Query",
),
);
self.inner.server_streaming(req, path, codec).await
}
pub async fn submit_background_query(
&mut self,
request: impl tonic::IntoRequest<super::SubmitBackgroundQueryRequest>,
) -> std::result::Result<
tonic::Response<super::SubmitBackgroundQueryResponse>,
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(
"/com.coralogixapis.dataprime.v1.DataprimeQueryService/SubmitBackgroundQuery",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dataprime.v1.DataprimeQueryService",
"SubmitBackgroundQuery",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_background_query_status(
&mut self,
request: impl tonic::IntoRequest<super::GetBackgroundQueryStatusRequest>,
) -> std::result::Result<
tonic::Response<super::GetBackgroundQueryStatusResponse>,
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(
"/com.coralogixapis.dataprime.v1.DataprimeQueryService/GetBackgroundQueryStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dataprime.v1.DataprimeQueryService",
"GetBackgroundQueryStatus",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_background_query_data(
&mut self,
request: impl tonic::IntoRequest<super::GetBackgroundQueryDataRequest>,
) -> std::result::Result<
tonic::Response<
tonic::codec::Streaming<super::GetBackgroundQueryDataResponse>,
>,
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(
"/com.coralogixapis.dataprime.v1.DataprimeQueryService/GetBackgroundQueryData",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dataprime.v1.DataprimeQueryService",
"GetBackgroundQueryData",
),
);
self.inner.server_streaming(req, path, codec).await
}
pub async fn cancel_background_query(
&mut self,
request: impl tonic::IntoRequest<super::CancelBackgroundQueryRequest>,
) -> std::result::Result<
tonic::Response<super::CancelBackgroundQueryResponse>,
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(
"/com.coralogixapis.dataprime.v1.DataprimeQueryService/CancelBackgroundQuery",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dataprime.v1.DataprimeQueryService",
"CancelBackgroundQuery",
),
);
self.inner.unary(req, path, codec).await
}
}
}