#[derive(Debug)]
pub struct ThemeClient<'a> {
    base_client: &'a mut crate::core::base_client::BaseClient,
}
impl<'a> ThemeClient<'a> {
    pub(crate) fn _new(
        base_client: &'a mut crate::core::base_client::BaseClient,
    ) -> Self {
        Self { base_client }
    }
    /// Get organization theme
    ///
    /// Retrieves the documentation project theme configured at the organization level
    ///
    /// GET /organization/theme
    pub async fn get(&mut self) -> crate::SdkResult<crate::models::Theme> {
        let url = self.base_client.build_url("/organization/theme");
        let mut builder = reqwest::Client::default().get(&url);
        builder = builder.header("x-sideko-sdk-language", "rust");
        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("GET", response).await?;
        crate::core::response::process_json::<crate::models::Theme>(response).await
    }
    /// Update organization theme
    ///
    /// Update documentation project theme configured at the organization level
    ///
    /// PUT /organization/theme
    pub async fn update(
        &mut self,
        request: super::request_types::UpdateRequest,
    ) -> crate::SdkResult<crate::models::Theme> {
        let url = self.base_client.build_url("/organization/theme");
        let mut builder = reqwest::Client::default().put(&url);
        builder = builder.header("x-sideko-sdk-language", "rust");
        builder = builder.header("content-type", "application/json");
        builder = builder
            .json(
                &crate::models::ThemeValues {
                    api_reference_group_variant: request.api_reference_group_variant,
                    dark_active_button_bg_color: request.dark_active_button_bg_color,
                    dark_active_button_text_color: request.dark_active_button_text_color,
                    dark_bg_color: request.dark_bg_color,
                    dark_navbar_color: request.dark_navbar_color,
                    dark_navbar_text_color: request.dark_navbar_text_color,
                    light_active_button_bg_color: request.light_active_button_bg_color,
                    light_active_button_text_color: request
                        .light_active_button_text_color,
                    light_bg_color: request.light_bg_color,
                    light_navbar_color: request.light_navbar_color,
                    light_navbar_text_color: request.light_navbar_text_color,
                },
            );
        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("PUT", response).await?;
        crate::core::response::process_json::<crate::models::Theme>(response).await
    }
}
