#[derive(Debug)]
pub struct LintClient<'a> {
    base_client: &'a mut crate::core::base_client::BaseClient,
}
impl<'a> LintClient<'a> {
    pub(crate) fn _new(
        base_client: &'a mut crate::core::base_client::BaseClient,
    ) -> Self {
        Self { base_client }
    }
    /// Lint an OpenAPI spec
    ///
    /// POST /lint
    pub async fn run(
        &mut self,
        request: super::request_types::RunRequest,
    ) -> crate::SdkResult<crate::models::LintReport> {
        let url = self.base_client.build_url("/lint");
        let mut builder = reqwest::Client::default().post(&url);
        builder = builder.header("x-sideko-sdk-language", "rust");
        let mut form_data = reqwest::multipart::Form::new();
        if let Some(val) = &request.api_name {
            form_data = form_data
                .part(
                    "api_name",
                    reqwest::multipart::Part::text(
                        crate::core::params::format_string_param(&val),
                    ),
                );
        }
        if let Some(val) = &request.api_version {
            form_data = form_data
                .part(
                    "api_version",
                    reqwest::multipart::Part::text(
                        crate::core::params::format_string_param(&val),
                    ),
                );
        }
        if let Some(val) = &request.openapi {
            form_data = form_data.part("openapi", reqwest::multipart::Part::from(val));
        }
        builder = builder.multipart(form_data);
        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?;
        crate::core::response::process_json::<crate::models::LintReport>(response).await
    }
}
