use conjure_http::endpoint;
/// Internal service responsible for handling creation of new users.
#[conjure_http::conjure_client(name = "InternalUserCreationService")]
pub trait InternalUserCreationService<
    #[response_body]
    I: Iterator<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Ensures that the user corresponding to the auth header provided exists in the database.
    /// Will do nothing if the user already exists.
    #[endpoint(
        method = PUT,
        path = "/user-creation/v1/database",
        name = "ensureDatabaseUserExists",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn ensure_database_user_exists(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
    ) -> Result<(), conjure_http::private::Error>;
}
/// Internal service responsible for handling creation of new users.
#[conjure_http::conjure_client(name = "InternalUserCreationService")]
pub trait AsyncInternalUserCreationService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Ensures that the user corresponding to the auth header provided exists in the database.
    /// Will do nothing if the user already exists.
    #[endpoint(
        method = PUT,
        path = "/user-creation/v1/database",
        name = "ensureDatabaseUserExists",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn ensure_database_user_exists(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
    ) -> Result<(), conjure_http::private::Error>;
}
/// Internal service responsible for handling creation of new users.
#[conjure_http::conjure_client(name = "InternalUserCreationService", local)]
pub trait LocalAsyncInternalUserCreationService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Ensures that the user corresponding to the auth header provided exists in the database.
    /// Will do nothing if the user already exists.
    #[endpoint(
        method = PUT,
        path = "/user-creation/v1/database",
        name = "ensureDatabaseUserExists",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn ensure_database_user_exists(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
    ) -> Result<(), conjure_http::private::Error>;
}
