/* Options: Date: 2026-09-01 21:28:43 Version: 10.09 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateChinookEmployee.* //ExcludeTypes: //DefaultImports: serde::{Deserialize, Serialize},serde_json::Value,std::collections::HashMap */ #![allow( dead_code, non_camel_case_types, non_snake_case, clippy::upper_case_acronyms )] use serde::{Deserialize, Serialize}; use serde_json::Value; use servicestack::*; use std::collections::HashMap; #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct Employees { #[serde(rename = "employeeId")] pub employee_id: i64, // Required #[serde(rename = "lastName")] pub last_name: String, // Required #[serde(rename = "firstName")] pub first_name: String, pub title: String, #[serde(rename = "reportsTo")] #[serde(default, skip_serializing_if = "Option::is_none")] pub reports_to: Option, #[serde(rename = "birthDate")] #[serde(default, skip_serializing_if = "Option::is_none")] pub birth_date: Option, #[serde(rename = "hireDate")] #[serde(default, skip_serializing_if = "Option::is_none")] pub hire_date: Option, pub address: String, pub city: String, pub state: String, pub country: String, #[serde(rename = "postalCode")] pub postal_code: String, pub phone: String, pub fax: String, pub email: String, } // Route("/employees", "POST") #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct CreateChinookEmployee { #[serde(rename = "lastName")] pub last_name: String, #[serde(rename = "firstName")] pub first_name: String, pub title: String, #[serde(rename = "reportsTo")] #[serde(default, skip_serializing_if = "Option::is_none")] pub reports_to: Option, #[serde(rename = "birthDate")] #[serde(default, skip_serializing_if = "Option::is_none")] pub birth_date: Option, #[serde(rename = "hireDate")] #[serde(default, skip_serializing_if = "Option::is_none")] pub hire_date: Option, pub address: String, pub city: String, pub state: String, pub country: String, #[serde(rename = "postalCode")] pub postal_code: String, pub phone: String, pub fax: String, pub email: String, } impl IRequest for CreateChinookEmployee { const NAME: &'static str = "CreateChinookEmployee"; const VERB: &'static str = "POST"; } impl IReturn for CreateChinookEmployee { type Response = IdResponse; }