/*
* Ory APIs
*
* # 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) |
*
* The version of the OpenAPI document: v1.22.54
* Contact: support@ory.sh
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// 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).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ElementsConfiguration {
/// The default redirect URL.
#[serde(rename = "default_redirect_url")]
pub default_redirect_url: String,
/// The URL for the error UI.
#[serde(rename = "error_ui_url")]
pub error_ui_url: String,
/// Whether to hide the Ory branding badge.
#[serde(rename = "hide_ory_branding")]
pub hide_ory_branding: bool,
/// Whether to hide the \"Sign up\" link on the login card footer.
#[serde(rename = "hide_registration_link")]
pub hide_registration_link: bool,
/// The URL for the login UI.
#[serde(rename = "login_ui_url")]
pub login_ui_url: String,
/// The URL for the dark logo.
#[serde(rename = "logo_dark_url", skip_serializing_if = "Option::is_none")]
pub logo_dark_url: Option<String>,
/// The URL for the light logo on the auth card.
#[serde(rename = "logo_light_url", skip_serializing_if = "Option::is_none")]
pub logo_light_url: Option<String>,
/// The name of the project displayed on the auth card.
#[serde(rename = "name")]
pub name: String,
/// Whether recovery is enabled.
#[serde(rename = "recovery_enabled")]
pub recovery_enabled: bool,
/// The URL for the recovery UI.
#[serde(rename = "recovery_ui_url")]
pub recovery_ui_url: String,
/// Whether registration is enabled.
#[serde(rename = "registration_enabled")]
pub registration_enabled: bool,
/// The URL for the registration UI.
#[serde(rename = "registration_ui_url")]
pub registration_ui_url: String,
/// The URL for the settings UI.
#[serde(rename = "settings_ui_url")]
pub settings_ui_url: String,
/// Whether verification is enabled.
#[serde(rename = "verification_enabled")]
pub verification_enabled: bool,
/// The URL for the verification UI.
#[serde(rename = "verification_ui_url")]
pub verification_ui_url: String,
}
impl 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).
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 {
ElementsConfiguration {
default_redirect_url,
error_ui_url,
hide_ory_branding,
hide_registration_link,
login_ui_url,
logo_dark_url: None,
logo_light_url: None,
name,
recovery_enabled,
recovery_ui_url,
registration_enabled,
registration_ui_url,
settings_ui_url,
verification_enabled,
verification_ui_url,
}
}
}