use conjure_http::endpoint;
/// Runs are collections of channels and metadata from one or more data sources, synchronized over a
/// range of real time, which represents a test event or simulation. These API endpoints let you
/// manage runs in the Nominal app.
#[conjure_http::conjure_client(name = "RunService")]
pub trait RunService<
    #[response_body]
    I: Iterator<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Create a new run in Nominal.
    ///
    /// Throws if start is equal to or after end.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run",
        name = "createRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn create_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        details: &super::super::super::objects::scout::run::api::CreateRunRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Updates an existing run based on its RID.
    ///
    /// Throws if start is equal to or after end.
    #[endpoint(
        method = PUT,
        path = "/scout/v1/run/{rid}",
        name = "updateRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn update_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        details: &super::super::super::objects::scout::run::api::UpdateRunRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Batch edits metadata across multiple runs. Supports rename/merge for labels and properties.
    /// If more than 1000 runs are targeted, this endpoint will throw a 400.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/metadata/batch-edit",
        name = "batchEditRunMetadata",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn batch_edit_run_metadata(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::BatchEditRunMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::BatchEditRunMetadataResponse,
        conjure_http::private::Error,
    >;
    /// Adds datasources to the run in question.
    ///
    /// Throws if any of the ref names conflict with existing data sources or each other.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/{runRid}/data-sources",
        name = "addDataSourcesToRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn add_data_sources_to_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "runRid", encoder = conjure_http::client::conjure::PlainEncoder)]
        run_rid: &super::super::super::objects::scout::run::api::RunRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &std::collections::BTreeMap<
            super::super::super::objects::scout::api::DataSourceRefName,
            super::super::super::objects::scout::run::api::CreateRunDataSource,
        >,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Updates a run if it exists, otherwise it's created from scratch.
    /// Will throw if the workspace of an existing run is different from the workspace of the request.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/create-or-update",
        name = "createOrUpdateRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn create_or_update_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        details: &super::super::super::objects::scout::run::api::CreateOrUpdateRunRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Fetches details about the run in question based on its RID.
    #[endpoint(
        method = GET,
        path = "/scout/v1/run/{rid}",
        name = "getRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Fetches details about the run in question based on its RID,
    /// including metrics for check and violation review status.
    #[endpoint(
        method = GET,
        path = "/scout/v1/run/{rid}/with-data-review-metrics",
        name = "getRunWithDataReviewMetrics",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_run_with_data_review_metrics(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
    ) -> Result<
        super::super::super::objects::scout::run::api::RunWithDataReviewMetrics,
        conjure_http::private::Error,
    >;
    /// Fetches details about the run in question based on its RID, including a summary of the data review status.
    #[endpoint(
        method = GET,
        path = "/scout/v1/run/{rid}/with-data-review-summary",
        name = "getRunWithDataReviewSummary",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_run_with_data_review_summary(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
    ) -> Result<
        super::super::super::objects::scout::run::api::RunWithDataReviewSummary,
        conjure_http::private::Error,
    >;
    /// Fetches a run based on the run number, rather than RID.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/by-id",
        name = "getRunById",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_run_by_id(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        get_run_by_id_request: &super::super::super::objects::scout::run::api::GetRunByIdRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Fetches a list of run details based on a list of RIDs.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/multiple",
        name = "getRuns",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn get_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        rids: &std::collections::BTreeSet<
            super::super::super::objects::scout::run::api::RunRid,
        >,
    ) -> Result<
        std::collections::BTreeMap<
            super::super::super::objects::scout::run::api::RunRid,
            super::super::super::objects::scout::run::api::Run,
        >,
        conjure_http::private::Error,
    >;
    /// Fetches the runs with the given asset.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/by-asset",
        name = "getRunsByAsset",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_runs_by_asset(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::GetRunsByAssetRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::GetRunsByAssetResponse,
        conjure_http::private::Error,
    >;
    /// Fetches the latest run for each requested asset.
    /// Assets without associated runs will not be included in response.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/by-assets/latest",
        name = "getLatestRunForAssets",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn get_latest_run_for_assets(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &std::collections::BTreeSet<
            super::super::super::objects::scout::rids::api::AssetRid,
        >,
    ) -> Result<
        std::collections::BTreeMap<
            super::super::super::objects::scout::rids::api::AssetRid,
            super::super::super::objects::scout::run::api::Run,
        >,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = GET,
        path = "/scout/v1/all-runs-properties-labels",
        name = "getAllRunsPropertiesAndLabels",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_all_runs_properties_and_labels(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        super::super::super::objects::scout::run::api::AllRunsPropertiesAndLabelsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for runs that match the given filters. Defaults to returning un-archived runs, absent an archive
    /// filter.
    #[endpoint(
        method = POST,
        path = "/scout/v1/search-runs",
        name = "searchRuns",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn search_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::SearchRunsRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::SearchRunsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for runs that match the given filters and
    /// includes metrics for check and violation review status. Defaults to returning un-archived runs, absent an
    /// archive filter.
    #[endpoint(
        method = POST,
        path = "/scout/v1/search-runs-with-data-review-metrics",
        name = "searchRunsWithDataReviewMetrics",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn search_runs_with_data_review_metrics(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::SearchRunsRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::SearchRunsWithDataReviewMetricsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for runs that match the given filters and includes a summary of the data review status. Defaults to
    /// returning un-archived runs, absent an archive filter.
    #[endpoint(
        method = POST,
        path = "/scout/v1/search-runs-with-data-review-summary",
        name = "searchRunsWithDataReviewSummary",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn search_runs_with_data_review_summary(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::SearchRunsRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::SearchRunsWithDataReviewSummaryResponse,
        conjure_http::private::Error,
    >;
    /// Soft-deletes a run. Runs still exist in the database but are no longer visible.
    #[endpoint(
        method = PUT,
        path = "/scout/v1/archive-run/{rid}",
        name = "archiveRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn archive_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[query(
            name = "includeLinkedWorkbooks",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_linked_workbooks: Option<bool>,
    ) -> Result<bool, conjure_http::private::Error>;
    #[endpoint(
        method = PUT,
        path = "/scout/v1/unarchive-run/{rid}",
        name = "unarchiveRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn unarchive_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[query(
            name = "includeLinkedWorkbooks",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_linked_workbooks: Option<bool>,
    ) -> Result<bool, conjure_http::private::Error>;
    #[endpoint(
        method = POST,
        path = "/scout/v1/archive-run",
        name = "archiveRuns",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn archive_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::ArchiveRunsRequest,
    ) -> Result<(), conjure_http::private::Error>;
    #[endpoint(
        method = POST,
        path = "/scout/v1/unarchive-run",
        name = "unarchiveRuns",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn unarchive_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::UnarchiveRunsRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Returns the list of ref names that are in use across specified and authorized workspaces.
    #[endpoint(
        method = GET,
        path = "/scout/v1/data-source-ref-names-and-types",
        name = "getDataSourceRefNameAndTypeList",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn get_data_source_ref_name_and_type_list(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        Vec<super::super::super::objects::scout::run::api::RefNameAndType>,
        conjure_http::private::Error,
    >;
    /// Updates the attachments associated with a run.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/{rid}/attachments",
        name = "updateRunAttachment",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn update_run_attachment(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::UpdateAttachmentsRequest,
    ) -> Result<(), conjure_http::private::Error>;
}
/// Runs are collections of channels and metadata from one or more data sources, synchronized over a
/// range of real time, which represents a test event or simulation. These API endpoints let you
/// manage runs in the Nominal app.
#[conjure_http::conjure_client(name = "RunService")]
pub trait AsyncRunService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Create a new run in Nominal.
    ///
    /// Throws if start is equal to or after end.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run",
        name = "createRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        details: &super::super::super::objects::scout::run::api::CreateRunRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Updates an existing run based on its RID.
    ///
    /// Throws if start is equal to or after end.
    #[endpoint(
        method = PUT,
        path = "/scout/v1/run/{rid}",
        name = "updateRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        details: &super::super::super::objects::scout::run::api::UpdateRunRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Batch edits metadata across multiple runs. Supports rename/merge for labels and properties.
    /// If more than 1000 runs are targeted, this endpoint will throw a 400.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/metadata/batch-edit",
        name = "batchEditRunMetadata",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn batch_edit_run_metadata(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::BatchEditRunMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::BatchEditRunMetadataResponse,
        conjure_http::private::Error,
    >;
    /// Adds datasources to the run in question.
    ///
    /// Throws if any of the ref names conflict with existing data sources or each other.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/{runRid}/data-sources",
        name = "addDataSourcesToRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn add_data_sources_to_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "runRid", encoder = conjure_http::client::conjure::PlainEncoder)]
        run_rid: &super::super::super::objects::scout::run::api::RunRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &std::collections::BTreeMap<
            super::super::super::objects::scout::api::DataSourceRefName,
            super::super::super::objects::scout::run::api::CreateRunDataSource,
        >,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Updates a run if it exists, otherwise it's created from scratch.
    /// Will throw if the workspace of an existing run is different from the workspace of the request.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/create-or-update",
        name = "createOrUpdateRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_or_update_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        details: &super::super::super::objects::scout::run::api::CreateOrUpdateRunRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Fetches details about the run in question based on its RID.
    #[endpoint(
        method = GET,
        path = "/scout/v1/run/{rid}",
        name = "getRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Fetches details about the run in question based on its RID,
    /// including metrics for check and violation review status.
    #[endpoint(
        method = GET,
        path = "/scout/v1/run/{rid}/with-data-review-metrics",
        name = "getRunWithDataReviewMetrics",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_run_with_data_review_metrics(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
    ) -> Result<
        super::super::super::objects::scout::run::api::RunWithDataReviewMetrics,
        conjure_http::private::Error,
    >;
    /// Fetches details about the run in question based on its RID, including a summary of the data review status.
    #[endpoint(
        method = GET,
        path = "/scout/v1/run/{rid}/with-data-review-summary",
        name = "getRunWithDataReviewSummary",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_run_with_data_review_summary(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
    ) -> Result<
        super::super::super::objects::scout::run::api::RunWithDataReviewSummary,
        conjure_http::private::Error,
    >;
    /// Fetches a run based on the run number, rather than RID.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/by-id",
        name = "getRunById",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_run_by_id(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        get_run_by_id_request: &super::super::super::objects::scout::run::api::GetRunByIdRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Fetches a list of run details based on a list of RIDs.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/multiple",
        name = "getRuns",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        rids: &std::collections::BTreeSet<
            super::super::super::objects::scout::run::api::RunRid,
        >,
    ) -> Result<
        std::collections::BTreeMap<
            super::super::super::objects::scout::run::api::RunRid,
            super::super::super::objects::scout::run::api::Run,
        >,
        conjure_http::private::Error,
    >;
    /// Fetches the runs with the given asset.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/by-asset",
        name = "getRunsByAsset",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_runs_by_asset(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::GetRunsByAssetRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::GetRunsByAssetResponse,
        conjure_http::private::Error,
    >;
    /// Fetches the latest run for each requested asset.
    /// Assets without associated runs will not be included in response.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/by-assets/latest",
        name = "getLatestRunForAssets",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_latest_run_for_assets(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &std::collections::BTreeSet<
            super::super::super::objects::scout::rids::api::AssetRid,
        >,
    ) -> Result<
        std::collections::BTreeMap<
            super::super::super::objects::scout::rids::api::AssetRid,
            super::super::super::objects::scout::run::api::Run,
        >,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = GET,
        path = "/scout/v1/all-runs-properties-labels",
        name = "getAllRunsPropertiesAndLabels",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_all_runs_properties_and_labels(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        super::super::super::objects::scout::run::api::AllRunsPropertiesAndLabelsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for runs that match the given filters. Defaults to returning un-archived runs, absent an archive
    /// filter.
    #[endpoint(
        method = POST,
        path = "/scout/v1/search-runs",
        name = "searchRuns",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::SearchRunsRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::SearchRunsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for runs that match the given filters and
    /// includes metrics for check and violation review status. Defaults to returning un-archived runs, absent an
    /// archive filter.
    #[endpoint(
        method = POST,
        path = "/scout/v1/search-runs-with-data-review-metrics",
        name = "searchRunsWithDataReviewMetrics",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_runs_with_data_review_metrics(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::SearchRunsRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::SearchRunsWithDataReviewMetricsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for runs that match the given filters and includes a summary of the data review status. Defaults to
    /// returning un-archived runs, absent an archive filter.
    #[endpoint(
        method = POST,
        path = "/scout/v1/search-runs-with-data-review-summary",
        name = "searchRunsWithDataReviewSummary",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_runs_with_data_review_summary(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::SearchRunsRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::SearchRunsWithDataReviewSummaryResponse,
        conjure_http::private::Error,
    >;
    /// Soft-deletes a run. Runs still exist in the database but are no longer visible.
    #[endpoint(
        method = PUT,
        path = "/scout/v1/archive-run/{rid}",
        name = "archiveRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn archive_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[query(
            name = "includeLinkedWorkbooks",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_linked_workbooks: Option<bool>,
    ) -> Result<bool, conjure_http::private::Error>;
    #[endpoint(
        method = PUT,
        path = "/scout/v1/unarchive-run/{rid}",
        name = "unarchiveRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn unarchive_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[query(
            name = "includeLinkedWorkbooks",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_linked_workbooks: Option<bool>,
    ) -> Result<bool, conjure_http::private::Error>;
    #[endpoint(
        method = POST,
        path = "/scout/v1/archive-run",
        name = "archiveRuns",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn archive_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::ArchiveRunsRequest,
    ) -> Result<(), conjure_http::private::Error>;
    #[endpoint(
        method = POST,
        path = "/scout/v1/unarchive-run",
        name = "unarchiveRuns",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn unarchive_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::UnarchiveRunsRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Returns the list of ref names that are in use across specified and authorized workspaces.
    #[endpoint(
        method = GET,
        path = "/scout/v1/data-source-ref-names-and-types",
        name = "getDataSourceRefNameAndTypeList",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_data_source_ref_name_and_type_list(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        Vec<super::super::super::objects::scout::run::api::RefNameAndType>,
        conjure_http::private::Error,
    >;
    /// Updates the attachments associated with a run.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/{rid}/attachments",
        name = "updateRunAttachment",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn update_run_attachment(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::UpdateAttachmentsRequest,
    ) -> Result<(), conjure_http::private::Error>;
}
/// Runs are collections of channels and metadata from one or more data sources, synchronized over a
/// range of real time, which represents a test event or simulation. These API endpoints let you
/// manage runs in the Nominal app.
#[conjure_http::conjure_client(name = "RunService", local)]
pub trait LocalAsyncRunService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Create a new run in Nominal.
    ///
    /// Throws if start is equal to or after end.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run",
        name = "createRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        details: &super::super::super::objects::scout::run::api::CreateRunRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Updates an existing run based on its RID.
    ///
    /// Throws if start is equal to or after end.
    #[endpoint(
        method = PUT,
        path = "/scout/v1/run/{rid}",
        name = "updateRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        details: &super::super::super::objects::scout::run::api::UpdateRunRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Batch edits metadata across multiple runs. Supports rename/merge for labels and properties.
    /// If more than 1000 runs are targeted, this endpoint will throw a 400.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/metadata/batch-edit",
        name = "batchEditRunMetadata",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn batch_edit_run_metadata(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::BatchEditRunMetadataRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::BatchEditRunMetadataResponse,
        conjure_http::private::Error,
    >;
    /// Adds datasources to the run in question.
    ///
    /// Throws if any of the ref names conflict with existing data sources or each other.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/{runRid}/data-sources",
        name = "addDataSourcesToRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn add_data_sources_to_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "runRid", encoder = conjure_http::client::conjure::PlainEncoder)]
        run_rid: &super::super::super::objects::scout::run::api::RunRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &std::collections::BTreeMap<
            super::super::super::objects::scout::api::DataSourceRefName,
            super::super::super::objects::scout::run::api::CreateRunDataSource,
        >,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Updates a run if it exists, otherwise it's created from scratch.
    /// Will throw if the workspace of an existing run is different from the workspace of the request.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/create-or-update",
        name = "createOrUpdateRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_or_update_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        details: &super::super::super::objects::scout::run::api::CreateOrUpdateRunRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Fetches details about the run in question based on its RID.
    #[endpoint(
        method = GET,
        path = "/scout/v1/run/{rid}",
        name = "getRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Fetches details about the run in question based on its RID,
    /// including metrics for check and violation review status.
    #[endpoint(
        method = GET,
        path = "/scout/v1/run/{rid}/with-data-review-metrics",
        name = "getRunWithDataReviewMetrics",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_run_with_data_review_metrics(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
    ) -> Result<
        super::super::super::objects::scout::run::api::RunWithDataReviewMetrics,
        conjure_http::private::Error,
    >;
    /// Fetches details about the run in question based on its RID, including a summary of the data review status.
    #[endpoint(
        method = GET,
        path = "/scout/v1/run/{rid}/with-data-review-summary",
        name = "getRunWithDataReviewSummary",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_run_with_data_review_summary(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
    ) -> Result<
        super::super::super::objects::scout::run::api::RunWithDataReviewSummary,
        conjure_http::private::Error,
    >;
    /// Fetches a run based on the run number, rather than RID.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/by-id",
        name = "getRunById",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_run_by_id(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        get_run_by_id_request: &super::super::super::objects::scout::run::api::GetRunByIdRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::Run,
        conjure_http::private::Error,
    >;
    /// Fetches a list of run details based on a list of RIDs.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/multiple",
        name = "getRuns",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        rids: &std::collections::BTreeSet<
            super::super::super::objects::scout::run::api::RunRid,
        >,
    ) -> Result<
        std::collections::BTreeMap<
            super::super::super::objects::scout::run::api::RunRid,
            super::super::super::objects::scout::run::api::Run,
        >,
        conjure_http::private::Error,
    >;
    /// Fetches the runs with the given asset.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/by-asset",
        name = "getRunsByAsset",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_runs_by_asset(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::GetRunsByAssetRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::GetRunsByAssetResponse,
        conjure_http::private::Error,
    >;
    /// Fetches the latest run for each requested asset.
    /// Assets without associated runs will not be included in response.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/by-assets/latest",
        name = "getLatestRunForAssets",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_latest_run_for_assets(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &std::collections::BTreeSet<
            super::super::super::objects::scout::rids::api::AssetRid,
        >,
    ) -> Result<
        std::collections::BTreeMap<
            super::super::super::objects::scout::rids::api::AssetRid,
            super::super::super::objects::scout::run::api::Run,
        >,
        conjure_http::private::Error,
    >;
    #[endpoint(
        method = GET,
        path = "/scout/v1/all-runs-properties-labels",
        name = "getAllRunsPropertiesAndLabels",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_all_runs_properties_and_labels(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        super::super::super::objects::scout::run::api::AllRunsPropertiesAndLabelsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for runs that match the given filters. Defaults to returning un-archived runs, absent an archive
    /// filter.
    #[endpoint(
        method = POST,
        path = "/scout/v1/search-runs",
        name = "searchRuns",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::SearchRunsRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::SearchRunsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for runs that match the given filters and
    /// includes metrics for check and violation review status. Defaults to returning un-archived runs, absent an
    /// archive filter.
    #[endpoint(
        method = POST,
        path = "/scout/v1/search-runs-with-data-review-metrics",
        name = "searchRunsWithDataReviewMetrics",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_runs_with_data_review_metrics(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::SearchRunsRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::SearchRunsWithDataReviewMetricsResponse,
        conjure_http::private::Error,
    >;
    /// Searches for runs that match the given filters and includes a summary of the data review status. Defaults to
    /// returning un-archived runs, absent an archive filter.
    #[endpoint(
        method = POST,
        path = "/scout/v1/search-runs-with-data-review-summary",
        name = "searchRunsWithDataReviewSummary",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_runs_with_data_review_summary(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::SearchRunsRequest,
    ) -> Result<
        super::super::super::objects::scout::run::api::SearchRunsWithDataReviewSummaryResponse,
        conjure_http::private::Error,
    >;
    /// Soft-deletes a run. Runs still exist in the database but are no longer visible.
    #[endpoint(
        method = PUT,
        path = "/scout/v1/archive-run/{rid}",
        name = "archiveRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn archive_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[query(
            name = "includeLinkedWorkbooks",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_linked_workbooks: Option<bool>,
    ) -> Result<bool, conjure_http::private::Error>;
    #[endpoint(
        method = PUT,
        path = "/scout/v1/unarchive-run/{rid}",
        name = "unarchiveRun",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn unarchive_run(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[query(
            name = "includeLinkedWorkbooks",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_linked_workbooks: Option<bool>,
    ) -> Result<bool, conjure_http::private::Error>;
    #[endpoint(
        method = POST,
        path = "/scout/v1/archive-run",
        name = "archiveRuns",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn archive_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::ArchiveRunsRequest,
    ) -> Result<(), conjure_http::private::Error>;
    #[endpoint(
        method = POST,
        path = "/scout/v1/unarchive-run",
        name = "unarchiveRuns",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn unarchive_runs(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::UnarchiveRunsRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Returns the list of ref names that are in use across specified and authorized workspaces.
    #[endpoint(
        method = GET,
        path = "/scout/v1/data-source-ref-names-and-types",
        name = "getDataSourceRefNameAndTypeList",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_data_source_ref_name_and_type_list(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        Vec<super::super::super::objects::scout::run::api::RefNameAndType>,
        conjure_http::private::Error,
    >;
    /// Updates the attachments associated with a run.
    #[endpoint(
        method = POST,
        path = "/scout/v1/run/{rid}/attachments",
        name = "updateRunAttachment",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn update_run_attachment(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::objects::scout::run::api::RunRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::scout::run::api::UpdateAttachmentsRequest,
    ) -> Result<(), conjure_http::private::Error>;
}
