about summary refs log tree commit diff stats
path: root/crates/rocie-client/src/models/user_stub.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rocie-client/src/models/user_stub.rs')
-rw-r--r--crates/rocie-client/src/models/user_stub.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/crates/rocie-client/src/models/user_stub.rs b/crates/rocie-client/src/models/user_stub.rs
new file mode 100644
index 0000000..8f620db
--- /dev/null
+++ b/crates/rocie-client/src/models/user_stub.rs
@@ -0,0 +1,36 @@
+/*
+ * rocie-server
+ *
+ * An enterprise grocery management system - server
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: benedikt.peetz@b-peetz.de
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct UserStub {
+    /// An optional description of the new user.
+    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
+    pub description: Option<String>,
+    /// The name of the new user.
+    #[serde(rename = "name")]
+    pub name: String,
+    /// The password of the new user.
+    #[serde(rename = "password")]
+    pub password: String,
+}
+
+impl UserStub {
+    pub fn new(name: String, password: String) -> UserStub {
+        UserStub {
+            description: None,
+            name,
+            password,
+        }
+    }
+}
+