ory_client/models/workspace_organization.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.38
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WorkspaceOrganization {
16 #[serde(rename = "active_link", skip_serializing_if = "Option::is_none")]
17 pub active_link: Option<Box<models::OnboardingPortalLink>>,
18 #[serde(rename = "created_at")]
19 pub created_at: String,
20 /// DefaultRegion sets the default region for identities provisioned into this organization, when the identity does not specify a region explictly. eu-central EUCentral asia-northeast AsiaNorthEast us-east USEast us-west USWest eu EU asia Asia us US global Global
21 #[serde(rename = "default_region", skip_serializing_if = "Option::is_none")]
22 pub default_region: Option<DefaultRegionEnum>,
23 /// The list of organization's domains.
24 #[serde(rename = "domains")]
25 pub domains: Vec<String>,
26 /// The organization's ID.
27 #[serde(rename = "id")]
28 pub id: String,
29 /// The organization's human-readable label.
30 #[serde(rename = "label")]
31 pub label: String,
32 #[serde(rename = "providers")]
33 pub providers: Vec<String>,
34}
35
36impl WorkspaceOrganization {
37 pub fn new(created_at: String, domains: Vec<String>, id: String, label: String, providers: Vec<String>) -> WorkspaceOrganization {
38 WorkspaceOrganization {
39 active_link: None,
40 created_at,
41 default_region: None,
42 domains,
43 id,
44 label,
45 providers,
46 }
47 }
48}
49/// DefaultRegion sets the default region for identities provisioned into this organization, when the identity does not specify a region explictly. eu-central EUCentral asia-northeast AsiaNorthEast us-east USEast us-west USWest eu EU asia Asia us US global Global
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
51pub enum DefaultRegionEnum {
52 #[serde(rename = "eu-central")]
53 EuCentral,
54 #[serde(rename = "asia-northeast")]
55 AsiaNortheast,
56 #[serde(rename = "us-east")]
57 UsEast,
58 #[serde(rename = "us-west")]
59 UsWest,
60 #[serde(rename = "eu")]
61 Eu,
62 #[serde(rename = "asia")]
63 Asia,
64 #[serde(rename = "us")]
65 Us,
66 #[serde(rename = "global")]
67 Global,
68}
69
70impl Default for DefaultRegionEnum {
71 fn default() -> DefaultRegionEnum {
72 Self::EuCentral
73 }
74}
75