fusionauth_rust_client/models/
identity_provider_linking_strategy.rs

1/*
2 * FusionAuth API
3 *
4 * This is a FusionAuth server. Find out more at [https://fusionauth.io](https://fusionauth.io). You need to [set up an API key](https://fusionauth.io/docs/v1/tech/apis/authentication#managing-api-keys) in the FusionAuth instance you are using to test out the API calls.
5 *
6 * The version of the OpenAPI document: 1.60.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// IdentityProviderLinkingStrategy : The IdP behavior when no user link has been made yet.
15/// The IdP behavior when no user link has been made yet.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum IdentityProviderLinkingStrategy {
18    #[serde(rename = "CreatePendingLink")]
19    CreatePendingLink,
20    #[serde(rename = "Disabled")]
21    Disabled,
22    #[serde(rename = "LinkAnonymously")]
23    LinkAnonymously,
24    #[serde(rename = "LinkByEmail")]
25    LinkByEmail,
26    #[serde(rename = "LinkByEmailForExistingUser")]
27    LinkByEmailForExistingUser,
28    #[serde(rename = "LinkByUsername")]
29    LinkByUsername,
30    #[serde(rename = "LinkByUsernameForExistingUser")]
31    LinkByUsernameForExistingUser,
32    #[serde(rename = "Unsupported")]
33    Unsupported,
34
35}
36
37impl std::fmt::Display for IdentityProviderLinkingStrategy {
38    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
39        match self {
40            Self::CreatePendingLink => write!(f, "CreatePendingLink"),
41            Self::Disabled => write!(f, "Disabled"),
42            Self::LinkAnonymously => write!(f, "LinkAnonymously"),
43            Self::LinkByEmail => write!(f, "LinkByEmail"),
44            Self::LinkByEmailForExistingUser => write!(f, "LinkByEmailForExistingUser"),
45            Self::LinkByUsername => write!(f, "LinkByUsername"),
46            Self::LinkByUsernameForExistingUser => write!(f, "LinkByUsernameForExistingUser"),
47            Self::Unsupported => write!(f, "Unsupported"),
48        }
49    }
50}
51
52impl Default for IdentityProviderLinkingStrategy {
53    fn default() -> IdentityProviderLinkingStrategy {
54        Self::CreatePendingLink
55    }
56}
57