Skip to main content

ory_client/models/
elements_configuration.rs

1/*
2 * Ory APIs
3 *
4 * # Introduction Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.  ## SDKs This document describes the APIs available in the Ory Network. The APIs are available as SDKs for the following languages:  | Language       | Download SDK                                                     | Documentation                                                                        | | -------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | Dart           | [pub.dev](https://pub.dev/packages/ory_client)                   | [README](https://github.com/ory/sdk/blob/master/clients/client/dart/README.md)       | | .NET           | [nuget.org](https://www.nuget.org/packages/Ory.Client/)          | [README](https://github.com/ory/sdk/blob/master/clients/client/dotnet/README.md)     | | Elixir         | [hex.pm](https://hex.pm/packages/ory_client)                     | [README](https://github.com/ory/sdk/blob/master/clients/client/elixir/README.md)     | | Go             | [github.com](https://github.com/ory/client-go)                   | [README](https://github.com/ory/sdk/blob/master/clients/client/go/README.md)         | | Java           | [maven.org](https://search.maven.org/artifact/sh.ory/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/java/README.md)       | | JavaScript     | [npmjs.com](https://www.npmjs.com/package/@ory/client)           | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript/README.md) | | JavaScript (With fetch) | [npmjs.com](https://www.npmjs.com/package/@ory/client-fetch)           | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript-fetch/README.md) |  | PHP            | [packagist.org](https://packagist.org/packages/ory/client)       | [README](https://github.com/ory/sdk/blob/master/clients/client/php/README.md)        | | Python         | [pypi.org](https://pypi.org/project/ory-client/)                 | [README](https://github.com/ory/sdk/blob/master/clients/client/python/README.md)     | | Ruby           | [rubygems.org](https://rubygems.org/gems/ory-client)             | [README](https://github.com/ory/sdk/blob/master/clients/client/ruby/README.md)       | | Rust           | [crates.io](https://crates.io/crates/ory-client)                 | [README](https://github.com/ory/sdk/blob/master/clients/client/rust/README.md)       | 
5 *
6 * The version of the OpenAPI document: v1.22.93
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ElementsConfiguration : ElementsConfiguration is the subset of a project's configuration that Ory Elements consumes to customize its behavior and appearance. It mirrors the `ProjectConfiguration` type in `@ory/elements-react` and intentionally omits account-experience-only fields (stylesheet, locales, translations, favicons).
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ElementsConfiguration {
17    /// The URL to the project's Contact page.
18    #[serde(rename = "contact_url", skip_serializing_if = "Option::is_none")]
19    pub contact_url: Option<String>,
20    /// The default redirect URL.
21    #[serde(rename = "default_redirect_url")]
22    pub default_redirect_url: String,
23    /// The URL for the error UI.
24    #[serde(rename = "error_ui_url")]
25    pub error_ui_url: String,
26    /// Whether to hide the Ory branding badge.
27    #[serde(rename = "hide_ory_branding")]
28    pub hide_ory_branding: bool,
29    /// Whether to hide the \"Sign up\" link on the login card footer.
30    #[serde(rename = "hide_registration_link")]
31    pub hide_registration_link: bool,
32    /// The URL for the login UI.
33    #[serde(rename = "login_ui_url")]
34    pub login_ui_url: String,
35    /// The URL for the dark logo.
36    #[serde(rename = "logo_dark_url", skip_serializing_if = "Option::is_none")]
37    pub logo_dark_url: Option<String>,
38    /// The URL for the light logo on the auth card.
39    #[serde(rename = "logo_light_url", skip_serializing_if = "Option::is_none")]
40    pub logo_light_url: Option<String>,
41    /// The name of the project displayed on the auth card.
42    #[serde(rename = "name")]
43    pub name: String,
44    /// The URL to the project's Privacy Policy page.
45    #[serde(rename = "privacy_policy_url", skip_serializing_if = "Option::is_none")]
46    pub privacy_policy_url: Option<String>,
47    /// Whether recovery is enabled.
48    #[serde(rename = "recovery_enabled")]
49    pub recovery_enabled: bool,
50    /// The URL for the recovery UI.
51    #[serde(rename = "recovery_ui_url")]
52    pub recovery_ui_url: String,
53    /// Whether registration is enabled.
54    #[serde(rename = "registration_enabled")]
55    pub registration_enabled: bool,
56    /// The URL for the registration UI.
57    #[serde(rename = "registration_ui_url")]
58    pub registration_ui_url: String,
59    /// The URL for the settings UI.
60    #[serde(rename = "settings_ui_url")]
61    pub settings_ui_url: String,
62    /// The URL to the project's Terms of Service page.
63    #[serde(rename = "terms_of_service_url", skip_serializing_if = "Option::is_none")]
64    pub terms_of_service_url: Option<String>,
65    /// Whether verification is enabled.
66    #[serde(rename = "verification_enabled")]
67    pub verification_enabled: bool,
68    /// The URL for the verification UI.
69    #[serde(rename = "verification_ui_url")]
70    pub verification_ui_url: String,
71}
72
73impl ElementsConfiguration {
74    /// ElementsConfiguration is the subset of a project's configuration that Ory Elements consumes to customize its behavior and appearance. It mirrors the `ProjectConfiguration` type in `@ory/elements-react` and intentionally omits account-experience-only fields (stylesheet, locales, translations, favicons).
75    pub fn new(default_redirect_url: String, error_ui_url: String, hide_ory_branding: bool, hide_registration_link: bool, login_ui_url: String, name: String, recovery_enabled: bool, recovery_ui_url: String, registration_enabled: bool, registration_ui_url: String, settings_ui_url: String, verification_enabled: bool, verification_ui_url: String) -> ElementsConfiguration {
76        ElementsConfiguration {
77            contact_url: None,
78            default_redirect_url,
79            error_ui_url,
80            hide_ory_branding,
81            hide_registration_link,
82            login_ui_url,
83            logo_dark_url: None,
84            logo_light_url: None,
85            name,
86            privacy_policy_url: None,
87            recovery_enabled,
88            recovery_ui_url,
89            registration_enabled,
90            registration_ui_url,
91            settings_ui_url,
92            terms_of_service_url: None,
93            verification_enabled,
94            verification_ui_url,
95        }
96    }
97}
98