use conjure_http::endpoint;
/// The Compute Service provides the ability to compute the output of compute graphs.
#[conjure_http::conjure_endpoints(
    name = "ComputeService",
    use_legacy_error_serialization
)]
pub trait ComputeService {
    /// Computes the output of the compute graph specified by a ComputeNodeRequest.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute",
        name = "compute",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn compute(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ComputeNodeRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ComputeNodeResponse,
        conjure_http::private::Error,
    >;
    /// Computes the output of the compute graph specified by a ParameterizedComputeNodeRequest. A parameterized
    /// compute request supports multiple values for a single variable, supplied by the ParameterizedContext.
    /// Results are returned in the same order of the request.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/parameterized",
        name = "parameterizedCompute",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn parameterized_compute(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ParameterizedComputeNodeRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ParameterizedComputeNodeResponse,
        conjure_http::private::Error,
    >;
    /// Returns the resulting unit for the output of a compute graph. If the resulting unit is equivalent to exactly
    /// one existing unit in the system, it will be returned (for example, a series in Coulombs divided by a series
    /// in Volts will return an output of Farads). If the output does not have units (for example, a range output,)
    /// the unit result will return noUnitAvailable, and if the computation was not successful, corresponding errors
    /// are returned.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/units",
        name = "computeUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn compute_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ComputeUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ComputeUnitResult,
        conjure_http::private::Error,
    >;
    /// Computes the output of compute graphs specified by BatchComputeNodeRequest. Results are returned in the same
    /// order as the request.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/batch",
        name = "batchComputeWithUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn batch_compute_with_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::BatchComputeWithUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::BatchComputeWithUnitsResponse,
        conjure_http::private::Error,
    >;
    /// Same as computeUnits, however this endpoint functions on a batch of requests for wire efficiency purposes. An
    /// extra note is that this method will serialize underlying conjure errors into the BatchComputeUnitResult type,
    /// meaning callers are required to check for errors explicitly (rather than relying on exceptions being thrown).
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/batch-units",
        name = "batchComputeUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn batch_compute_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::BatchComputeUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::BatchComputeUnitResult,
        conjure_http::private::Error,
    >;
    /// Computes the output of the compute graph specified by a ComputeNodeRequest, as well as providing the resulting
    /// unit for the output of a compute graph. If the resulting unit is equivalent to exactly one existing unit in the
    /// system, it will be returned (for example, a series in Coulombs divided by a series in Volts will return an
    /// output of Farads). If the output does not have units (for example, a range output,) the unit result will return
    /// noUnitAvailable, and if the computation was not successful, corresponding errors are returned.
    #[endpoint(
        method = POST,
        path = "/compute/v2/computeWithUnits",
        name = "computeWithUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn compute_with_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ComputeWithUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ComputeWithUnitsResponse,
        conjure_http::private::Error,
    >;
    /// Best-effort cancellation of active compute requests. Each ID should be the request ID that
    /// the client originally passed when starting the request. A single request may correspond to
    /// one or more underlying operations, all of which will be cancelled.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/batch/kill",
        name = "batchKillRequests"
    )]
    fn batch_kill_requests(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::BatchKillRequestsRequest,
    ) -> Result<(), conjure_http::private::Error>;
}
/// The Compute Service provides the ability to compute the output of compute graphs.
#[conjure_http::conjure_endpoints(
    name = "ComputeService",
    use_legacy_error_serialization
)]
pub trait AsyncComputeService {
    /// Computes the output of the compute graph specified by a ComputeNodeRequest.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute",
        name = "compute",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn compute(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ComputeNodeRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ComputeNodeResponse,
        conjure_http::private::Error,
    >;
    /// Computes the output of the compute graph specified by a ParameterizedComputeNodeRequest. A parameterized
    /// compute request supports multiple values for a single variable, supplied by the ParameterizedContext.
    /// Results are returned in the same order of the request.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/parameterized",
        name = "parameterizedCompute",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn parameterized_compute(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ParameterizedComputeNodeRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ParameterizedComputeNodeResponse,
        conjure_http::private::Error,
    >;
    /// Returns the resulting unit for the output of a compute graph. If the resulting unit is equivalent to exactly
    /// one existing unit in the system, it will be returned (for example, a series in Coulombs divided by a series
    /// in Volts will return an output of Farads). If the output does not have units (for example, a range output,)
    /// the unit result will return noUnitAvailable, and if the computation was not successful, corresponding errors
    /// are returned.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/units",
        name = "computeUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn compute_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ComputeUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ComputeUnitResult,
        conjure_http::private::Error,
    >;
    /// Computes the output of compute graphs specified by BatchComputeNodeRequest. Results are returned in the same
    /// order as the request.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/batch",
        name = "batchComputeWithUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_compute_with_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::BatchComputeWithUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::BatchComputeWithUnitsResponse,
        conjure_http::private::Error,
    >;
    /// Same as computeUnits, however this endpoint functions on a batch of requests for wire efficiency purposes. An
    /// extra note is that this method will serialize underlying conjure errors into the BatchComputeUnitResult type,
    /// meaning callers are required to check for errors explicitly (rather than relying on exceptions being thrown).
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/batch-units",
        name = "batchComputeUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_compute_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::BatchComputeUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::BatchComputeUnitResult,
        conjure_http::private::Error,
    >;
    /// Computes the output of the compute graph specified by a ComputeNodeRequest, as well as providing the resulting
    /// unit for the output of a compute graph. If the resulting unit is equivalent to exactly one existing unit in the
    /// system, it will be returned (for example, a series in Coulombs divided by a series in Volts will return an
    /// output of Farads). If the output does not have units (for example, a range output,) the unit result will return
    /// noUnitAvailable, and if the computation was not successful, corresponding errors are returned.
    #[endpoint(
        method = POST,
        path = "/compute/v2/computeWithUnits",
        name = "computeWithUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn compute_with_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ComputeWithUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ComputeWithUnitsResponse,
        conjure_http::private::Error,
    >;
    /// Best-effort cancellation of active compute requests. Each ID should be the request ID that
    /// the client originally passed when starting the request. A single request may correspond to
    /// one or more underlying operations, all of which will be cancelled.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/batch/kill",
        name = "batchKillRequests"
    )]
    async fn batch_kill_requests(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::BatchKillRequestsRequest,
    ) -> Result<(), conjure_http::private::Error>;
}
/// The Compute Service provides the ability to compute the output of compute graphs.
#[conjure_http::conjure_endpoints(
    name = "ComputeService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncComputeService {
    /// Computes the output of the compute graph specified by a ComputeNodeRequest.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute",
        name = "compute",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn compute(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ComputeNodeRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ComputeNodeResponse,
        conjure_http::private::Error,
    >;
    /// Computes the output of the compute graph specified by a ParameterizedComputeNodeRequest. A parameterized
    /// compute request supports multiple values for a single variable, supplied by the ParameterizedContext.
    /// Results are returned in the same order of the request.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/parameterized",
        name = "parameterizedCompute",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn parameterized_compute(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ParameterizedComputeNodeRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ParameterizedComputeNodeResponse,
        conjure_http::private::Error,
    >;
    /// Returns the resulting unit for the output of a compute graph. If the resulting unit is equivalent to exactly
    /// one existing unit in the system, it will be returned (for example, a series in Coulombs divided by a series
    /// in Volts will return an output of Farads). If the output does not have units (for example, a range output,)
    /// the unit result will return noUnitAvailable, and if the computation was not successful, corresponding errors
    /// are returned.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/units",
        name = "computeUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn compute_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ComputeUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ComputeUnitResult,
        conjure_http::private::Error,
    >;
    /// Computes the output of compute graphs specified by BatchComputeNodeRequest. Results are returned in the same
    /// order as the request.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/batch",
        name = "batchComputeWithUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_compute_with_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::BatchComputeWithUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::BatchComputeWithUnitsResponse,
        conjure_http::private::Error,
    >;
    /// Same as computeUnits, however this endpoint functions on a batch of requests for wire efficiency purposes. An
    /// extra note is that this method will serialize underlying conjure errors into the BatchComputeUnitResult type,
    /// meaning callers are required to check for errors explicitly (rather than relying on exceptions being thrown).
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/batch-units",
        name = "batchComputeUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_compute_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::BatchComputeUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::BatchComputeUnitResult,
        conjure_http::private::Error,
    >;
    /// Computes the output of the compute graph specified by a ComputeNodeRequest, as well as providing the resulting
    /// unit for the output of a compute graph. If the resulting unit is equivalent to exactly one existing unit in the
    /// system, it will be returned (for example, a series in Coulombs divided by a series in Volts will return an
    /// output of Farads). If the output does not have units (for example, a range output,) the unit result will return
    /// noUnitAvailable, and if the computation was not successful, corresponding errors are returned.
    #[endpoint(
        method = POST,
        path = "/compute/v2/computeWithUnits",
        name = "computeWithUnits",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn compute_with_units(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::ComputeWithUnitsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::compute::api::ComputeWithUnitsResponse,
        conjure_http::private::Error,
    >;
    /// Best-effort cancellation of active compute requests. Each ID should be the request ID that
    /// the client originally passed when starting the request. A single request may correspond to
    /// one or more underlying operations, all of which will be cancelled.
    #[endpoint(
        method = POST,
        path = "/compute/v2/compute/batch/kill",
        name = "batchKillRequests"
    )]
    async fn batch_kill_requests(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::compute::api::BatchKillRequestsRequest,
    ) -> Result<(), conjure_http::private::Error>;
}
