clerk_rs/models/
create_email_address_request.rs

1/*
2 * Clerk Backend API
3 *
4 * The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: support@clerk.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct CreateEmailAddressRequest {
13	/// The ID representing the user
14	#[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
15	pub user_id: Option<String>,
16	/// The new email address. Must adhere to the RFC 5322 specification for email address format.
17	#[serde(rename = "email_address", skip_serializing_if = "Option::is_none")]
18	pub email_address: Option<String>,
19	/// When created, the email address will be marked as verified.
20	#[serde(
21		rename = "verified",
22		default,
23		with = "::serde_with::rust::double_option",
24		skip_serializing_if = "Option::is_none"
25	)]
26	pub verified: Option<Option<bool>>,
27	/// Create this email address as the primary email address for the user. Default: false, unless it is the first email address.
28	#[serde(
29		rename = "primary",
30		default,
31		with = "::serde_with::rust::double_option",
32		skip_serializing_if = "Option::is_none"
33	)]
34	pub primary: Option<Option<bool>>,
35}
36
37impl CreateEmailAddressRequest {
38	pub fn new() -> CreateEmailAddressRequest {
39		CreateEmailAddressRequest {
40			user_id: None,
41			email_address: None,
42			verified: None,
43			primary: None,
44		}
45	}
46}