openapi_31/v31/
authorization_code.rs1use crate::v31;
10
11#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
12pub struct AuthorizationCode {
13 #[serde(rename = "authorizationUrl")]
14 pub authorization_url: String,
15 #[serde(rename = "tokenUrl")]
16 pub token_url: String,
17 #[serde(rename = "refreshUrl", skip_serializing_if = "Option::is_none")]
18 pub refresh_url: Option<String>,
19 #[serde(rename = "scopes")]
20 pub scopes: std::collections::BTreeMap<String, String>,
21}
22
23impl AuthorizationCode {
24 pub fn new(
25 authorization_url: String,
26 token_url: String,
27 scopes: std::collections::BTreeMap<String, String>,
28 ) -> AuthorizationCode {
29 AuthorizationCode { authorization_url, token_url, refresh_url: None, scopes }
30 }
31}