ory_client/models/verifiable_identity_address.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/// VerifiableIdentityAddress : VerifiableAddress is an identity's verifiable address
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct VerifiableIdentityAddress {
17 /// When this entry was created
18 #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
19 pub created_at: Option<String>,
20 /// The ID
21 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
22 pub id: Option<String>,
23 /// VerifiableAddressStatus must not exceed 16 characters as that is the limitation in the SQL Schema
24 #[serde(rename = "status")]
25 pub status: String,
26 /// When this entry was last updated
27 #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
28 pub updated_at: Option<String>,
29 /// The address value example foo@user.com
30 #[serde(rename = "value")]
31 pub value: String,
32 /// Indicates if the address has already been verified
33 #[serde(rename = "verified")]
34 pub verified: bool,
35 #[serde(rename = "verified_at", skip_serializing_if = "Option::is_none")]
36 pub verified_at: Option<String>,
37 /// The delivery method
38 #[serde(rename = "via")]
39 pub via: ViaEnum,
40}
41
42impl VerifiableIdentityAddress {
43 /// VerifiableAddress is an identity's verifiable address
44 pub fn new(status: String, value: String, verified: bool, via: ViaEnum) -> VerifiableIdentityAddress {
45 VerifiableIdentityAddress {
46 created_at: None,
47 id: None,
48 status,
49 updated_at: None,
50 value,
51 verified,
52 verified_at: None,
53 via,
54 }
55 }
56}
57/// The delivery method
58#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
59pub enum ViaEnum {
60 #[serde(rename = "email")]
61 Email,
62 #[serde(rename = "sms")]
63 Sms,
64}
65
66impl Default for ViaEnum {
67 fn default() -> ViaEnum {
68 Self::Email
69 }
70}
71