#[derive(Debug)]
pub struct UserClient<'a> {
    base_client: &'a mut crate::core::base_client::BaseClient,
}
impl<'a> UserClient<'a> {
    pub(crate) fn _new(
        base_client: &'a mut crate::core::base_client::BaseClient,
    ) -> Self {
        Self { base_client }
    }
    pub fn me(&mut self) -> crate::resources::user::me::resource_client::MeClient {
        crate::resources::user::me::resource_client::MeClient::_new(self.base_client)
    }
    /// Invite a user to an organization with a specific role
    ///
    /// POST /user/invite
    pub async fn invite(
        &mut self,
        request: super::request_types::InviteRequest,
    ) -> crate::SdkResult<reqwest::Response> {
        let url = self.base_client.build_url("/user/invite");
        let mut builder = reqwest::Client::default().post(&url);
        builder = builder.header("x-sideko-sdk-language", "rust");
        builder = builder.header("content-type", "application/json");
        builder = builder
            .json(
                &crate::models::Invite {
                    email: request.email,
                    role_definition_id: request.role_definition_id,
                },
            );
        builder = self
            .base_client
            .apply_auths_to_builder(builder, &["ApiKeyAuth", "CookieAuth"])
            .await?;
        let mut response = builder.send().await?;
        response = self.base_client.error_for_status("POST", response).await?;
        Ok(response)
    }
}
