fhirbolt_model/generated/r4b/types/
date_time.rs1#[doc = "Base StructureDefinition for dateTime Type: A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates."]
3#[derive(Debug, Clone, PartialEq)]
4pub struct DateTime {
5 #[doc = "unique id for the element within a resource (for internal references)"]
6 pub r#id: Option<std::string::String>,
7 #[doc = "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
8 pub r#extension: Vec<super::super::types::Extension>,
9 #[doc = "The actual value"]
10 pub r#value: Option<std::string::String>,
11}
12#[allow(clippy::derivable_impls)]
13impl Default for DateTime {
14 fn default() -> Self {
15 Self {
16 r#id: Default::default(),
17 r#extension: Default::default(),
18 r#value: Default::default(),
19 }
20 }
21}
22impl<I: Into<std::string::String>> From<I> for DateTime {
23 fn from(v: I) -> Self {
24 DateTime {
25 value: Some(v.into()),
26 ..Default::default()
27 }
28 }
29}