use conjure_http::endpoint;
/// Public API for querying ingest jobs.
#[conjure_http::conjure_client(name = "IngestJobService")]
pub trait IngestJobService<
    #[response_body]
    I: Iterator<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Returns a single ingest job by RID. Does not include the full ingest request details.
    #[endpoint(
        method = GET,
        path = "/ingest/v1/ingest-job/{ingestJobRid}",
        name = "getIngestJob",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_ingest_job(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        ingest_job_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestJob,
        conjure_http::private::Error,
    >;
    /// Returns a single ingest transform by RID. The caller must be authorized to read the dataset
    /// produced by the transform's parent ingest job; a transform whose parent job is not visible to
    /// the caller is reported as IngestTransformNotFound rather than leaking its existence.
    #[endpoint(
        method = GET,
        path = "/ingest/v1/ingest-transform/{ingestTransformRid}",
        name = "getIngestTransform",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_ingest_transform(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "ingestTransformRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        ingest_transform_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestTransform,
        conjure_http::private::Error,
    >;
    /// Returns a paginated list of the transforms belonging to a single ingest job, oldest-first and
    /// optionally filtered by status. The caller must be authorized to read the parent job's dataset;
    /// a job that is not visible to the caller is reported as IngestJobNotFound.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-transforms/search",
        name = "searchIngestTransforms",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn search_ingest_transforms(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::super::objects::ingest::api::SearchIngestTransformsRequest,
    ) -> Result<
        super::super::super::super::objects::ingest::api::SearchIngestTransformsResponse,
        conjure_http::private::Error,
    >;
    /// Returns a paginated list of ingest jobs, optionally filtered by dataset.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-jobs/search",
        name = "searchIngestJobs",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn search_ingest_jobs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::super::objects::ingest::api::SearchIngestJobsRequest,
    ) -> Result<
        super::super::super::super::objects::ingest::api::SearchIngestJobsResponse,
        conjure_http::private::Error,
    >;
    /// Cancels an ingest job. Jobs that have not yet started running (SUBMITTED, QUEUED) are
    /// transitioned directly to CANCELLED. Jobs that are IN_PROGRESS have their underlying
    /// Temporal workflow cancelled; the workflow is responsible for transitioning the job to
    /// CANCELLED and tearing down in-flight work. Cancelling a job that is already in a terminal
    /// state (COMPLETED, FAILED, CANCELLED) throws IngestJobNotCancellable.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-job/{ingestJobRid}/cancel",
        name = "cancelIngestJob",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn cancel_ingest_job(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        ingest_job_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestJob,
        conjure_http::private::Error,
    >;
    /// Cancels multiple ingest jobs in a single call. Each job is processed independently and
    /// best-effort: a job that cannot be cancelled (already terminal, missing, or not authorized for
    /// the caller) yields a `failed` result rather than aborting the batch. Per-job cancellation
    /// semantics match cancelIngestJob. At most 100 jobs may be requested per call.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-jobs/cancel",
        name = "batchCancelIngestJobs",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn batch_cancel_ingest_jobs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::super::objects::ingest::api::BatchCancelIngestJobsRequest,
    ) -> Result<
        super::super::super::super::objects::ingest::api::BatchCancelIngestJobsResponse,
        conjure_http::private::Error,
    >;
}
/// Public API for querying ingest jobs.
#[conjure_http::conjure_client(name = "IngestJobService")]
pub trait AsyncIngestJobService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Returns a single ingest job by RID. Does not include the full ingest request details.
    #[endpoint(
        method = GET,
        path = "/ingest/v1/ingest-job/{ingestJobRid}",
        name = "getIngestJob",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_ingest_job(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        ingest_job_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestJob,
        conjure_http::private::Error,
    >;
    /// Returns a single ingest transform by RID. The caller must be authorized to read the dataset
    /// produced by the transform's parent ingest job; a transform whose parent job is not visible to
    /// the caller is reported as IngestTransformNotFound rather than leaking its existence.
    #[endpoint(
        method = GET,
        path = "/ingest/v1/ingest-transform/{ingestTransformRid}",
        name = "getIngestTransform",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_ingest_transform(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "ingestTransformRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        ingest_transform_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestTransform,
        conjure_http::private::Error,
    >;
    /// Returns a paginated list of the transforms belonging to a single ingest job, oldest-first and
    /// optionally filtered by status. The caller must be authorized to read the parent job's dataset;
    /// a job that is not visible to the caller is reported as IngestJobNotFound.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-transforms/search",
        name = "searchIngestTransforms",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_ingest_transforms(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::super::objects::ingest::api::SearchIngestTransformsRequest,
    ) -> Result<
        super::super::super::super::objects::ingest::api::SearchIngestTransformsResponse,
        conjure_http::private::Error,
    >;
    /// Returns a paginated list of ingest jobs, optionally filtered by dataset.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-jobs/search",
        name = "searchIngestJobs",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_ingest_jobs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::super::objects::ingest::api::SearchIngestJobsRequest,
    ) -> Result<
        super::super::super::super::objects::ingest::api::SearchIngestJobsResponse,
        conjure_http::private::Error,
    >;
    /// Cancels an ingest job. Jobs that have not yet started running (SUBMITTED, QUEUED) are
    /// transitioned directly to CANCELLED. Jobs that are IN_PROGRESS have their underlying
    /// Temporal workflow cancelled; the workflow is responsible for transitioning the job to
    /// CANCELLED and tearing down in-flight work. Cancelling a job that is already in a terminal
    /// state (COMPLETED, FAILED, CANCELLED) throws IngestJobNotCancellable.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-job/{ingestJobRid}/cancel",
        name = "cancelIngestJob",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn cancel_ingest_job(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        ingest_job_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestJob,
        conjure_http::private::Error,
    >;
    /// Cancels multiple ingest jobs in a single call. Each job is processed independently and
    /// best-effort: a job that cannot be cancelled (already terminal, missing, or not authorized for
    /// the caller) yields a `failed` result rather than aborting the batch. Per-job cancellation
    /// semantics match cancelIngestJob. At most 100 jobs may be requested per call.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-jobs/cancel",
        name = "batchCancelIngestJobs",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn batch_cancel_ingest_jobs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::super::objects::ingest::api::BatchCancelIngestJobsRequest,
    ) -> Result<
        super::super::super::super::objects::ingest::api::BatchCancelIngestJobsResponse,
        conjure_http::private::Error,
    >;
}
/// Public API for querying ingest jobs.
#[conjure_http::conjure_client(name = "IngestJobService", local)]
pub trait LocalAsyncIngestJobService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Returns a single ingest job by RID. Does not include the full ingest request details.
    #[endpoint(
        method = GET,
        path = "/ingest/v1/ingest-job/{ingestJobRid}",
        name = "getIngestJob",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_ingest_job(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        ingest_job_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestJob,
        conjure_http::private::Error,
    >;
    /// Returns a single ingest transform by RID. The caller must be authorized to read the dataset
    /// produced by the transform's parent ingest job; a transform whose parent job is not visible to
    /// the caller is reported as IngestTransformNotFound rather than leaking its existence.
    #[endpoint(
        method = GET,
        path = "/ingest/v1/ingest-transform/{ingestTransformRid}",
        name = "getIngestTransform",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_ingest_transform(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "ingestTransformRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        ingest_transform_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestTransform,
        conjure_http::private::Error,
    >;
    /// Returns a paginated list of the transforms belonging to a single ingest job, oldest-first and
    /// optionally filtered by status. The caller must be authorized to read the parent job's dataset;
    /// a job that is not visible to the caller is reported as IngestJobNotFound.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-transforms/search",
        name = "searchIngestTransforms",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_ingest_transforms(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::super::objects::ingest::api::SearchIngestTransformsRequest,
    ) -> Result<
        super::super::super::super::objects::ingest::api::SearchIngestTransformsResponse,
        conjure_http::private::Error,
    >;
    /// Returns a paginated list of ingest jobs, optionally filtered by dataset.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-jobs/search",
        name = "searchIngestJobs",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_ingest_jobs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::super::objects::ingest::api::SearchIngestJobsRequest,
    ) -> Result<
        super::super::super::super::objects::ingest::api::SearchIngestJobsResponse,
        conjure_http::private::Error,
    >;
    /// Cancels an ingest job. Jobs that have not yet started running (SUBMITTED, QUEUED) are
    /// transitioned directly to CANCELLED. Jobs that are IN_PROGRESS have their underlying
    /// Temporal workflow cancelled; the workflow is responsible for transitioning the job to
    /// CANCELLED and tearing down in-flight work. Cancelling a job that is already in a terminal
    /// state (COMPLETED, FAILED, CANCELLED) throws IngestJobNotCancellable.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-job/{ingestJobRid}/cancel",
        name = "cancelIngestJob",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn cancel_ingest_job(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "ingestJobRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        ingest_job_rid: &conjure_object::ResourceIdentifier,
    ) -> Result<
        super::super::super::super::objects::ingest::api::IngestJob,
        conjure_http::private::Error,
    >;
    /// Cancels multiple ingest jobs in a single call. Each job is processed independently and
    /// best-effort: a job that cannot be cancelled (already terminal, missing, or not authorized for
    /// the caller) yields a `failed` result rather than aborting the batch. Per-job cancellation
    /// semantics match cancelIngestJob. At most 100 jobs may be requested per call.
    #[endpoint(
        method = POST,
        path = "/ingest/v1/ingest-jobs/cancel",
        name = "batchCancelIngestJobs",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn batch_cancel_ingest_jobs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::super::objects::ingest::api::BatchCancelIngestJobsRequest,
    ) -> Result<
        super::super::super::super::objects::ingest::api::BatchCancelIngestJobsResponse,
        conjure_http::private::Error,
    >;
}
