/* * rocie-server * * An enterprise grocery management system - server * * The version of the OpenAPI document: 0.1.0 * Contact: benedikt.peetz@b-peetz.de * Generated by: https://openapi-generator.tech */ #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, pub user_agent: Option, pub client: reqwest::Client, pub basic_auth: Option, pub oauth_access_token: Option, pub bearer_access_token: Option, pub api_key: Option, } pub type BasicAuth = (String, Option); #[derive(Debug, Clone)] pub struct ApiKey { pub prefix: Option, pub key: String, } impl Configuration { pub fn new() -> Configuration { Configuration::default() } } impl Default for Configuration { fn default() -> Self { let client = { let builder = reqwest::Client::builder(); // The browser handles cookies for us, so we don't need to have a storage for them. #[cfg(not(any(target_arch = "wasm32", target_arch = "wasm64")))] let builder = builder.cookie_store(true); builder.build().expect("to be not missconfigured") }; Configuration { base_path: "http://localhost".to_owned(), user_agent: Some("OpenAPI-Generator/0.1.0/rust".to_owned()), client, basic_auth: None, oauth_access_token: None, bearer_access_token: None, api_key: None, } } }