clerk-rs 0.4.2

The official community Rust SDK for the Clerk API
Documentation
/*
 * Clerk Backend API
 *
 * The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
 *
 * The version of the OpenAPI document: v1
 * Contact: support@clerk.com
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Domain {
	#[serde(rename = "object")]
	pub object: Object,
	#[serde(rename = "id")]
	pub id: String,
	#[serde(rename = "name")]
	pub name: String,
	#[serde(rename = "is_satellite")]
	pub is_satellite: bool,
	#[serde(rename = "frontend_api_url")]
	pub frontend_api_url: String,
	/// Null for satellite domains.
	#[serde(rename = "accounts_portal_url", skip_serializing_if = "Option::is_none")]
	pub accounts_portal_url: Option<String>,
	#[serde(rename = "proxy_url", skip_serializing_if = "Option::is_none")]
	pub proxy_url: Option<String>,
	#[serde(rename = "development_origin")]
	pub development_origin: String,
	#[serde(rename = "cname_targets", skip_serializing_if = "Option::is_none")]
	pub cname_targets: Option<Vec<crate::models::CNameTarget>>,
}

impl Domain {
	pub fn new(object: Object, id: String, name: String, is_satellite: bool, frontend_api_url: String, development_origin: String) -> Domain {
		Domain {
			object,
			id,
			name,
			is_satellite,
			frontend_api_url,
			accounts_portal_url: None,
			proxy_url: None,
			development_origin,
			cname_targets: None,
		}
	}
}

///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Object {
	#[serde(rename = "domain")]
	Domain,
}

impl Default for Object {
	fn default() -> Object {
		Self::Domain
	}
}