use conjure_http::endpoint;
/// The Series Cache service manages internal chunks of data cached by Nominal's backend.
#[conjure_http::conjure_endpoints(
    name = "SeriesCacheService",
    use_legacy_error_serialization
)]
pub trait SeriesCacheService {
    /// Fetches "chunks" of series that are stored as Arrow files in S3.
    /// This endpoint is being deprecated for new series in favor of batchGetCachedSeries
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/logical-series/{logicalSeriesRid}/get-chunks",
        name = "getChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "logicalSeriesRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "logicalSeriesRid"
        )]
        logical_series_rid: conjure_object::ResourceIdentifier,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "getChunksParameters"
        )]
        get_chunks_parameters: super::super::super::super::objects::timeseries::seriescache::api::GetChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::GetChunksResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/logical-series/{logicalSeriesRid}/create-chunks",
        name = "createChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn create_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "logicalSeriesRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "logicalSeriesRid"
        )]
        logical_series_rid: conjure_object::ResourceIdentifier,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createChunksParameters"
        )]
        create_chunks_parameters: super::super::super::super::objects::timeseries::seriescache::api::CreateChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::CreateChunksResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/batch-create-chunks",
        name = "batchCreateChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn batch_create_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::seriescache::api::CreateChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::CreateChunksResponse,
        conjure_http::private::Error,
    >;
    /// Deletes the chunks that intersect the given time range. Does not delete the corresponding files from S3.
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/logical-series/{logicalSeriesRid}/delete-chunks",
        name = "deleteChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn delete_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "logicalSeriesRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "logicalSeriesRid"
        )]
        logical_series_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        request: super::super::super::super::objects::timeseries::seriescache::api::DeleteChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::DeleteChunksResponse,
        conjure_http::private::Error,
    >;
}
/// The Series Cache service manages internal chunks of data cached by Nominal's backend.
#[conjure_http::conjure_endpoints(
    name = "SeriesCacheService",
    use_legacy_error_serialization
)]
pub trait AsyncSeriesCacheService {
    /// Fetches "chunks" of series that are stored as Arrow files in S3.
    /// This endpoint is being deprecated for new series in favor of batchGetCachedSeries
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/logical-series/{logicalSeriesRid}/get-chunks",
        name = "getChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "logicalSeriesRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "logicalSeriesRid"
        )]
        logical_series_rid: conjure_object::ResourceIdentifier,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "getChunksParameters"
        )]
        get_chunks_parameters: super::super::super::super::objects::timeseries::seriescache::api::GetChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::GetChunksResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/logical-series/{logicalSeriesRid}/create-chunks",
        name = "createChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "logicalSeriesRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "logicalSeriesRid"
        )]
        logical_series_rid: conjure_object::ResourceIdentifier,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createChunksParameters"
        )]
        create_chunks_parameters: super::super::super::super::objects::timeseries::seriescache::api::CreateChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::CreateChunksResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/batch-create-chunks",
        name = "batchCreateChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_create_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::seriescache::api::CreateChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::CreateChunksResponse,
        conjure_http::private::Error,
    >;
    /// Deletes the chunks that intersect the given time range. Does not delete the corresponding files from S3.
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/logical-series/{logicalSeriesRid}/delete-chunks",
        name = "deleteChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn delete_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "logicalSeriesRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "logicalSeriesRid"
        )]
        logical_series_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        request: super::super::super::super::objects::timeseries::seriescache::api::DeleteChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::DeleteChunksResponse,
        conjure_http::private::Error,
    >;
}
/// The Series Cache service manages internal chunks of data cached by Nominal's backend.
#[conjure_http::conjure_endpoints(
    name = "SeriesCacheService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncSeriesCacheService {
    /// Fetches "chunks" of series that are stored as Arrow files in S3.
    /// This endpoint is being deprecated for new series in favor of batchGetCachedSeries
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/logical-series/{logicalSeriesRid}/get-chunks",
        name = "getChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "logicalSeriesRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "logicalSeriesRid"
        )]
        logical_series_rid: conjure_object::ResourceIdentifier,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "getChunksParameters"
        )]
        get_chunks_parameters: super::super::super::super::objects::timeseries::seriescache::api::GetChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::GetChunksResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/logical-series/{logicalSeriesRid}/create-chunks",
        name = "createChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "logicalSeriesRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "logicalSeriesRid"
        )]
        logical_series_rid: conjure_object::ResourceIdentifier,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createChunksParameters"
        )]
        create_chunks_parameters: super::super::super::super::objects::timeseries::seriescache::api::CreateChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::CreateChunksResponse,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/batch-create-chunks",
        name = "batchCreateChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_create_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::seriescache::api::CreateChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::CreateChunksResponse,
        conjure_http::private::Error,
    >;
    /// Deletes the chunks that intersect the given time range. Does not delete the corresponding files from S3.
    #[endpoint(
        method = POST,
        path = "/timeseries/series-cache/v1/logical-series/{logicalSeriesRid}/delete-chunks",
        name = "deleteChunks",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn delete_chunks(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "logicalSeriesRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "logicalSeriesRid"
        )]
        logical_series_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        request: super::super::super::super::objects::timeseries::seriescache::api::DeleteChunksParameters,
    ) -> Result<
        super::super::super::super::objects::timeseries::seriescache::api::DeleteChunksResponse,
        conjure_http::private::Error,
    >;
}
