use conjure_http::endpoint;
/// [INTERNAL]
/// Series metadata represents the constant information about data in a series - specifically, the name, units, a
/// description, and the tags. Series metadata can be used to query points from specific series depending on the tag
/// value selections.
#[conjure_http::conjure_endpoints(
    name = "SeriesMetadataService",
    use_legacy_error_serialization
)]
pub trait SeriesMetadataService {
    /// Batch get series metadata by DataSourceRid.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/batch-get",
        name = "batchGet",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn batch_get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchGetSeriesMetadataRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::BatchGetSeriesMetadataResponse,
        conjure_http::private::Error,
    >;
    /// Create new series metadata.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype",
        name = "create"
    )]
    fn create(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::CreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Idempotently creates series metadata.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/batch-create",
        name = "batchCreate"
    )]
    fn batch_create(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchCreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Upserts series metadata. Creates new series metadata if it does not exist for the given channel and data
    /// source. If it already exists, updates the locator and any provided unit and description fields while
    /// preserving existing values for fields not supplied.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/create-or-update",
        name = "createOrUpdate"
    )]
    fn create_or_update(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::CreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Batch version of createOrUpdate.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/batch-create-or-update",
        name = "batchCreateOrUpdate"
    )]
    fn batch_create_or_update(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchCreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Get series metadata from its series metadata rid.
    #[endpoint(
        method = GET,
        path = "/timeseries/archetype/v1/series-archetype/{rid}",
        name = "get",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(name = "rid", decoder = conjure_http::server::conjure::FromPlainDecoder)]
        rid: conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::SeriesMetadata,
        conjure_http::private::Error,
    >;
    /// Update existing series metadata.
    /// Throws SeriesMetadataNotFound if the series metadata does not exist.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/{rid}/metadata",
        name = "updateMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(name = "rid", decoder = conjure_http::server::conjure::FromPlainDecoder)]
        rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::UpdateSeriesMetadataRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::SeriesMetadata,
        conjure_http::private::Error,
    >;
    /// This endpoint lets an authorized workspace caller change how one nominal dataset channel is interpreted.
    /// This updates metadata and future series resolution. It does not rewrite historical point rows.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/change-data-type",
        name = "changeDataType",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn change_data_type(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::ChangeDataTypeRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::ChangeDataTypeResponse,
        conjure_http::private::Error,
    >;
    /// Batch creates series metadata for video channels if they don't exist.
    /// Idempotent - returns existing SeriesMetadataRid if already exists.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/video-channel",
        name = "batchCreateVideoSeries",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn batch_create_video_series(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchCreateVideoSeriesRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::BatchCreateVideoSeriesResponse,
        conjure_http::private::Error,
    >;
}
/// [INTERNAL]
/// Series metadata represents the constant information about data in a series - specifically, the name, units, a
/// description, and the tags. Series metadata can be used to query points from specific series depending on the tag
/// value selections.
#[conjure_http::conjure_endpoints(
    name = "SeriesMetadataService",
    use_legacy_error_serialization
)]
pub trait AsyncSeriesMetadataService {
    /// Batch get series metadata by DataSourceRid.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/batch-get",
        name = "batchGet",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchGetSeriesMetadataRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::BatchGetSeriesMetadataResponse,
        conjure_http::private::Error,
    >;
    /// Create new series metadata.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype",
        name = "create"
    )]
    async fn create(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::CreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Idempotently creates series metadata.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/batch-create",
        name = "batchCreate"
    )]
    async fn batch_create(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchCreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Upserts series metadata. Creates new series metadata if it does not exist for the given channel and data
    /// source. If it already exists, updates the locator and any provided unit and description fields while
    /// preserving existing values for fields not supplied.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/create-or-update",
        name = "createOrUpdate"
    )]
    async fn create_or_update(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::CreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Batch version of createOrUpdate.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/batch-create-or-update",
        name = "batchCreateOrUpdate"
    )]
    async fn batch_create_or_update(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchCreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Get series metadata from its series metadata rid.
    #[endpoint(
        method = GET,
        path = "/timeseries/archetype/v1/series-archetype/{rid}",
        name = "get",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(name = "rid", decoder = conjure_http::server::conjure::FromPlainDecoder)]
        rid: conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::SeriesMetadata,
        conjure_http::private::Error,
    >;
    /// Update existing series metadata.
    /// Throws SeriesMetadataNotFound if the series metadata does not exist.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/{rid}/metadata",
        name = "updateMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(name = "rid", decoder = conjure_http::server::conjure::FromPlainDecoder)]
        rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::UpdateSeriesMetadataRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::SeriesMetadata,
        conjure_http::private::Error,
    >;
    /// This endpoint lets an authorized workspace caller change how one nominal dataset channel is interpreted.
    /// This updates metadata and future series resolution. It does not rewrite historical point rows.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/change-data-type",
        name = "changeDataType",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn change_data_type(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::ChangeDataTypeRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::ChangeDataTypeResponse,
        conjure_http::private::Error,
    >;
    /// Batch creates series metadata for video channels if they don't exist.
    /// Idempotent - returns existing SeriesMetadataRid if already exists.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/video-channel",
        name = "batchCreateVideoSeries",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_create_video_series(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchCreateVideoSeriesRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::BatchCreateVideoSeriesResponse,
        conjure_http::private::Error,
    >;
}
/// [INTERNAL]
/// Series metadata represents the constant information about data in a series - specifically, the name, units, a
/// description, and the tags. Series metadata can be used to query points from specific series depending on the tag
/// value selections.
#[conjure_http::conjure_endpoints(
    name = "SeriesMetadataService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncSeriesMetadataService {
    /// Batch get series metadata by DataSourceRid.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/batch-get",
        name = "batchGet",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchGetSeriesMetadataRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::BatchGetSeriesMetadataResponse,
        conjure_http::private::Error,
    >;
    /// Create new series metadata.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype",
        name = "create"
    )]
    async fn create(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::CreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Idempotently creates series metadata.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/batch-create",
        name = "batchCreate"
    )]
    async fn batch_create(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchCreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Upserts series metadata. Creates new series metadata if it does not exist for the given channel and data
    /// source. If it already exists, updates the locator and any provided unit and description fields while
    /// preserving existing values for fields not supplied.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/create-or-update",
        name = "createOrUpdate"
    )]
    async fn create_or_update(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::CreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Batch version of createOrUpdate.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/batch-create-or-update",
        name = "batchCreateOrUpdate"
    )]
    async fn batch_create_or_update(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchCreateSeriesMetadataRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Get series metadata from its series metadata rid.
    #[endpoint(
        method = GET,
        path = "/timeseries/archetype/v1/series-archetype/{rid}",
        name = "get",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(name = "rid", decoder = conjure_http::server::conjure::FromPlainDecoder)]
        rid: conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::SeriesMetadata,
        conjure_http::private::Error,
    >;
    /// Update existing series metadata.
    /// Throws SeriesMetadataNotFound if the series metadata does not exist.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/{rid}/metadata",
        name = "updateMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(name = "rid", decoder = conjure_http::server::conjure::FromPlainDecoder)]
        rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::UpdateSeriesMetadataRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::SeriesMetadata,
        conjure_http::private::Error,
    >;
    /// This endpoint lets an authorized workspace caller change how one nominal dataset channel is interpreted.
    /// This updates metadata and future series resolution. It does not rewrite historical point rows.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/change-data-type",
        name = "changeDataType",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn change_data_type(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::ChangeDataTypeRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::ChangeDataTypeResponse,
        conjure_http::private::Error,
    >;
    /// Batch creates series metadata for video channels if they don't exist.
    /// Idempotent - returns existing SeriesMetadataRid if already exists.
    #[endpoint(
        method = POST,
        path = "/timeseries/archetype/v1/series-archetype/video-channel",
        name = "batchCreateVideoSeries",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_create_video_series(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::timeseries::metadata::api::BatchCreateVideoSeriesRequest,
    ) -> Result<
        super::super::super::super::objects::timeseries::metadata::api::BatchCreateVideoSeriesResponse,
        conjure_http::private::Error,
    >;
}
