ory_client_client/models/create_identity.rs
1/*
2 * Ory APIs
3 *
4 * 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.
5 *
6 * The version of the OpenAPI document: v0.0.1-alpha.1
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CreateIdentity {
16 /// SchemaID is the ID of the JSON Schema to be used for validating the identity's traits.
17 #[serde(rename = "schema_id")]
18 pub schema_id: String,
19 /// Traits represent an identity's traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_url`.
20 #[serde(rename = "traits")]
21 pub traits: serde_json::Value,
22}
23
24impl CreateIdentity {
25 pub fn new(schema_id: String, traits: serde_json::Value) -> CreateIdentity {
26 CreateIdentity {
27 schema_id,
28 traits,
29 }
30 }
31}
32
33