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_client(name = "SecretService")]
pub trait SecretService<
    #[response_body]
    I: Iterator<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Create a new secret.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets",
        name = "create",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn create(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_batch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn update(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::objects::secrets::api::SecretRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn delete(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn archive(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn unarchive(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn search(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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_client(name = "SecretService")]
pub trait AsyncSecretService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Create a new secret.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets",
        name = "create",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_batch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::objects::secrets::api::SecretRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn delete(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn archive(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn unarchive(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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_client(name = "SecretService", local)]
pub trait LocalAsyncSecretService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Create a new secret.
    #[endpoint(
        method = POST,
        path = "/secrets/v1/secrets",
        name = "create",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_batch(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::objects::secrets::api::SecretRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn delete(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn archive(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn unarchive(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::super::objects::secrets::api::SearchSecretsRequest,
    ) -> Result<
        super::super::super::super::objects::secrets::api::SearchSecretsResponse,
        conjure_http::private::Error,
    >;
}
