/*
 * This is an auto-generated file.
 * Any manual changes may be overwritten without notice!
 */

use derive_builder::Builder;
use serde::{Deserialize, Serialize};

/// ACLOIDCCompleteAuthRequest is the request object to begin completing the
/// OIDC auth cycle after receiving the callback from the OIDC provider.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct ACLOIDCCompleteAuthRequest {
    /// AuthMethodName is the name of the auth method being used to login via
    /// OIDC. This will match AuthUrlArgs.AuthMethodName. This is a required
    /// parameter.
    #[serde(rename = "AuthMethodName")]
    pub auth_method_name: String,

    /// ClientNonce, State, and Code are provided from the parameters given to
    /// the redirect URL. These are all required parameters.
    #[serde(rename = "ClientNonce")]
    pub client_nonce: String,

    #[serde(rename = "State")]
    pub state: String,

    #[serde(rename = "Code")]
    pub code: String,

    /// RedirectURI is the URL that authorization should redirect to. This is a
    /// required parameter.
    #[serde(rename = "RedirectURI")]
    pub redirect_uri: String,
}
