hatchet-sdk 0.2.8

This is an unofficial Rust SDK for Hatchet, a distributed, fault-tolerant task queue.
Documentation
/*
 * Hatchet API
 *
 * The Hatchet API
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::clients::rest::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UserUpdateLogin200Response {
    #[serde(rename = "metadata")]
    pub metadata: Box<models::V1TaskGet200ResponseMetadata>,
    /// The display name of the user.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The email address of the user.
    #[serde(rename = "email")]
    pub email: String,
    /// Whether the user has verified their email address.
    #[serde(rename = "emailVerified")]
    pub email_verified: bool,
    /// Whether the user has a password set.
    #[serde(rename = "hasPassword", skip_serializing_if = "Option::is_none")]
    pub has_password: Option<bool>,
    /// A hash of the user's email address for use with Pylon Support Chat
    #[serde(rename = "emailHash", skip_serializing_if = "Option::is_none")]
    pub email_hash: Option<String>,
}

impl UserUpdateLogin200Response {
    pub fn new(
        metadata: models::V1TaskGet200ResponseMetadata,
        email: String,
        email_verified: bool,
    ) -> UserUpdateLogin200Response {
        UserUpdateLogin200Response {
            metadata: Box::new(metadata),
            name: None,
            email,
            email_verified,
            has_password: None,
            email_hash: None,
        }
    }
}