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: 2025.10.4
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    /// Flow to use when authenticating existing users.
26    #[serde(
27        rename = "authentication_flow",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub authentication_flow: Option<Option<uuid::Uuid>>,
33    /// Flow to use when enrolling new users.
34    #[serde(
35        rename = "enrollment_flow",
36        default,
37        with = "::serde_with::rust::double_option",
38        skip_serializing_if = "Option::is_none"
39    )]
40    pub enrollment_flow: Option<Option<uuid::Uuid>>,
41    #[serde(rename = "user_property_mappings", skip_serializing_if = "Option::is_none")]
42    pub user_property_mappings: Option<Vec<uuid::Uuid>>,
43    #[serde(rename = "group_property_mappings", skip_serializing_if = "Option::is_none")]
44    pub group_property_mappings: Option<Vec<uuid::Uuid>>,
45    #[serde(rename = "policy_engine_mode", skip_serializing_if = "Option::is_none")]
46    pub policy_engine_mode: Option<models::PolicyEngineMode>,
47    /// How the source determines if an existing user should be authenticated or a new user enrolled.
48    #[serde(rename = "user_matching_mode", skip_serializing_if = "Option::is_none")]
49    pub user_matching_mode: Option<models::UserMatchingModeEnum>,
50    #[serde(rename = "user_path_template", skip_serializing_if = "Option::is_none")]
51    pub user_path_template: Option<String>,
52    /// How the source determines if an existing group should be used or a new group created.
53    #[serde(rename = "group_matching_mode", skip_serializing_if = "Option::is_none")]
54    pub group_matching_mode: Option<models::GroupMatchingModeEnum>,
55    /// Client identifier used to talk to Plex.
56    #[serde(rename = "client_id", skip_serializing_if = "Option::is_none")]
57    pub client_id: Option<String>,
58    /// Which servers a user has to be a member of to be granted access. Empty list allows every server.
59    #[serde(rename = "allowed_servers", skip_serializing_if = "Option::is_none")]
60    pub allowed_servers: Option<Vec<String>>,
61    /// Allow friends to authenticate, even if you don't share a server.
62    #[serde(rename = "allow_friends", skip_serializing_if = "Option::is_none")]
63    pub allow_friends: Option<bool>,
64    /// Plex token used to check friends
65    #[serde(rename = "plex_token", skip_serializing_if = "Option::is_none")]
66    pub plex_token: Option<String>,
67}
68
69impl PatchedPlexSourceRequest {
70    /// Plex Source Serializer
71    pub fn new() -> PatchedPlexSourceRequest {
72        PatchedPlexSourceRequest {
73            name: None,
74            slug: None,
75            enabled: None,
76            authentication_flow: None,
77            enrollment_flow: None,
78            user_property_mappings: None,
79            group_property_mappings: None,
80            policy_engine_mode: None,
81            user_matching_mode: None,
82            user_path_template: None,
83            group_matching_mode: None,
84            client_id: None,
85            allowed_servers: None,
86            allow_friends: None,
87            plex_token: None,
88        }
89    }
90}