/*
 * Authenticator
 *
 * REST API and web server providing authentication for a Tapis v3 instance.
 *
 * The version of the OpenAPI document: 1
 * Contact: cicsupport@tacc.utexas.edu
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OAuth2Metadata {
    /// The authorization server's issuer identifier.
    #[serde(rename = "issuer", skip_serializing_if = "Option::is_none")]
    pub issuer: Option<String>,
    /// URL of the authorization server's authorization endpoint.
    #[serde(
        rename = "authorization_endpoint",
        skip_serializing_if = "Option::is_none"
    )]
    pub authorization_endpoint: Option<String>,
    /// URL of the authorization server's token endpoint.
    #[serde(rename = "token_endpoint", skip_serializing_if = "Option::is_none")]
    pub token_endpoint: Option<String>,
    /// URL to the public key used to check signatures for the tokens issued by this server.
    #[serde(rename = "jwks_uri", skip_serializing_if = "Option::is_none")]
    pub jwks_uri: Option<String>,
    /// URL of the authorization server's OAuth 2.0 Dynamic Client Registration endpoint
    #[serde(
        rename = "registration_endpoint",
        skip_serializing_if = "Option::is_none"
    )]
    pub registration_endpoint: Option<String>,
    /// JSON-serializable list of grant types supported by this server.
    #[serde(
        rename = "grant_types_supported",
        skip_serializing_if = "Option::is_none"
    )]
    pub grant_types_supported: Option<Vec<String>>,
}

impl OAuth2Metadata {
    pub fn new() -> OAuth2Metadata {
        OAuth2Metadata {
            issuer: None,
            authorization_endpoint: None,
            token_endpoint: None,
            jwks_uri: None,
            registration_endpoint: None,
            grant_types_supported: None,
        }
    }
}
