#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateTimeSeriesRule {
#[prost(string, tag = "1")]
pub aggregation: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub bucket_duration: ::core::option::Option<::prost_types::Duration>,
#[prost(string, repeated, tag = "3")]
pub dependent_features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub retention: ::core::option::Option<::prost_types::Duration>,
#[prost(string, tag = "5")]
pub datetime_feature: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateTimeSeries {
#[prost(string, tag = "1")]
pub namespace: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub aggregate_on: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub group_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "5")]
pub rules: ::prost::alloc::vec::Vec<AggregateTimeSeriesRule>,
#[prost(string, tag = "6")]
pub filters_description: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub bucket_feature: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AggregateBackfillCostEstimate {
#[prost(int64, tag = "1")]
pub max_buckets: i64,
#[prost(int64, tag = "2")]
pub expected_buckets: i64,
#[prost(int64, tag = "3")]
pub expected_bytes: i64,
#[prost(double, tag = "4")]
pub expected_storage_cost: f64,
#[prost(message, optional, tag = "5")]
pub expected_runtime: ::core::option::Option<::prost_types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateBackfillUserParams {
#[prost(string, repeated, tag = "1")]
pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub resolver: ::core::option::Option<::prost::alloc::string::String>,
#[deprecated]
#[prost(string, optional, tag = "3")]
pub timestamp_column_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub lower_bound: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub upper_bound: ::core::option::Option<::prost_types::Timestamp>,
#[prost(bool, tag = "6")]
pub exact: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateBackfill {
#[prost(message, repeated, tag = "1")]
pub series: ::prost::alloc::vec::Vec<AggregateTimeSeries>,
#[prost(string, tag = "2")]
pub resolver: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub datetime_feature: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub bucket_duration: ::core::option::Option<::prost_types::Duration>,
#[prost(string, tag = "5")]
pub filters_description: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "6")]
pub group_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "7")]
pub max_retention: ::core::option::Option<::prost_types::Duration>,
#[prost(message, optional, tag = "8")]
pub lower_bound: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "9")]
pub upper_bound: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateBackfillWithCostEstimate {
#[prost(message, optional, tag = "1")]
pub backfill: ::core::option::Option<AggregateBackfill>,
#[prost(message, optional, tag = "2")]
pub estimate: ::core::option::Option<AggregateBackfillCostEstimate>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateBackfillJob {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub environment_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub resolver: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub agent_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub deployment_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "7")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, repeated, tag = "9")]
pub resolvers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "10")]
pub cron_aggregate_backfill_id: ::core::option::Option<
::prost::alloc::string::String,
>,
#[prost(string, optional, tag = "11")]
pub plan_hash: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "AggregateBackfillStatus", tag = "12")]
pub status: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CronAggregateBackfill {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub environment_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub deployment_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub schedule: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub plan_hash: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "8")]
pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "9")]
pub resolvers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "6")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AggregateBackfillStatus {
Unspecified = 0,
Initializing = 1,
InitFailed = 2,
Skipped = 3,
Queued = 4,
Working = 5,
Completed = 6,
Failed = 7,
Canceled = 8,
}
impl AggregateBackfillStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "AGGREGATE_BACKFILL_STATUS_UNSPECIFIED",
Self::Initializing => "AGGREGATE_BACKFILL_STATUS_INITIALIZING",
Self::InitFailed => "AGGREGATE_BACKFILL_STATUS_INIT_FAILED",
Self::Skipped => "AGGREGATE_BACKFILL_STATUS_SKIPPED",
Self::Queued => "AGGREGATE_BACKFILL_STATUS_QUEUED",
Self::Working => "AGGREGATE_BACKFILL_STATUS_WORKING",
Self::Completed => "AGGREGATE_BACKFILL_STATUS_COMPLETED",
Self::Failed => "AGGREGATE_BACKFILL_STATUS_FAILED",
Self::Canceled => "AGGREGATE_BACKFILL_STATUS_CANCELED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AGGREGATE_BACKFILL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"AGGREGATE_BACKFILL_STATUS_INITIALIZING" => Some(Self::Initializing),
"AGGREGATE_BACKFILL_STATUS_INIT_FAILED" => Some(Self::InitFailed),
"AGGREGATE_BACKFILL_STATUS_SKIPPED" => Some(Self::Skipped),
"AGGREGATE_BACKFILL_STATUS_QUEUED" => Some(Self::Queued),
"AGGREGATE_BACKFILL_STATUS_WORKING" => Some(Self::Working),
"AGGREGATE_BACKFILL_STATUS_COMPLETED" => Some(Self::Completed),
"AGGREGATE_BACKFILL_STATUS_FAILED" => Some(Self::Failed),
"AGGREGATE_BACKFILL_STATUS_CANCELED" => Some(Self::Canceled),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanAggregateBackfillRequest {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<AggregateBackfillUserParams>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanAggregateBackfillResponse {
#[prost(message, optional, tag = "2")]
pub estimate: ::core::option::Option<AggregateBackfillCostEstimate>,
#[prost(string, repeated, tag = "4")]
pub errors: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "6")]
pub backfills: ::prost::alloc::vec::Vec<AggregateBackfillWithCostEstimate>,
#[prost(string, tag = "7")]
pub aggregate_backfill_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAggregatesRequest {
#[prost(string, repeated, tag = "1")]
pub for_features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAggregatesResponse {
#[prost(message, repeated, tag = "1")]
pub series: ::prost::alloc::vec::Vec<AggregateTimeSeries>,
#[prost(string, repeated, tag = "2")]
pub errors: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAggregateBackfillJobsRequest {
#[prost(int32, tag = "1")]
pub limit: i32,
#[prost(string, tag = "2")]
pub cursor: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub plan_hash: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAggregateBackfillJobsResponse {
#[prost(message, repeated, tag = "1")]
pub jobs: ::prost::alloc::vec::Vec<AggregateBackfillJob>,
#[prost(string, tag = "2")]
pub cursor: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAggregateBackfillJobRequest {
#[prost(string, tag = "1")]
pub aggregate_backfill_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAggregateBackfillJobResponse {
#[prost(message, optional, tag = "1")]
pub job: ::core::option::Option<AggregateBackfillJob>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCronAggregateBackfillRequest {
#[deprecated]
#[prost(string, tag = "1")]
pub cron_aggregate_backfill_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub plan_hash: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCronAggregateBackfillResponse {
#[prost(message, optional, tag = "1")]
pub cron_aggregate_backfill: ::core::option::Option<CronAggregateBackfill>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetActiveCronAggregateBackfillsRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CronAggregateBackfillWithLatestRun {
#[prost(message, optional, tag = "1")]
pub cron_aggregate_backfill: ::core::option::Option<CronAggregateBackfill>,
#[prost(message, optional, tag = "2")]
pub latest_job: ::core::option::Option<AggregateBackfillJob>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetActiveCronAggregateBackfillsResponse {
#[prost(message, repeated, tag = "1")]
pub cron_aggregate_backfills: ::prost::alloc::vec::Vec<
CronAggregateBackfillWithLatestRun,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAggregateBackfillJobRequest {
#[prost(string, repeated, tag = "1")]
pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub lower_bound: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub upper_bound: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, optional, tag = "4")]
pub resolver: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub bucket_feature: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag = "6")]
pub enable_profiling: bool,
#[prost(string, optional, tag = "7")]
pub aggregate_backfill_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "8")]
pub resource_group: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAggregateBackfillJobResponse {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "3")]
pub errors: ::prost::alloc::vec::Vec<super::super::common::v1::ChalkError>,
}
pub mod aggregate_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 AggregateServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl AggregateServiceClient<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> AggregateServiceClient<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,
) -> AggregateServiceClient<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,
{
AggregateServiceClient::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 plan_aggregate_backfill(
&mut self,
request: impl tonic::IntoRequest<super::PlanAggregateBackfillRequest>,
) -> std::result::Result<
tonic::Response<super::PlanAggregateBackfillResponse>,
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(
"/chalk.aggregate.v1.AggregateService/PlanAggregateBackfill",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"chalk.aggregate.v1.AggregateService",
"PlanAggregateBackfill",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_aggregates(
&mut self,
request: impl tonic::IntoRequest<super::GetAggregatesRequest>,
) -> std::result::Result<
tonic::Response<super::GetAggregatesResponse>,
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(
"/chalk.aggregate.v1.AggregateService/GetAggregates",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"chalk.aggregate.v1.AggregateService",
"GetAggregates",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_aggregate_backfill_jobs(
&mut self,
request: impl tonic::IntoRequest<super::GetAggregateBackfillJobsRequest>,
) -> std::result::Result<
tonic::Response<super::GetAggregateBackfillJobsResponse>,
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(
"/chalk.aggregate.v1.AggregateService/GetAggregateBackfillJobs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"chalk.aggregate.v1.AggregateService",
"GetAggregateBackfillJobs",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_aggregate_backfill_job(
&mut self,
request: impl tonic::IntoRequest<super::GetAggregateBackfillJobRequest>,
) -> std::result::Result<
tonic::Response<super::GetAggregateBackfillJobResponse>,
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(
"/chalk.aggregate.v1.AggregateService/GetAggregateBackfillJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"chalk.aggregate.v1.AggregateService",
"GetAggregateBackfillJob",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_cron_aggregate_backfill(
&mut self,
request: impl tonic::IntoRequest<super::GetCronAggregateBackfillRequest>,
) -> std::result::Result<
tonic::Response<super::GetCronAggregateBackfillResponse>,
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(
"/chalk.aggregate.v1.AggregateService/GetCronAggregateBackfill",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"chalk.aggregate.v1.AggregateService",
"GetCronAggregateBackfill",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_active_cron_aggregate_backfills(
&mut self,
request: impl tonic::IntoRequest<
super::GetActiveCronAggregateBackfillsRequest,
>,
) -> std::result::Result<
tonic::Response<super::GetActiveCronAggregateBackfillsResponse>,
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(
"/chalk.aggregate.v1.AggregateService/GetActiveCronAggregateBackfills",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"chalk.aggregate.v1.AggregateService",
"GetActiveCronAggregateBackfills",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_aggregate_backfill_job(
&mut self,
request: impl tonic::IntoRequest<super::CreateAggregateBackfillJobRequest>,
) -> std::result::Result<
tonic::Response<super::CreateAggregateBackfillJobResponse>,
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(
"/chalk.aggregate.v1.AggregateService/CreateAggregateBackfillJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"chalk.aggregate.v1.AggregateService",
"CreateAggregateBackfillJob",
),
);
self.inner.unary(req, path, codec).await
}
}
}