Skip to main content

proxmox_api/generated/access/domains/
realm.rs

1pub mod sync;
2#[derive(Debug, Clone)]
3pub struct RealmClient<T> {
4    client: T,
5    path: String,
6}
7impl<T> RealmClient<T>
8where
9    T: crate::client::Client,
10{
11    pub fn new(client: T, parent_path: &str, realm: &str) -> Self {
12        Self {
13            client,
14            path: format!("{}/{}", parent_path, realm),
15        }
16    }
17}
18impl<T> RealmClient<T>
19where
20    T: crate::client::Client,
21{
22    #[doc = "Delete an authentication server."]
23    #[doc = ""]
24    #[doc = "Permission check: perm(\"/access/realm\", [\"Realm.Allocate\"])"]
25    pub async fn delete(&self) -> Result<(), T::Error> {
26        let path = self.path.to_string();
27        self.client.delete(&path, &()).await
28    }
29}
30impl<T> RealmClient<T>
31where
32    T: crate::client::Client,
33{
34    #[doc = "Get auth server configuration."]
35    #[doc = ""]
36    #[doc = "Permission check: perm(\"/access/realm\", [\"Realm.Allocate\", \"Sys.Audit\"], any)"]
37    pub async fn get(&self) -> Result<(), T::Error> {
38        let path = self.path.to_string();
39        self.client.get(&path, &()).await
40    }
41}
42impl<T> RealmClient<T>
43where
44    T: crate::client::Client,
45{
46    #[doc = "Update authentication server settings."]
47    #[doc = ""]
48    #[doc = "Permission check: perm(\"/access/realm\", [\"Realm.Allocate\"])"]
49    pub async fn put(&self, params: PutParams) -> Result<(), T::Error> {
50        let path = self.path.to_string();
51        self.client.put(&path, &params).await
52    }
53}
54#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
55pub struct PutParams {
56    #[serde(rename = "acr-values")]
57    #[serde(skip_serializing_if = "Option::is_none", default)]
58    #[doc = "Specifies the Authentication Context Class Reference values that theAuthorization Server is being requested to use for the Auth Request."]
59    #[doc = ""]
60    pub acr_values: Option<AcrValuesStr>,
61    #[serde(
62        serialize_with = "crate::types::serialize_bool_optional",
63        deserialize_with = "crate::types::deserialize_bool_optional"
64    )]
65    #[serde(skip_serializing_if = "Option::is_none", default)]
66    #[doc = "Automatically create users if they do not exist."]
67    #[doc = ""]
68    pub autocreate: Option<bool>,
69    #[serde(skip_serializing_if = "Option::is_none", default)]
70    #[doc = "LDAP base domain name"]
71    #[doc = ""]
72    pub base_dn: Option<BaseDnStr>,
73    #[serde(skip_serializing_if = "Option::is_none", default)]
74    #[doc = "LDAP bind domain name"]
75    #[doc = ""]
76    pub bind_dn: Option<BindDnStr>,
77    #[serde(skip_serializing_if = "Option::is_none", default)]
78    #[doc = "Path to the CA certificate store"]
79    #[doc = ""]
80    pub capath: Option<String>,
81    #[serde(rename = "case-sensitive")]
82    #[serde(
83        serialize_with = "crate::types::serialize_bool_optional",
84        deserialize_with = "crate::types::deserialize_bool_optional"
85    )]
86    #[serde(skip_serializing_if = "Option::is_none", default)]
87    #[doc = "username is case-sensitive"]
88    #[doc = ""]
89    pub case_sensitive: Option<bool>,
90    #[serde(skip_serializing_if = "Option::is_none", default)]
91    #[doc = "Path to the client certificate"]
92    #[doc = ""]
93    pub cert: Option<String>,
94    #[serde(skip_serializing_if = "Option::is_none", default)]
95    #[doc = "Path to the client certificate key"]
96    #[doc = ""]
97    pub certkey: Option<String>,
98    #[serde(rename = "check-connection")]
99    #[serde(
100        serialize_with = "crate::types::serialize_bool_optional",
101        deserialize_with = "crate::types::deserialize_bool_optional"
102    )]
103    #[serde(skip_serializing_if = "Option::is_none", default)]
104    #[doc = "Check bind connection to the server."]
105    #[doc = ""]
106    pub check_connection: Option<bool>,
107    #[serde(rename = "client-id")]
108    #[serde(skip_serializing_if = "Option::is_none", default)]
109    #[doc = "OpenID Client ID"]
110    #[doc = ""]
111    pub client_id: Option<ClientIdStr>,
112    #[serde(rename = "client-key")]
113    #[serde(skip_serializing_if = "Option::is_none", default)]
114    #[doc = "OpenID Client Key"]
115    #[doc = ""]
116    pub client_key: Option<ClientKeyStr>,
117    #[serde(skip_serializing_if = "Option::is_none", default)]
118    #[doc = "Description."]
119    #[doc = ""]
120    pub comment: Option<CommentStr>,
121    #[serde(
122        serialize_with = "crate::types::serialize_bool_optional",
123        deserialize_with = "crate::types::deserialize_bool_optional"
124    )]
125    #[serde(skip_serializing_if = "Option::is_none", default)]
126    #[doc = "Use this as default realm"]
127    #[doc = ""]
128    pub default: Option<bool>,
129    #[serde(skip_serializing_if = "Option::is_none", default)]
130    #[doc = "A list of settings you want to delete."]
131    #[doc = ""]
132    pub delete: Option<DeleteStr>,
133    #[serde(skip_serializing_if = "Option::is_none", default)]
134    #[doc = "Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications."]
135    #[doc = ""]
136    pub digest: Option<DigestStr>,
137    #[serde(skip_serializing_if = "Option::is_none", default)]
138    #[doc = "AD domain name"]
139    #[doc = ""]
140    pub domain: Option<DomainStr>,
141    #[serde(skip_serializing_if = "Option::is_none", default)]
142    #[doc = "LDAP filter for user sync."]
143    #[doc = ""]
144    pub filter: Option<FilterStr>,
145    #[serde(skip_serializing_if = "Option::is_none", default)]
146    #[doc = "The objectclasses for groups."]
147    #[doc = ""]
148    pub group_classes: Option<String>,
149    #[serde(skip_serializing_if = "Option::is_none", default)]
150    #[doc = "LDAP base domain name for group sync. If not set, the base_dn will be used."]
151    #[doc = ""]
152    pub group_dn: Option<GroupDnStr>,
153    #[serde(skip_serializing_if = "Option::is_none", default)]
154    #[doc = "LDAP filter for group sync."]
155    #[doc = ""]
156    pub group_filter: Option<GroupFilterStr>,
157    #[serde(skip_serializing_if = "Option::is_none", default)]
158    #[doc = "LDAP attribute representing a groups name. If not set or found, the first value of the DN will be used as name."]
159    #[doc = ""]
160    pub group_name_attr: Option<GroupNameAttrStr>,
161    #[serde(rename = "groups-autocreate")]
162    #[serde(
163        serialize_with = "crate::types::serialize_bool_optional",
164        deserialize_with = "crate::types::deserialize_bool_optional"
165    )]
166    #[serde(skip_serializing_if = "Option::is_none", default)]
167    #[doc = "Automatically create groups if they do not exist."]
168    #[doc = ""]
169    pub groups_autocreate: Option<bool>,
170    #[serde(rename = "groups-claim")]
171    #[serde(skip_serializing_if = "Option::is_none", default)]
172    #[doc = "OpenID claim used to retrieve groups with."]
173    #[doc = ""]
174    pub groups_claim: Option<GroupsClaimStr>,
175    #[serde(rename = "groups-overwrite")]
176    #[serde(
177        serialize_with = "crate::types::serialize_bool_optional",
178        deserialize_with = "crate::types::deserialize_bool_optional"
179    )]
180    #[serde(skip_serializing_if = "Option::is_none", default)]
181    #[doc = "All groups will be overwritten for the user on login."]
182    #[doc = ""]
183    pub groups_overwrite: Option<bool>,
184    #[serde(rename = "issuer-url")]
185    #[serde(skip_serializing_if = "Option::is_none", default)]
186    #[doc = "OpenID Issuer Url"]
187    #[doc = ""]
188    pub issuer_url: Option<IssuerUrlStr>,
189    #[serde(skip_serializing_if = "Option::is_none", default)]
190    #[doc = "LDAP protocol mode."]
191    #[doc = ""]
192    pub mode: Option<Mode>,
193    #[serde(skip_serializing_if = "Option::is_none", default)]
194    #[doc = "LDAP bind password. Will be stored in '/etc/pve/priv/realm/\\\\<REALM\\\\>.pw'."]
195    #[doc = ""]
196    pub password: Option<String>,
197    #[serde(skip_serializing_if = "Option::is_none", default)]
198    #[doc = "Server port."]
199    #[doc = ""]
200    pub port: Option<PortInt>,
201    #[serde(skip_serializing_if = "Option::is_none", default)]
202    #[doc = "Specifies whether the Authorization Server prompts the End-User for reauthentication and consent."]
203    #[doc = ""]
204    pub prompt: Option<PromptStr>,
205    #[serde(rename = "query-userinfo")]
206    #[serde(
207        serialize_with = "crate::types::serialize_bool_optional",
208        deserialize_with = "crate::types::deserialize_bool_optional"
209    )]
210    #[serde(skip_serializing_if = "Option::is_none", default)]
211    #[doc = "Enables querying the userinfo endpoint for claims values."]
212    #[doc = ""]
213    pub query_userinfo: Option<bool>,
214    #[serde(skip_serializing_if = "Option::is_none", default)]
215    #[doc = "Specifies the scopes (user details) that should be authorized and returned, for example 'email' or 'profile'."]
216    #[doc = ""]
217    pub scopes: Option<String>,
218    #[serde(
219        serialize_with = "crate::types::serialize_bool_optional",
220        deserialize_with = "crate::types::deserialize_bool_optional"
221    )]
222    #[serde(skip_serializing_if = "Option::is_none", default)]
223    #[doc = "Use secure LDAPS protocol. DEPRECATED: use 'mode' instead."]
224    #[doc = ""]
225    pub secure: Option<bool>,
226    #[serde(skip_serializing_if = "Option::is_none", default)]
227    #[doc = "Server IP address (or DNS name)"]
228    #[doc = ""]
229    pub server1: Option<Server1Str>,
230    #[serde(skip_serializing_if = "Option::is_none", default)]
231    #[doc = "Fallback Server IP address (or DNS name)"]
232    #[doc = ""]
233    pub server2: Option<Server2Str>,
234    #[serde(skip_serializing_if = "Option::is_none", default)]
235    #[doc = "LDAPS TLS/SSL version. It's not recommended to use version older than 1.2!"]
236    #[doc = ""]
237    pub sslversion: Option<Sslversion>,
238    #[serde(rename = "sync-defaults-options")]
239    #[serde(skip_serializing_if = "Option::is_none", default)]
240    #[doc = "The default options for behavior of synchronizations."]
241    #[doc = ""]
242    pub sync_defaults_options: Option<String>,
243    #[serde(skip_serializing_if = "Option::is_none", default)]
244    #[doc = "Comma separated list of key=value pairs for specifying which LDAP attributes map to which PVE user field. For example, to map the LDAP attribute 'mail' to PVEs 'email', write  'email=mail'. By default, each PVE user field is represented  by an LDAP attribute of the same name."]
245    #[doc = ""]
246    pub sync_attributes: Option<SyncAttributesStr>,
247    #[serde(skip_serializing_if = "Option::is_none", default)]
248    #[doc = "Use Two-factor authentication."]
249    #[doc = ""]
250    pub tfa: Option<TfaStr>,
251    #[serde(skip_serializing_if = "Option::is_none", default)]
252    #[doc = "LDAP user attribute name"]
253    #[doc = ""]
254    pub user_attr: Option<UserAttrStr>,
255    #[serde(skip_serializing_if = "Option::is_none", default)]
256    #[doc = "The objectclasses for users."]
257    #[doc = ""]
258    pub user_classes: Option<String>,
259    #[serde(
260        serialize_with = "crate::types::serialize_bool_optional",
261        deserialize_with = "crate::types::deserialize_bool_optional"
262    )]
263    #[serde(skip_serializing_if = "Option::is_none", default)]
264    #[doc = "Verify the server's SSL certificate"]
265    #[doc = ""]
266    pub verify: Option<bool>,
267    #[serde(
268        flatten,
269        default,
270        skip_serializing_if = "::std::collections::HashMap::is_empty"
271    )]
272    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
273}
274#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, PartialEq, Default)]
275#[doc = "LDAP protocol mode."]
276#[doc = ""]
277pub enum Mode {
278    #[serde(rename = "ldap")]
279    #[default]
280    Ldap,
281    #[serde(rename = "ldap+starttls")]
282    LdapStarttls,
283    #[serde(rename = "ldaps")]
284    Ldaps,
285}
286impl TryFrom<&str> for Mode {
287    type Error = String;
288    fn try_from(value: &str) -> Result<Self, <Self as TryFrom<&str>>::Error> {
289        match value {
290            "ldap" => Ok(Self::Ldap),
291            "ldap+starttls" => Ok(Self::LdapStarttls),
292            "ldaps" => Ok(Self::Ldaps),
293            v => Err(format!("Unknown variant {v}")),
294        }
295    }
296}
297#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, PartialEq)]
298#[doc = "LDAPS TLS/SSL version. It's not recommended to use version older than 1.2!"]
299#[doc = ""]
300pub enum Sslversion {
301    #[serde(rename = "tlsv1")]
302    Tlsv1,
303    #[serde(rename = "tlsv1_1")]
304    Tlsv11,
305    #[serde(rename = "tlsv1_2")]
306    Tlsv12,
307    #[serde(rename = "tlsv1_3")]
308    Tlsv13,
309}
310impl TryFrom<&str> for Sslversion {
311    type Error = String;
312    fn try_from(value: &str) -> Result<Self, <Self as TryFrom<&str>>::Error> {
313        match value {
314            "tlsv1" => Ok(Self::Tlsv1),
315            "tlsv1_1" => Ok(Self::Tlsv11),
316            "tlsv1_2" => Ok(Self::Tlsv12),
317            "tlsv1_3" => Ok(Self::Tlsv13),
318            v => Err(format!("Unknown variant {v}")),
319        }
320    }
321}
322#[derive(Debug, Clone, Copy, PartialEq, PartialOrd)]
323pub struct PortInt(i128);
324impl crate::types::bounded_integer::BoundedInteger for PortInt {
325    const MIN: Option<i128> = Some(1i128);
326    const MAX: Option<i128> = Some(65535i128);
327    const DEFAULT: Option<i128> = None::<i128>;
328    const TYPE_DESCRIPTION: &'static str = "an integer between 1 and 65535";
329    fn get(&self) -> i128 {
330        self.0
331    }
332    fn new(value: i128) -> Result<Self, crate::types::bounded_integer::BoundedIntegerError> {
333        Self::validate(value)?;
334        Ok(Self(value))
335    }
336}
337impl std::convert::TryFrom<i128> for PortInt {
338    type Error = crate::types::bounded_integer::BoundedIntegerError;
339    fn try_from(value: i128) -> Result<Self, Self::Error> {
340        crate::types::bounded_integer::BoundedInteger::new(value)
341    }
342}
343impl ::serde::Serialize for PortInt {
344    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
345    where
346        S: ::serde::Serializer,
347    {
348        crate::types::bounded_integer::serialize_bounded_integer(self, serializer)
349    }
350}
351impl<'de> ::serde::Deserialize<'de> for PortInt {
352    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
353    where
354        D: ::serde::Deserializer<'de>,
355    {
356        crate::types::bounded_integer::deserialize_bounded_integer(deserializer)
357    }
358}
359#[derive(Debug, Clone, PartialEq, PartialOrd)]
360pub struct AcrValuesStr {
361    value: String,
362}
363impl crate::types::bounded_string::BoundedString for AcrValuesStr {
364    const MIN_LENGTH: Option<usize> = None::<usize>;
365    const MAX_LENGTH: Option<usize> = None::<usize>;
366    const DEFAULT: Option<&'static str> = None::<&'static str>;
367    const PATTERN: Option<&'static str> = Some("^[^\\x00-\\x1F\\x7F <>#\"]*$");
368    const TYPE_DESCRIPTION: &'static str =
369        "a string with pattern r\"^[^\\x00-\\x1F\\x7F <>#\"]*$\" and no length constraints";
370    fn get_value(&self) -> &str {
371        &self.value
372    }
373    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
374        Self::validate(&value)?;
375        Ok(Self { value })
376    }
377}
378impl std::convert::TryFrom<String> for AcrValuesStr {
379    type Error = crate::types::bounded_string::BoundedStringError;
380    fn try_from(value: String) -> Result<Self, Self::Error> {
381        crate::types::bounded_string::BoundedString::new(value)
382    }
383}
384impl ::serde::Serialize for AcrValuesStr {
385    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
386    where
387        S: ::serde::Serializer,
388    {
389        crate::types::bounded_string::serialize_bounded_string(self, serializer)
390    }
391}
392impl<'de> ::serde::Deserialize<'de> for AcrValuesStr {
393    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
394    where
395        D: ::serde::Deserializer<'de>,
396    {
397        crate::types::bounded_string::deserialize_bounded_string(deserializer)
398    }
399}
400#[derive(Debug, Clone, PartialEq, PartialOrd)]
401pub struct BaseDnStr {
402    value: String,
403}
404impl crate::types::bounded_string::BoundedString for BaseDnStr {
405    const MIN_LENGTH: Option<usize> = None::<usize>;
406    const MAX_LENGTH: Option<usize> = Some(256usize);
407    const DEFAULT: Option<&'static str> = None::<&'static str>;
408    const PATTERN: Option<&'static str> = None::<&'static str>;
409    const TYPE_DESCRIPTION: &'static str = "a string with length at most 256";
410    fn get_value(&self) -> &str {
411        &self.value
412    }
413    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
414        Self::validate(&value)?;
415        Ok(Self { value })
416    }
417}
418impl std::convert::TryFrom<String> for BaseDnStr {
419    type Error = crate::types::bounded_string::BoundedStringError;
420    fn try_from(value: String) -> Result<Self, Self::Error> {
421        crate::types::bounded_string::BoundedString::new(value)
422    }
423}
424impl ::serde::Serialize for BaseDnStr {
425    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
426    where
427        S: ::serde::Serializer,
428    {
429        crate::types::bounded_string::serialize_bounded_string(self, serializer)
430    }
431}
432impl<'de> ::serde::Deserialize<'de> for BaseDnStr {
433    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
434    where
435        D: ::serde::Deserializer<'de>,
436    {
437        crate::types::bounded_string::deserialize_bounded_string(deserializer)
438    }
439}
440#[derive(Debug, Clone, PartialEq, PartialOrd)]
441pub struct BindDnStr {
442    value: String,
443}
444impl crate::types::bounded_string::BoundedString for BindDnStr {
445    const MIN_LENGTH: Option<usize> = None::<usize>;
446    const MAX_LENGTH: Option<usize> = Some(256usize);
447    const DEFAULT: Option<&'static str> = None::<&'static str>;
448    const PATTERN: Option<&'static str> = None::<&'static str>;
449    const TYPE_DESCRIPTION: &'static str = "a string with length at most 256";
450    fn get_value(&self) -> &str {
451        &self.value
452    }
453    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
454        Self::validate(&value)?;
455        Ok(Self { value })
456    }
457}
458impl std::convert::TryFrom<String> for BindDnStr {
459    type Error = crate::types::bounded_string::BoundedStringError;
460    fn try_from(value: String) -> Result<Self, Self::Error> {
461        crate::types::bounded_string::BoundedString::new(value)
462    }
463}
464impl ::serde::Serialize for BindDnStr {
465    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
466    where
467        S: ::serde::Serializer,
468    {
469        crate::types::bounded_string::serialize_bounded_string(self, serializer)
470    }
471}
472impl<'de> ::serde::Deserialize<'de> for BindDnStr {
473    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
474    where
475        D: ::serde::Deserializer<'de>,
476    {
477        crate::types::bounded_string::deserialize_bounded_string(deserializer)
478    }
479}
480#[derive(Debug, Clone, PartialEq, PartialOrd)]
481pub struct ClientIdStr {
482    value: String,
483}
484impl crate::types::bounded_string::BoundedString for ClientIdStr {
485    const MIN_LENGTH: Option<usize> = None::<usize>;
486    const MAX_LENGTH: Option<usize> = Some(256usize);
487    const DEFAULT: Option<&'static str> = None::<&'static str>;
488    const PATTERN: Option<&'static str> = None::<&'static str>;
489    const TYPE_DESCRIPTION: &'static str = "a string with length at most 256";
490    fn get_value(&self) -> &str {
491        &self.value
492    }
493    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
494        Self::validate(&value)?;
495        Ok(Self { value })
496    }
497}
498impl std::convert::TryFrom<String> for ClientIdStr {
499    type Error = crate::types::bounded_string::BoundedStringError;
500    fn try_from(value: String) -> Result<Self, Self::Error> {
501        crate::types::bounded_string::BoundedString::new(value)
502    }
503}
504impl ::serde::Serialize for ClientIdStr {
505    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
506    where
507        S: ::serde::Serializer,
508    {
509        crate::types::bounded_string::serialize_bounded_string(self, serializer)
510    }
511}
512impl<'de> ::serde::Deserialize<'de> for ClientIdStr {
513    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
514    where
515        D: ::serde::Deserializer<'de>,
516    {
517        crate::types::bounded_string::deserialize_bounded_string(deserializer)
518    }
519}
520#[derive(Debug, Clone, PartialEq, PartialOrd)]
521pub struct ClientKeyStr {
522    value: String,
523}
524impl crate::types::bounded_string::BoundedString for ClientKeyStr {
525    const MIN_LENGTH: Option<usize> = None::<usize>;
526    const MAX_LENGTH: Option<usize> = Some(256usize);
527    const DEFAULT: Option<&'static str> = None::<&'static str>;
528    const PATTERN: Option<&'static str> = None::<&'static str>;
529    const TYPE_DESCRIPTION: &'static str = "a string with length at most 256";
530    fn get_value(&self) -> &str {
531        &self.value
532    }
533    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
534        Self::validate(&value)?;
535        Ok(Self { value })
536    }
537}
538impl std::convert::TryFrom<String> for ClientKeyStr {
539    type Error = crate::types::bounded_string::BoundedStringError;
540    fn try_from(value: String) -> Result<Self, Self::Error> {
541        crate::types::bounded_string::BoundedString::new(value)
542    }
543}
544impl ::serde::Serialize for ClientKeyStr {
545    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
546    where
547        S: ::serde::Serializer,
548    {
549        crate::types::bounded_string::serialize_bounded_string(self, serializer)
550    }
551}
552impl<'de> ::serde::Deserialize<'de> for ClientKeyStr {
553    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
554    where
555        D: ::serde::Deserializer<'de>,
556    {
557        crate::types::bounded_string::deserialize_bounded_string(deserializer)
558    }
559}
560#[derive(Debug, Clone, PartialEq, PartialOrd)]
561pub struct CommentStr {
562    value: String,
563}
564impl crate::types::bounded_string::BoundedString for CommentStr {
565    const MIN_LENGTH: Option<usize> = None::<usize>;
566    const MAX_LENGTH: Option<usize> = Some(4096usize);
567    const DEFAULT: Option<&'static str> = None::<&'static str>;
568    const PATTERN: Option<&'static str> = None::<&'static str>;
569    const TYPE_DESCRIPTION: &'static str = "a string with length at most 4096";
570    fn get_value(&self) -> &str {
571        &self.value
572    }
573    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
574        Self::validate(&value)?;
575        Ok(Self { value })
576    }
577}
578impl std::convert::TryFrom<String> for CommentStr {
579    type Error = crate::types::bounded_string::BoundedStringError;
580    fn try_from(value: String) -> Result<Self, Self::Error> {
581        crate::types::bounded_string::BoundedString::new(value)
582    }
583}
584impl ::serde::Serialize for CommentStr {
585    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
586    where
587        S: ::serde::Serializer,
588    {
589        crate::types::bounded_string::serialize_bounded_string(self, serializer)
590    }
591}
592impl<'de> ::serde::Deserialize<'de> for CommentStr {
593    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
594    where
595        D: ::serde::Deserializer<'de>,
596    {
597        crate::types::bounded_string::deserialize_bounded_string(deserializer)
598    }
599}
600#[derive(Debug, Clone, PartialEq, PartialOrd)]
601pub struct DeleteStr {
602    value: String,
603}
604impl crate::types::bounded_string::BoundedString for DeleteStr {
605    const MIN_LENGTH: Option<usize> = None::<usize>;
606    const MAX_LENGTH: Option<usize> = Some(4096usize);
607    const DEFAULT: Option<&'static str> = None::<&'static str>;
608    const PATTERN: Option<&'static str> = None::<&'static str>;
609    const TYPE_DESCRIPTION: &'static str = "a string with length at most 4096";
610    fn get_value(&self) -> &str {
611        &self.value
612    }
613    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
614        Self::validate(&value)?;
615        Ok(Self { value })
616    }
617}
618impl std::convert::TryFrom<String> for DeleteStr {
619    type Error = crate::types::bounded_string::BoundedStringError;
620    fn try_from(value: String) -> Result<Self, Self::Error> {
621        crate::types::bounded_string::BoundedString::new(value)
622    }
623}
624impl ::serde::Serialize for DeleteStr {
625    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
626    where
627        S: ::serde::Serializer,
628    {
629        crate::types::bounded_string::serialize_bounded_string(self, serializer)
630    }
631}
632impl<'de> ::serde::Deserialize<'de> for DeleteStr {
633    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
634    where
635        D: ::serde::Deserializer<'de>,
636    {
637        crate::types::bounded_string::deserialize_bounded_string(deserializer)
638    }
639}
640#[derive(Debug, Clone, PartialEq, PartialOrd)]
641pub struct DigestStr {
642    value: String,
643}
644impl crate::types::bounded_string::BoundedString for DigestStr {
645    const MIN_LENGTH: Option<usize> = None::<usize>;
646    const MAX_LENGTH: Option<usize> = Some(64usize);
647    const DEFAULT: Option<&'static str> = None::<&'static str>;
648    const PATTERN: Option<&'static str> = None::<&'static str>;
649    const TYPE_DESCRIPTION: &'static str = "a string with length at most 64";
650    fn get_value(&self) -> &str {
651        &self.value
652    }
653    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
654        Self::validate(&value)?;
655        Ok(Self { value })
656    }
657}
658impl std::convert::TryFrom<String> for DigestStr {
659    type Error = crate::types::bounded_string::BoundedStringError;
660    fn try_from(value: String) -> Result<Self, Self::Error> {
661        crate::types::bounded_string::BoundedString::new(value)
662    }
663}
664impl ::serde::Serialize for DigestStr {
665    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
666    where
667        S: ::serde::Serializer,
668    {
669        crate::types::bounded_string::serialize_bounded_string(self, serializer)
670    }
671}
672impl<'de> ::serde::Deserialize<'de> for DigestStr {
673    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
674    where
675        D: ::serde::Deserializer<'de>,
676    {
677        crate::types::bounded_string::deserialize_bounded_string(deserializer)
678    }
679}
680#[derive(Debug, Clone, PartialEq, PartialOrd)]
681pub struct DomainStr {
682    value: String,
683}
684impl crate::types::bounded_string::BoundedString for DomainStr {
685    const MIN_LENGTH: Option<usize> = None::<usize>;
686    const MAX_LENGTH: Option<usize> = Some(256usize);
687    const DEFAULT: Option<&'static str> = None::<&'static str>;
688    const PATTERN: Option<&'static str> = Some("\\S+");
689    const TYPE_DESCRIPTION: &'static str = "a string with pattern r\"\\S+\" and length at most 256";
690    fn get_value(&self) -> &str {
691        &self.value
692    }
693    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
694        Self::validate(&value)?;
695        Ok(Self { value })
696    }
697}
698impl std::convert::TryFrom<String> for DomainStr {
699    type Error = crate::types::bounded_string::BoundedStringError;
700    fn try_from(value: String) -> Result<Self, Self::Error> {
701        crate::types::bounded_string::BoundedString::new(value)
702    }
703}
704impl ::serde::Serialize for DomainStr {
705    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
706    where
707        S: ::serde::Serializer,
708    {
709        crate::types::bounded_string::serialize_bounded_string(self, serializer)
710    }
711}
712impl<'de> ::serde::Deserialize<'de> for DomainStr {
713    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
714    where
715        D: ::serde::Deserializer<'de>,
716    {
717        crate::types::bounded_string::deserialize_bounded_string(deserializer)
718    }
719}
720#[derive(Debug, Clone, PartialEq, PartialOrd)]
721pub struct FilterStr {
722    value: String,
723}
724impl crate::types::bounded_string::BoundedString for FilterStr {
725    const MIN_LENGTH: Option<usize> = None::<usize>;
726    const MAX_LENGTH: Option<usize> = Some(2048usize);
727    const DEFAULT: Option<&'static str> = None::<&'static str>;
728    const PATTERN: Option<&'static str> = None::<&'static str>;
729    const TYPE_DESCRIPTION: &'static str = "a string with length at most 2048";
730    fn get_value(&self) -> &str {
731        &self.value
732    }
733    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
734        Self::validate(&value)?;
735        Ok(Self { value })
736    }
737}
738impl std::convert::TryFrom<String> for FilterStr {
739    type Error = crate::types::bounded_string::BoundedStringError;
740    fn try_from(value: String) -> Result<Self, Self::Error> {
741        crate::types::bounded_string::BoundedString::new(value)
742    }
743}
744impl ::serde::Serialize for FilterStr {
745    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
746    where
747        S: ::serde::Serializer,
748    {
749        crate::types::bounded_string::serialize_bounded_string(self, serializer)
750    }
751}
752impl<'de> ::serde::Deserialize<'de> for FilterStr {
753    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
754    where
755        D: ::serde::Deserializer<'de>,
756    {
757        crate::types::bounded_string::deserialize_bounded_string(deserializer)
758    }
759}
760#[derive(Debug, Clone, PartialEq, PartialOrd)]
761pub struct GroupDnStr {
762    value: String,
763}
764impl crate::types::bounded_string::BoundedString for GroupDnStr {
765    const MIN_LENGTH: Option<usize> = None::<usize>;
766    const MAX_LENGTH: Option<usize> = Some(256usize);
767    const DEFAULT: Option<&'static str> = None::<&'static str>;
768    const PATTERN: Option<&'static str> = None::<&'static str>;
769    const TYPE_DESCRIPTION: &'static str = "a string with length at most 256";
770    fn get_value(&self) -> &str {
771        &self.value
772    }
773    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
774        Self::validate(&value)?;
775        Ok(Self { value })
776    }
777}
778impl std::convert::TryFrom<String> for GroupDnStr {
779    type Error = crate::types::bounded_string::BoundedStringError;
780    fn try_from(value: String) -> Result<Self, Self::Error> {
781        crate::types::bounded_string::BoundedString::new(value)
782    }
783}
784impl ::serde::Serialize for GroupDnStr {
785    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
786    where
787        S: ::serde::Serializer,
788    {
789        crate::types::bounded_string::serialize_bounded_string(self, serializer)
790    }
791}
792impl<'de> ::serde::Deserialize<'de> for GroupDnStr {
793    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
794    where
795        D: ::serde::Deserializer<'de>,
796    {
797        crate::types::bounded_string::deserialize_bounded_string(deserializer)
798    }
799}
800#[derive(Debug, Clone, PartialEq, PartialOrd)]
801pub struct GroupFilterStr {
802    value: String,
803}
804impl crate::types::bounded_string::BoundedString for GroupFilterStr {
805    const MIN_LENGTH: Option<usize> = None::<usize>;
806    const MAX_LENGTH: Option<usize> = Some(2048usize);
807    const DEFAULT: Option<&'static str> = None::<&'static str>;
808    const PATTERN: Option<&'static str> = None::<&'static str>;
809    const TYPE_DESCRIPTION: &'static str = "a string with length at most 2048";
810    fn get_value(&self) -> &str {
811        &self.value
812    }
813    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
814        Self::validate(&value)?;
815        Ok(Self { value })
816    }
817}
818impl std::convert::TryFrom<String> for GroupFilterStr {
819    type Error = crate::types::bounded_string::BoundedStringError;
820    fn try_from(value: String) -> Result<Self, Self::Error> {
821        crate::types::bounded_string::BoundedString::new(value)
822    }
823}
824impl ::serde::Serialize for GroupFilterStr {
825    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
826    where
827        S: ::serde::Serializer,
828    {
829        crate::types::bounded_string::serialize_bounded_string(self, serializer)
830    }
831}
832impl<'de> ::serde::Deserialize<'de> for GroupFilterStr {
833    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
834    where
835        D: ::serde::Deserializer<'de>,
836    {
837        crate::types::bounded_string::deserialize_bounded_string(deserializer)
838    }
839}
840#[derive(Debug, Clone, PartialEq, PartialOrd)]
841pub struct GroupNameAttrStr {
842    value: String,
843}
844impl crate::types::bounded_string::BoundedString for GroupNameAttrStr {
845    const MIN_LENGTH: Option<usize> = None::<usize>;
846    const MAX_LENGTH: Option<usize> = Some(256usize);
847    const DEFAULT: Option<&'static str> = None::<&'static str>;
848    const PATTERN: Option<&'static str> = None::<&'static str>;
849    const TYPE_DESCRIPTION: &'static str = "a string with length at most 256";
850    fn get_value(&self) -> &str {
851        &self.value
852    }
853    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
854        Self::validate(&value)?;
855        Ok(Self { value })
856    }
857}
858impl std::convert::TryFrom<String> for GroupNameAttrStr {
859    type Error = crate::types::bounded_string::BoundedStringError;
860    fn try_from(value: String) -> Result<Self, Self::Error> {
861        crate::types::bounded_string::BoundedString::new(value)
862    }
863}
864impl ::serde::Serialize for GroupNameAttrStr {
865    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
866    where
867        S: ::serde::Serializer,
868    {
869        crate::types::bounded_string::serialize_bounded_string(self, serializer)
870    }
871}
872impl<'de> ::serde::Deserialize<'de> for GroupNameAttrStr {
873    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
874    where
875        D: ::serde::Deserializer<'de>,
876    {
877        crate::types::bounded_string::deserialize_bounded_string(deserializer)
878    }
879}
880#[derive(Debug, Clone, PartialEq, PartialOrd)]
881pub struct GroupsClaimStr {
882    value: String,
883}
884impl crate::types::bounded_string::BoundedString for GroupsClaimStr {
885    const MIN_LENGTH: Option<usize> = None::<usize>;
886    const MAX_LENGTH: Option<usize> = Some(256usize);
887    const DEFAULT: Option<&'static str> = None::<&'static str>;
888    const PATTERN: Option<&'static str> = Some("(?^:[A-Za-z0-9\\.\\-_]+)");
889    const TYPE_DESCRIPTION: &'static str =
890        "a string with pattern r\"(?^:[A-Za-z0-9\\.\\-_]+)\" and length at most 256";
891    fn get_value(&self) -> &str {
892        &self.value
893    }
894    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
895        Self::validate(&value)?;
896        Ok(Self { value })
897    }
898}
899impl std::convert::TryFrom<String> for GroupsClaimStr {
900    type Error = crate::types::bounded_string::BoundedStringError;
901    fn try_from(value: String) -> Result<Self, Self::Error> {
902        crate::types::bounded_string::BoundedString::new(value)
903    }
904}
905impl ::serde::Serialize for GroupsClaimStr {
906    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
907    where
908        S: ::serde::Serializer,
909    {
910        crate::types::bounded_string::serialize_bounded_string(self, serializer)
911    }
912}
913impl<'de> ::serde::Deserialize<'de> for GroupsClaimStr {
914    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
915    where
916        D: ::serde::Deserializer<'de>,
917    {
918        crate::types::bounded_string::deserialize_bounded_string(deserializer)
919    }
920}
921#[derive(Debug, Clone, PartialEq, PartialOrd)]
922pub struct IssuerUrlStr {
923    value: String,
924}
925impl crate::types::bounded_string::BoundedString for IssuerUrlStr {
926    const MIN_LENGTH: Option<usize> = None::<usize>;
927    const MAX_LENGTH: Option<usize> = Some(256usize);
928    const DEFAULT: Option<&'static str> = None::<&'static str>;
929    const PATTERN: Option<&'static str> = None::<&'static str>;
930    const TYPE_DESCRIPTION: &'static str = "a string with length at most 256";
931    fn get_value(&self) -> &str {
932        &self.value
933    }
934    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
935        Self::validate(&value)?;
936        Ok(Self { value })
937    }
938}
939impl std::convert::TryFrom<String> for IssuerUrlStr {
940    type Error = crate::types::bounded_string::BoundedStringError;
941    fn try_from(value: String) -> Result<Self, Self::Error> {
942        crate::types::bounded_string::BoundedString::new(value)
943    }
944}
945impl ::serde::Serialize for IssuerUrlStr {
946    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
947    where
948        S: ::serde::Serializer,
949    {
950        crate::types::bounded_string::serialize_bounded_string(self, serializer)
951    }
952}
953impl<'de> ::serde::Deserialize<'de> for IssuerUrlStr {
954    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
955    where
956        D: ::serde::Deserializer<'de>,
957    {
958        crate::types::bounded_string::deserialize_bounded_string(deserializer)
959    }
960}
961#[derive(Debug, Clone, PartialEq, PartialOrd)]
962pub struct PromptStr {
963    value: String,
964}
965impl crate::types::bounded_string::BoundedString for PromptStr {
966    const MIN_LENGTH: Option<usize> = None::<usize>;
967    const MAX_LENGTH: Option<usize> = None::<usize>;
968    const DEFAULT: Option<&'static str> = None::<&'static str>;
969    const PATTERN: Option<&'static str> = Some("(?:none|login|consent|select_account|\\S+)");
970    const TYPE_DESCRIPTION: &'static str = "a string with pattern r\"(?:none|login|consent|select_account|\\S+)\" and no length constraints";
971    fn get_value(&self) -> &str {
972        &self.value
973    }
974    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
975        Self::validate(&value)?;
976        Ok(Self { value })
977    }
978}
979impl std::convert::TryFrom<String> for PromptStr {
980    type Error = crate::types::bounded_string::BoundedStringError;
981    fn try_from(value: String) -> Result<Self, Self::Error> {
982        crate::types::bounded_string::BoundedString::new(value)
983    }
984}
985impl ::serde::Serialize for PromptStr {
986    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
987    where
988        S: ::serde::Serializer,
989    {
990        crate::types::bounded_string::serialize_bounded_string(self, serializer)
991    }
992}
993impl<'de> ::serde::Deserialize<'de> for PromptStr {
994    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
995    where
996        D: ::serde::Deserializer<'de>,
997    {
998        crate::types::bounded_string::deserialize_bounded_string(deserializer)
999    }
1000}
1001#[derive(Debug, Clone, PartialEq, PartialOrd)]
1002pub struct Server1Str {
1003    value: String,
1004}
1005impl crate::types::bounded_string::BoundedString for Server1Str {
1006    const MIN_LENGTH: Option<usize> = None::<usize>;
1007    const MAX_LENGTH: Option<usize> = Some(256usize);
1008    const DEFAULT: Option<&'static str> = None::<&'static str>;
1009    const PATTERN: Option<&'static str> = None::<&'static str>;
1010    const TYPE_DESCRIPTION: &'static str = "a string with length at most 256";
1011    fn get_value(&self) -> &str {
1012        &self.value
1013    }
1014    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
1015        Self::validate(&value)?;
1016        Ok(Self { value })
1017    }
1018}
1019impl std::convert::TryFrom<String> for Server1Str {
1020    type Error = crate::types::bounded_string::BoundedStringError;
1021    fn try_from(value: String) -> Result<Self, Self::Error> {
1022        crate::types::bounded_string::BoundedString::new(value)
1023    }
1024}
1025impl ::serde::Serialize for Server1Str {
1026    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1027    where
1028        S: ::serde::Serializer,
1029    {
1030        crate::types::bounded_string::serialize_bounded_string(self, serializer)
1031    }
1032}
1033impl<'de> ::serde::Deserialize<'de> for Server1Str {
1034    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1035    where
1036        D: ::serde::Deserializer<'de>,
1037    {
1038        crate::types::bounded_string::deserialize_bounded_string(deserializer)
1039    }
1040}
1041#[derive(Debug, Clone, PartialEq, PartialOrd)]
1042pub struct Server2Str {
1043    value: String,
1044}
1045impl crate::types::bounded_string::BoundedString for Server2Str {
1046    const MIN_LENGTH: Option<usize> = None::<usize>;
1047    const MAX_LENGTH: Option<usize> = Some(256usize);
1048    const DEFAULT: Option<&'static str> = None::<&'static str>;
1049    const PATTERN: Option<&'static str> = None::<&'static str>;
1050    const TYPE_DESCRIPTION: &'static str = "a string with length at most 256";
1051    fn get_value(&self) -> &str {
1052        &self.value
1053    }
1054    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
1055        Self::validate(&value)?;
1056        Ok(Self { value })
1057    }
1058}
1059impl std::convert::TryFrom<String> for Server2Str {
1060    type Error = crate::types::bounded_string::BoundedStringError;
1061    fn try_from(value: String) -> Result<Self, Self::Error> {
1062        crate::types::bounded_string::BoundedString::new(value)
1063    }
1064}
1065impl ::serde::Serialize for Server2Str {
1066    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1067    where
1068        S: ::serde::Serializer,
1069    {
1070        crate::types::bounded_string::serialize_bounded_string(self, serializer)
1071    }
1072}
1073impl<'de> ::serde::Deserialize<'de> for Server2Str {
1074    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1075    where
1076        D: ::serde::Deserializer<'de>,
1077    {
1078        crate::types::bounded_string::deserialize_bounded_string(deserializer)
1079    }
1080}
1081#[derive(Debug, Clone, PartialEq, PartialOrd)]
1082pub struct SyncAttributesStr {
1083    value: String,
1084}
1085impl crate::types::bounded_string::BoundedString for SyncAttributesStr {
1086    const MIN_LENGTH: Option<usize> = None::<usize>;
1087    const MAX_LENGTH: Option<usize> = None::<usize>;
1088    const DEFAULT: Option<&'static str> = None::<&'static str>;
1089    const PATTERN: Option<&'static str> = Some("\\w+=[^,]+(,\\s*\\w+=[^,]+)*");
1090    const TYPE_DESCRIPTION: &'static str =
1091        "a string with pattern r\"\\w+=[^,]+(,\\s*\\w+=[^,]+)*\" and no length constraints";
1092    fn get_value(&self) -> &str {
1093        &self.value
1094    }
1095    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
1096        Self::validate(&value)?;
1097        Ok(Self { value })
1098    }
1099}
1100impl std::convert::TryFrom<String> for SyncAttributesStr {
1101    type Error = crate::types::bounded_string::BoundedStringError;
1102    fn try_from(value: String) -> Result<Self, Self::Error> {
1103        crate::types::bounded_string::BoundedString::new(value)
1104    }
1105}
1106impl ::serde::Serialize for SyncAttributesStr {
1107    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1108    where
1109        S: ::serde::Serializer,
1110    {
1111        crate::types::bounded_string::serialize_bounded_string(self, serializer)
1112    }
1113}
1114impl<'de> ::serde::Deserialize<'de> for SyncAttributesStr {
1115    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1116    where
1117        D: ::serde::Deserializer<'de>,
1118    {
1119        crate::types::bounded_string::deserialize_bounded_string(deserializer)
1120    }
1121}
1122#[derive(Debug, Clone, PartialEq, PartialOrd)]
1123pub struct TfaStr {
1124    value: String,
1125}
1126impl crate::types::bounded_string::BoundedString for TfaStr {
1127    const MIN_LENGTH: Option<usize> = None::<usize>;
1128    const MAX_LENGTH: Option<usize> = Some(128usize);
1129    const DEFAULT: Option<&'static str> = None::<&'static str>;
1130    const PATTERN: Option<&'static str> = None::<&'static str>;
1131    const TYPE_DESCRIPTION: &'static str = "a string with length at most 128";
1132    fn get_value(&self) -> &str {
1133        &self.value
1134    }
1135    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
1136        Self::validate(&value)?;
1137        Ok(Self { value })
1138    }
1139}
1140impl std::convert::TryFrom<String> for TfaStr {
1141    type Error = crate::types::bounded_string::BoundedStringError;
1142    fn try_from(value: String) -> Result<Self, Self::Error> {
1143        crate::types::bounded_string::BoundedString::new(value)
1144    }
1145}
1146impl ::serde::Serialize for TfaStr {
1147    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1148    where
1149        S: ::serde::Serializer,
1150    {
1151        crate::types::bounded_string::serialize_bounded_string(self, serializer)
1152    }
1153}
1154impl<'de> ::serde::Deserialize<'de> for TfaStr {
1155    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1156    where
1157        D: ::serde::Deserializer<'de>,
1158    {
1159        crate::types::bounded_string::deserialize_bounded_string(deserializer)
1160    }
1161}
1162#[derive(Debug, Clone, PartialEq, PartialOrd)]
1163pub struct UserAttrStr {
1164    value: String,
1165}
1166impl crate::types::bounded_string::BoundedString for UserAttrStr {
1167    const MIN_LENGTH: Option<usize> = None::<usize>;
1168    const MAX_LENGTH: Option<usize> = Some(256usize);
1169    const DEFAULT: Option<&'static str> = None::<&'static str>;
1170    const PATTERN: Option<&'static str> = Some("\\S{2,}");
1171    const TYPE_DESCRIPTION: &'static str =
1172        "a string with pattern r\"\\S{2,}\" and length at most 256";
1173    fn get_value(&self) -> &str {
1174        &self.value
1175    }
1176    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
1177        Self::validate(&value)?;
1178        Ok(Self { value })
1179    }
1180}
1181impl std::convert::TryFrom<String> for UserAttrStr {
1182    type Error = crate::types::bounded_string::BoundedStringError;
1183    fn try_from(value: String) -> Result<Self, Self::Error> {
1184        crate::types::bounded_string::BoundedString::new(value)
1185    }
1186}
1187impl ::serde::Serialize for UserAttrStr {
1188    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1189    where
1190        S: ::serde::Serializer,
1191    {
1192        crate::types::bounded_string::serialize_bounded_string(self, serializer)
1193    }
1194}
1195impl<'de> ::serde::Deserialize<'de> for UserAttrStr {
1196    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
1197    where
1198        D: ::serde::Deserializer<'de>,
1199    {
1200        crate::types::bounded_string::deserialize_bounded_string(deserializer)
1201    }
1202}
1203impl<T> RealmClient<T>
1204where
1205    T: crate::client::Client,
1206{
1207    pub fn sync(&self) -> sync::SyncClient<T> {
1208        sync::SyncClient::<T>::new(self.client.clone(), &self.path)
1209    }
1210}