p7m_appointment/models/answer_option.rs
1/*
2 * Appointments Backend
3 *
4 * # API for appointment scheduling related data This is the API of the service at P7M that manages the scheduling and management of appointments. It is used by the booking widget (see the **WidgetApi** tag) with functions that are public and don't require the user to be authenticated. For endpoints in other tags the caller has to be authenticated with the system and provide a JWT token in the Authorization header of the HTTP request. When using the API you typically get this token by authenticating first with OAuth 2.0. When you are trying this API using the Swagger interface, you need to click the `Authorize` button and then again the Authorize button in the pop-up that gets opened.
5 *
6 * The version of the OpenAPI document: 0.13.5
7 * Contact: tech@p7m.de
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AnswerOption {
16 /// The text shown to the patient as possible answer option
17 #[serde(rename = "answer")]
18 pub answer: String,
19 /// Short form of the answer shown in the calendar
20 #[serde(rename = "shorthand")]
21 pub shorthand: String,
22 /// Tags to automatically add to the reservation, if this answer is selected by the patient
23 #[serde(rename = "tags")]
24 pub tags: Vec<uuid::Uuid>,
25}
26
27impl AnswerOption {
28 pub fn new(answer: String, shorthand: String, tags: Vec<uuid::Uuid>) -> AnswerOption {
29 AnswerOption {
30 answer,
31 shorthand,
32 tags,
33 }
34 }
35}
36