#[derive(Clone, Debug, Default)]
pub struct SidekoClient {
    base_client: crate::core::base_client::BaseClient,
}
impl SidekoClient {
    /// Override the default URL environment
    pub fn with_environment(mut self, env: crate::environment::Environment) -> Self {
        self.base_client.base_url = crate::environment::BaseUrl::Env(env);
        self
    }
    /// Override the default URL with a custom base URL
    pub fn with_base_url(mut self, base_url: &str) -> Self {
        self.base_client.base_url = crate::environment::BaseUrl::Custom(base_url.into());
        self
    }
    /// Override the default underlying reqwest client
    pub fn with_client(mut self, client: reqwest::Client) -> Self {
        self.base_client.client = client;
        self
    }
    pub fn with_api_key_auth(mut self, api_key: &str) -> Self {
        self.base_client
            .auth
            .insert(
                "ApiKeyAuth".into(),
                crate::core::auth::AuthProvider::KeyHeader(
                    "x-sideko-key".into(),
                    api_key.into(),
                ),
            );
        self
    }
    pub fn with_cookie_auth(mut self, session_cookie: &str) -> Self {
        self.base_client
            .auth
            .insert(
                "CookieAuth".into(),
                crate::core::auth::AuthProvider::KeyCookie(
                    "SIDEKO_SESSION".into(),
                    session_cookie.into(),
                ),
            );
        self
    }
    pub fn api(&mut self) -> crate::resources::api::resource_client::ApiClient {
        crate::resources::api::resource_client::ApiClient::_new(&mut self.base_client)
    }
    pub fn api_link(
        &mut self,
    ) -> crate::resources::api_link::resource_client::ApiLinkClient {
        crate::resources::api_link::resource_client::ApiLinkClient::_new(
            &mut self.base_client,
        )
    }
    pub fn doc(&mut self) -> crate::resources::doc::resource_client::DocClient {
        crate::resources::doc::resource_client::DocClient::_new(&mut self.base_client)
    }
    pub fn asset(&mut self) -> crate::resources::asset::resource_client::AssetClient {
        crate::resources::asset::resource_client::AssetClient::_new(
            &mut self.base_client,
        )
    }
    pub fn role(&mut self) -> crate::resources::role::resource_client::RoleClient {
        crate::resources::role::resource_client::RoleClient::_new(&mut self.base_client)
    }
    pub fn service_account(
        &mut self,
    ) -> crate::resources::service_account::resource_client::ServiceAccountClient {
        crate::resources::service_account::resource_client::ServiceAccountClient::_new(
            &mut self.base_client,
        )
    }
    pub fn auth(&mut self) -> crate::resources::auth::resource_client::AuthClient {
        crate::resources::auth::resource_client::AuthClient::_new(&mut self.base_client)
    }
    pub fn cli(&mut self) -> crate::resources::cli::resource_client::CliClient {
        crate::resources::cli::resource_client::CliClient::_new(&mut self.base_client)
    }
    pub fn org(&mut self) -> crate::resources::org::resource_client::OrgClient {
        crate::resources::org::resource_client::OrgClient::_new(&mut self.base_client)
    }
    pub fn sdk(&mut self) -> crate::resources::sdk::resource_client::SdkClient {
        crate::resources::sdk::resource_client::SdkClient::_new(&mut self.base_client)
    }
    pub fn user(&mut self) -> crate::resources::user::resource_client::UserClient {
        crate::resources::user::resource_client::UserClient::_new(&mut self.base_client)
    }
    pub fn lint(&mut self) -> crate::resources::lint::resource_client::LintClient {
        crate::resources::lint::resource_client::LintClient::_new(&mut self.base_client)
    }
}
