{{>partial_header}} /// Configuration for accessing endpoints. #[derive(Debug, Clone)] pub struct Configuration { /// The base path of the server. /// /// This is prepended to the request path. pub base_path: String, /// The user agent string to use. pub user_agent: Option, /// Client to use for the request. pub client: reqwest::Client, /// Basic http auth data. pub basic_auth: Option, /// OAuth access token. /// /// This is set as a bearer token. pub oauth_access_token: Option, /// Bearer token. pub bearer_access_token: Option, /// API key to send. pub api_key: Option, } /// Basic http auth. /// /// This is of the form `(username, password)`. pub type BasicAuth = (String, Option); /// An API key. #[derive(Debug, Clone)] pub struct ApiKey { /// Prefix to apply to the query. pub prefix: Option, /// The key value. pub key: String, } impl Configuration { /// Create default configuration. /// /// The base path is set to `{{{basePath}}}` by default. /// The user agent is set to `openapi-rust/{{version}}` by default. pub fn new() -> Configuration { Configuration::default() } } impl Default for Configuration { fn default() -> Self { Configuration { base_path: "{{{basePath}}}".to_owned(), user_agent: Some("openapi-rust/{{version}}".to_owned()), client: reqwest::Client::new(), basic_auth: None, oauth_access_token: None, bearer_access_token: None, api_key: None, } } }