#[derive(Debug)]
pub struct VersionClient<'a> {
    base_client: &'a mut crate::core::base_client::BaseClient,
}
impl<'a> VersionClient<'a> {
    pub(crate) fn _new(
        base_client: &'a mut crate::core::base_client::BaseClient,
    ) -> Self {
        Self { base_client }
    }
    pub fn guide(
        &mut self,
    ) -> crate::resources::doc::version::guide::resource_client::GuideClient {
        crate::resources::doc::version::guide::resource_client::GuideClient::_new(
            self.base_client,
        )
    }
    /// List versions of a specific Documentation Project
    ///
    /// GET /doc_project/{doc_name}/version
    pub async fn list(
        &mut self,
        request: super::request_types::ListRequest,
    ) -> crate::SdkResult<Vec<crate::models::DocVersion>> {
        let url = self
            .base_client
            .build_url(
                &format!(
                    "/doc_project/{}/version", crate
                    ::core::params::format_string_param(& request.doc_name)
                ),
            );
        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::<Vec<crate::models::DocVersion>>(response)
            .await
    }
    /// Get a specific version of an Documentation Project
    ///
    /// GET /doc_project/{doc_name}/version/{doc_version}
    pub async fn get(
        &mut self,
        request: super::request_types::GetRequest,
    ) -> crate::SdkResult<crate::models::DocVersion> {
        let url = self
            .base_client
            .build_url(
                &format!(
                    "/doc_project/{}/version/{}", crate
                    ::core::params::format_string_param(& request.doc_name), crate
                    ::core::params::format_string_param(& request.doc_version)
                ),
            );
        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::DocVersion>(response).await
    }
}
