Skip to main content

authentik_client/models/
patched_plex_source_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2026.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// PatchedPlexSourceRequest : Plex Source Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PatchedPlexSourceRequest {
17    /// Source's display Name.
18    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
19    pub name: Option<String>,
20    /// Internal source name, used in URLs.
21    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
22    pub slug: Option<String>,
23    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
24    pub enabled: Option<bool>,
25    /// When enabled, this source will be displayed as a prominent button on the login page, instead of a small icon.
26    #[serde(rename = "promoted", skip_serializing_if = "Option::is_none")]
27    pub promoted: Option<bool>,
28    /// Flow to use when authenticating existing users.
29    #[serde(
30        rename = "authentication_flow",
31        default,
32        with = "::serde_with::rust::double_option",
33        skip_serializing_if = "Option::is_none"
34    )]
35    pub authentication_flow: Option<Option<uuid::Uuid>>,
36    /// Flow to use when enrolling new users.
37    #[serde(
38        rename = "enrollment_flow",
39        default,
40        with = "::serde_with::rust::double_option",
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub enrollment_flow: Option<Option<uuid::Uuid>>,
44    #[serde(rename = "user_property_mappings", skip_serializing_if = "Option::is_none")]
45    pub user_property_mappings: Option<Vec<uuid::Uuid>>,
46    #[serde(rename = "group_property_mappings", skip_serializing_if = "Option::is_none")]
47    pub group_property_mappings: Option<Vec<uuid::Uuid>>,
48    #[serde(rename = "policy_engine_mode", skip_serializing_if = "Option::is_none")]
49    pub policy_engine_mode: Option<models::PolicyEngineMode>,
50    /// How the source determines if an existing user should be authenticated or a new user enrolled.
51    #[serde(rename = "user_matching_mode", skip_serializing_if = "Option::is_none")]
52    pub user_matching_mode: Option<models::UserMatchingModeEnum>,
53    #[serde(rename = "user_path_template", skip_serializing_if = "Option::is_none")]
54    pub user_path_template: Option<String>,
55    #[serde(rename = "icon", skip_serializing_if = "Option::is_none")]
56    pub icon: Option<String>,
57    /// How the source determines if an existing group should be used or a new group created.
58    #[serde(rename = "group_matching_mode", skip_serializing_if = "Option::is_none")]
59    pub group_matching_mode: Option<models::GroupMatchingModeEnum>,
60    /// Client identifier used to talk to Plex.
61    #[serde(rename = "client_id", skip_serializing_if = "Option::is_none")]
62    pub client_id: Option<String>,
63    /// Which servers a user has to be a member of to be granted access. Empty list allows every server.
64    #[serde(rename = "allowed_servers", skip_serializing_if = "Option::is_none")]
65    pub allowed_servers: Option<Vec<String>>,
66    /// Allow friends to authenticate, even if you don't share a server.
67    #[serde(rename = "allow_friends", skip_serializing_if = "Option::is_none")]
68    pub allow_friends: Option<bool>,
69    /// Plex token used to check friends
70    #[serde(rename = "plex_token", skip_serializing_if = "Option::is_none")]
71    pub plex_token: Option<String>,
72}
73
74impl PatchedPlexSourceRequest {
75    /// Plex Source Serializer
76    pub fn new() -> PatchedPlexSourceRequest {
77        PatchedPlexSourceRequest {
78            name: None,
79            slug: None,
80            enabled: None,
81            promoted: None,
82            authentication_flow: None,
83            enrollment_flow: None,
84            user_property_mappings: None,
85            group_property_mappings: None,
86            policy_engine_mode: None,
87            user_matching_mode: None,
88            user_path_template: None,
89            icon: None,
90            group_matching_mode: None,
91            client_id: None,
92            allowed_servers: None,
93            allow_friends: None,
94            plex_token: None,
95        }
96    }
97}