use conjure_http::endpoint;
/// The internal secrets service provides functionality for retrieving customer secrets where the "user" is a service.
#[conjure_http::conjure_client(name = "InternalSecretService")]
pub trait InternalSecretService<
    #[response_body]
    I: Iterator<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Get decrypted secret by rid. This is a privileged operation that is restricted to services only.
    /// This endpoint must be a conjure endpoint in order to support TLS.
    #[endpoint(
        method = GET,
        path = "/secrets/internal/v1/secrets/{rid}/decrypted",
        name = "getDecrypted",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_decrypted(
        &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::DecryptedSecret,
        conjure_http::private::Error,
    >;
}
/// The internal secrets service provides functionality for retrieving customer secrets where the "user" is a service.
#[conjure_http::conjure_client(name = "InternalSecretService")]
pub trait AsyncInternalSecretService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Get decrypted secret by rid. This is a privileged operation that is restricted to services only.
    /// This endpoint must be a conjure endpoint in order to support TLS.
    #[endpoint(
        method = GET,
        path = "/secrets/internal/v1/secrets/{rid}/decrypted",
        name = "getDecrypted",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_decrypted(
        &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::DecryptedSecret,
        conjure_http::private::Error,
    >;
}
/// The internal secrets service provides functionality for retrieving customer secrets where the "user" is a service.
#[conjure_http::conjure_client(name = "InternalSecretService", local)]
pub trait LocalAsyncInternalSecretService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Get decrypted secret by rid. This is a privileged operation that is restricted to services only.
    /// This endpoint must be a conjure endpoint in order to support TLS.
    #[endpoint(
        method = GET,
        path = "/secrets/internal/v1/secrets/{rid}/decrypted",
        name = "getDecrypted",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_decrypted(
        &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::DecryptedSecret,
        conjure_http::private::Error,
    >;
}
