#[derive(Debug)]
pub struct AuthClient<'a> {
    base_client: &'a mut crate::core::base_client::BaseClient,
}
impl<'a> AuthClient<'a> {
    pub(crate) fn _new(
        base_client: &'a mut crate::core::base_client::BaseClient,
    ) -> Self {
        Self { base_client }
    }
    /// Exchange one-time auth key for api key
    ///
    /// GET /auth/exchange_key
    pub async fn exchange_code(
        &mut self,
        request: super::request_types::ExchangeCodeRequest,
    ) -> crate::SdkResult<crate::models::UserApiKey> {
        let url = self.base_client.build_url("/auth/exchange_key");
        let mut builder = reqwest::Client::default().get(&url);
        let mut queries = crate::core::params::QueryParams::default();
        queries.add("code", &request.code, crate::core::params::QueryStyle::Form, true);
        builder = builder.query(&queries.params);
        builder = builder.header("x-sideko-sdk-language", "rust");
        let mut response = builder.send().await?;
        response = self.base_client.error_for_status("GET", response).await?;
        crate::core::response::process_json::<crate::models::UserApiKey>(response).await
    }
}
