ory_client/models/
normalized_project_revision_tokenizer_template.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.21
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 NormalizedProjectRevisionTokenizerTemplate {
16    /// Claims mapper URL
17    #[serde(rename = "claims_mapper_url", skip_serializing_if = "Option::is_none")]
18    pub claims_mapper_url: Option<String>,
19    /// The Project's Revision Creation Date
20    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
21    pub created_at: Option<String>,
22    /// The revision ID.
23    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
24    pub id: Option<String>,
25    /// JSON Web Key URL
26    #[serde(rename = "jwks_url", skip_serializing_if = "Option::is_none")]
27    pub jwks_url: Option<String>,
28    /// The unique key of the template
29    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
30    pub key: Option<String>,
31    /// The Revision's ID this schema belongs to
32    #[serde(rename = "project_revision_id", skip_serializing_if = "Option::is_none")]
33    pub project_revision_id: Option<String>,
34    /// Subject source for the tokenizer  Can be either id or external_id or empty
35    #[serde(rename = "subject_source", skip_serializing_if = "Option::is_none")]
36    pub subject_source: Option<SubjectSourceEnum>,
37    /// Token time to live
38    #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")]
39    pub ttl: Option<String>,
40    /// Last Time Project's Revision was Updated
41    #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
42    pub updated_at: Option<String>,
43}
44
45impl NormalizedProjectRevisionTokenizerTemplate {
46    pub fn new() -> NormalizedProjectRevisionTokenizerTemplate {
47        NormalizedProjectRevisionTokenizerTemplate {
48            claims_mapper_url: None,
49            created_at: None,
50            id: None,
51            jwks_url: None,
52            key: None,
53            project_revision_id: None,
54            subject_source: None,
55            ttl: None,
56            updated_at: None,
57        }
58    }
59}
60/// Subject source for the tokenizer  Can be either id or external_id or empty
61#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
62pub enum SubjectSourceEnum {
63    #[serde(rename = "id")]
64    Id,
65    #[serde(rename = "external_id")]
66    ExternalId,
67}
68
69impl Default for SubjectSourceEnum {
70    fn default() -> SubjectSourceEnum {
71        Self::Id
72    }
73}
74