use conjure_http::endpoint;
/// Internal API for managing ingest jobs. This service is filtered out from public documentation.
#[conjure_http::conjure_endpoints(
    name = "InternalIngestJobService",
    use_legacy_error_serialization
)]
pub trait InternalIngestJobService {
    /// Creates an ingest job, returning a RID for the job.
    #[endpoint(
        method = POST,
        path = "/internal/ingest/v1/ingest-job",
        name = "createIngestJob",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn create_ingest_job(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createIngestJobRequest"
        )]
        create_ingest_job_request: super::super::super::super::objects::ingest::api::CreateIngestJobRequest,
    ) -> Result<conjure_object::ResourceIdentifier, conjure_http::private::Error>;
    /// Returns a single ingest job by RID with full details including the ingest request.
    #[endpoint(
        method = GET,
        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}",
        name = "getIngestJobInternal",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_ingest_job_internal(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "ingestJobRid"
        )]
        ingest_job_rid: conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::InternalIngestJob,
        conjure_http::private::Error,
    >;
    /// Updates the status of an ingest job.
    #[endpoint(
        method = PUT,
        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}/status",
        name = "updateIngestJobStatus",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update_ingest_job_status(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "ingestJobRid"
        )]
        ingest_job_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        status: super::super::super::super::objects::ingest::api::IngestJobStatus,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestJobStatus,
        conjure_http::private::Error,
    >;
}
/// Internal API for managing ingest jobs. This service is filtered out from public documentation.
#[conjure_http::conjure_endpoints(
    name = "InternalIngestJobService",
    use_legacy_error_serialization
)]
pub trait AsyncInternalIngestJobService {
    /// Creates an ingest job, returning a RID for the job.
    #[endpoint(
        method = POST,
        path = "/internal/ingest/v1/ingest-job",
        name = "createIngestJob",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_ingest_job(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createIngestJobRequest"
        )]
        create_ingest_job_request: super::super::super::super::objects::ingest::api::CreateIngestJobRequest,
    ) -> Result<conjure_object::ResourceIdentifier, conjure_http::private::Error>;
    /// Returns a single ingest job by RID with full details including the ingest request.
    #[endpoint(
        method = GET,
        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}",
        name = "getIngestJobInternal",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_ingest_job_internal(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "ingestJobRid"
        )]
        ingest_job_rid: conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::InternalIngestJob,
        conjure_http::private::Error,
    >;
    /// Updates the status of an ingest job.
    #[endpoint(
        method = PUT,
        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}/status",
        name = "updateIngestJobStatus",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_ingest_job_status(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "ingestJobRid"
        )]
        ingest_job_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        status: super::super::super::super::objects::ingest::api::IngestJobStatus,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestJobStatus,
        conjure_http::private::Error,
    >;
}
/// Internal API for managing ingest jobs. This service is filtered out from public documentation.
#[conjure_http::conjure_endpoints(
    name = "InternalIngestJobService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncInternalIngestJobService {
    /// Creates an ingest job, returning a RID for the job.
    #[endpoint(
        method = POST,
        path = "/internal/ingest/v1/ingest-job",
        name = "createIngestJob",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_ingest_job(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createIngestJobRequest"
        )]
        create_ingest_job_request: super::super::super::super::objects::ingest::api::CreateIngestJobRequest,
    ) -> Result<conjure_object::ResourceIdentifier, conjure_http::private::Error>;
    /// Returns a single ingest job by RID with full details including the ingest request.
    #[endpoint(
        method = GET,
        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}",
        name = "getIngestJobInternal",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_ingest_job_internal(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "ingestJobRid"
        )]
        ingest_job_rid: conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::InternalIngestJob,
        conjure_http::private::Error,
    >;
    /// Updates the status of an ingest job.
    #[endpoint(
        method = PUT,
        path = "/internal/ingest/v1/ingest-job/{ingestJobRid}/status",
        name = "updateIngestJobStatus",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_ingest_job_status(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "ingestJobRid"
        )]
        ingest_job_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        status: super::super::super::super::objects::ingest::api::IngestJobStatus,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestJobStatus,
        conjure_http::private::Error,
    >;
}
