use conjure_http::endpoint;
/// The secrets service provides functionality for creating and retrieving customer secrets (e.g. influx passwords, API keys, etc)
#[conjure_http::conjure_endpoints(
    name = "SecretService",
    use_legacy_error_serialization
)]
pub trait SecretService {
    /// Create a new secret.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets",
        name = "create",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn create(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::secrets::api::CreateSecretRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::Secret,
        conjure_http::private::Error,
    >;
    /// Get secret by rid.
    #[endpoint(
        method = GET,
        path = "/secrets/v1/secrets/{rid}",
        name = "get",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<
        super::super::super::super::objects::secrets::api::Secret,
        conjure_http::private::Error,
    >;
    /// Get secrets by a set of rids.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets/batch",
        name = "getBatch",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_batch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        request: super::super::super::super::objects::secrets::api::GetSecretsRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::GetSecretsResponse,
        conjure_http::private::Error,
    >;
    /// Update a secret by rid.
    #[endpoint(
        method = PUT,
        path = "/secrets/v1/secrets/{rid}",
        name = "update",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::secrets::api::UpdateSecretRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::Secret,
        conjure_http::private::Error,
    >;
    /// Delete a secret by rid. This is a permanent deletion. To perform a soft delete,
    /// use the archive endpoint.
    #[endpoint(method = DELETE, path = "/secrets/v1/secrets/{rid}", name = "delete")]
    fn delete(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Archive a secret by rid.
    #[endpoint(
        method = PUT,
        path = "/secrets/v1/secrets/{rid}/archive",
        name = "archive"
    )]
    fn archive(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Unarchive a secret by rid.
    #[endpoint(
        method = PUT,
        path = "/secrets/v1/secrets/{rid}/unarchive",
        name = "unarchive"
    )]
    fn unarchive(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Returns metadata about secrets that match a given query.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets/search",
        name = "search",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn search(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::secrets::api::SearchSecretsRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::SearchSecretsResponse,
        conjure_http::private::Error,
    >;
}
/// The secrets service provides functionality for creating and retrieving customer secrets (e.g. influx passwords, API keys, etc)
#[conjure_http::conjure_endpoints(
    name = "SecretService",
    use_legacy_error_serialization
)]
pub trait AsyncSecretService {
    /// Create a new secret.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets",
        name = "create",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::secrets::api::CreateSecretRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::Secret,
        conjure_http::private::Error,
    >;
    /// Get secret by rid.
    #[endpoint(
        method = GET,
        path = "/secrets/v1/secrets/{rid}",
        name = "get",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<
        super::super::super::super::objects::secrets::api::Secret,
        conjure_http::private::Error,
    >;
    /// Get secrets by a set of rids.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets/batch",
        name = "getBatch",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_batch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        request: super::super::super::super::objects::secrets::api::GetSecretsRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::GetSecretsResponse,
        conjure_http::private::Error,
    >;
    /// Update a secret by rid.
    #[endpoint(
        method = PUT,
        path = "/secrets/v1/secrets/{rid}",
        name = "update",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::secrets::api::UpdateSecretRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::Secret,
        conjure_http::private::Error,
    >;
    /// Delete a secret by rid. This is a permanent deletion. To perform a soft delete,
    /// use the archive endpoint.
    #[endpoint(method = DELETE, path = "/secrets/v1/secrets/{rid}", name = "delete")]
    async fn delete(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Archive a secret by rid.
    #[endpoint(
        method = PUT,
        path = "/secrets/v1/secrets/{rid}/archive",
        name = "archive"
    )]
    async fn archive(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Unarchive a secret by rid.
    #[endpoint(
        method = PUT,
        path = "/secrets/v1/secrets/{rid}/unarchive",
        name = "unarchive"
    )]
    async fn unarchive(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Returns metadata about secrets that match a given query.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets/search",
        name = "search",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn search(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::secrets::api::SearchSecretsRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::SearchSecretsResponse,
        conjure_http::private::Error,
    >;
}
/// The secrets service provides functionality for creating and retrieving customer secrets (e.g. influx passwords, API keys, etc)
#[conjure_http::conjure_endpoints(
    name = "SecretService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncSecretService {
    /// Create a new secret.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets",
        name = "create",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::secrets::api::CreateSecretRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::Secret,
        conjure_http::private::Error,
    >;
    /// Get secret by rid.
    #[endpoint(
        method = GET,
        path = "/secrets/v1/secrets/{rid}",
        name = "get",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<
        super::super::super::super::objects::secrets::api::Secret,
        conjure_http::private::Error,
    >;
    /// Get secrets by a set of rids.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets/batch",
        name = "getBatch",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_batch(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        request: super::super::super::super::objects::secrets::api::GetSecretsRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::GetSecretsResponse,
        conjure_http::private::Error,
    >;
    /// Update a secret by rid.
    #[endpoint(
        method = PUT,
        path = "/secrets/v1/secrets/{rid}",
        name = "update",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::secrets::api::UpdateSecretRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::Secret,
        conjure_http::private::Error,
    >;
    /// Delete a secret by rid. This is a permanent deletion. To perform a soft delete,
    /// use the archive endpoint.
    #[endpoint(method = DELETE, path = "/secrets/v1/secrets/{rid}", name = "delete")]
    async fn delete(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Archive a secret by rid.
    #[endpoint(
        method = PUT,
        path = "/secrets/v1/secrets/{rid}/archive",
        name = "archive"
    )]
    async fn archive(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Unarchive a secret by rid.
    #[endpoint(
        method = PUT,
        path = "/secrets/v1/secrets/{rid}/unarchive",
        name = "unarchive"
    )]
    async fn unarchive(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::objects::secrets::api::SecretRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Returns metadata about secrets that match a given query.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets/search",
        name = "search",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn search(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::objects::secrets::api::SearchSecretsRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::SearchSecretsResponse,
        conjure_http::private::Error,
    >;
}
