Skip to main content

nominal_api/conjure/clients/persistent/compute/api/
persistent_compute_service.rs

1use conjure_http::endpoint;
2/// Exposes a simple endpoints for checking whether or not persistent compute is enabled.
3#[conjure_http::conjure_client(name = "PersistentComputeService")]
4pub trait PersistentComputeService<
5    #[response_body]
6    I: Iterator<
7            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
8        >,
9> {
10    /// Simple "ping" like endpoint to see if the service is enabled (and available).
11    #[endpoint(
12        method = GET,
13        path = "/persistent-compute/enabled",
14        name = "isEnabled",
15        accept = conjure_http::client::StdResponseDeserializer
16    )]
17    fn is_enabled(
18        &self,
19        #[auth]
20        auth_: &conjure_object::BearerToken,
21    ) -> Result<
22        super::super::super::super::super::objects::persistent::compute::api::IsEnabledResponse,
23        conjure_http::private::Error,
24    >;
25}
26/// Exposes a simple endpoints for checking whether or not persistent compute is enabled.
27#[conjure_http::conjure_client(name = "PersistentComputeService")]
28pub trait AsyncPersistentComputeService<
29    #[response_body]
30    I: conjure_http::private::Stream<
31            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
32        >,
33> {
34    /// Simple "ping" like endpoint to see if the service is enabled (and available).
35    #[endpoint(
36        method = GET,
37        path = "/persistent-compute/enabled",
38        name = "isEnabled",
39        accept = conjure_http::client::StdResponseDeserializer
40    )]
41    async fn is_enabled(
42        &self,
43        #[auth]
44        auth_: &conjure_object::BearerToken,
45    ) -> Result<
46        super::super::super::super::super::objects::persistent::compute::api::IsEnabledResponse,
47        conjure_http::private::Error,
48    >;
49}
50/// Exposes a simple endpoints for checking whether or not persistent compute is enabled.
51#[conjure_http::conjure_client(name = "PersistentComputeService", local)]
52pub trait LocalAsyncPersistentComputeService<
53    #[response_body]
54    I: conjure_http::private::Stream<
55            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
56        >,
57> {
58    /// Simple "ping" like endpoint to see if the service is enabled (and available).
59    #[endpoint(
60        method = GET,
61        path = "/persistent-compute/enabled",
62        name = "isEnabled",
63        accept = conjure_http::client::StdResponseDeserializer
64    )]
65    async fn is_enabled(
66        &self,
67        #[auth]
68        auth_: &conjure_object::BearerToken,
69    ) -> Result<
70        super::super::super::super::super::objects::persistent::compute::api::IsEnabledResponse,
71        conjure_http::private::Error,
72    >;
73}