/// The identifier for the account the payment will be applied to.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccountIdProp")]
pub enum AccountIdProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AccountIdProp")]
impl TryFrom<SchemaValue> for AccountIdProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccountIdProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccountIdProp")]
impl TryFrom<&SchemaValue> for AccountIdProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccountIdProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The type or material of the interior of the vehicle (e.g. synthetic fabric, leather, wood, etc.). While most interior types are characterized by the material used, an interior type can also be based on vehicle usage or target audience.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VehicleInteriorTypeProp")]
pub enum VehicleInteriorTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VehicleInteriorTypeProp")]
impl TryFrom<SchemaValue> for VehicleInteriorTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleInteriorTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VehicleInteriorTypeProp")]
impl TryFrom<&SchemaValue> for VehicleInteriorTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleInteriorTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of recipient. The recipient who was directly sent the message.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ToRecipientProp")]
pub enum ToRecipientProp {
Audience(Audience),
Person(Person),
ContactPoint(ContactPoint),
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "ToRecipientProp")]
impl TryFrom<SchemaValue> for ToRecipientProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ToRecipientProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(ToRecipientProp::Audience(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ToRecipientProp::Person(object)) }
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ToRecipientProp::ContactPoint(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ToRecipientProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ToRecipientProp")]
impl TryFrom<&SchemaValue> for ToRecipientProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ToRecipientProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(ToRecipientProp::Audience(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ToRecipientProp::Person(object)) }
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ToRecipientProp::ContactPoint(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ToRecipientProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Format of this release (the type of recording media used, i.e. compact disc, digital media, LP, etc.).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MusicReleaseFormatProp")]
pub enum MusicReleaseFormatProp {
MusicReleaseFormatType(MusicReleaseFormatType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MusicReleaseFormatProp")]
impl TryFrom<SchemaValue> for MusicReleaseFormatProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicReleaseFormatProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicReleaseFormatType::try_from(v.clone()) { return Ok(MusicReleaseFormatProp::MusicReleaseFormatType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MusicReleaseFormatProp")]
impl TryFrom<&SchemaValue> for MusicReleaseFormatProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicReleaseFormatProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicReleaseFormatType::try_from(v.clone()) { return Ok(MusicReleaseFormatProp::MusicReleaseFormatType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// What type of code sample: full (compile ready) solution, code snippet, inline code, scripts, template.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SampleTypeProp")]
pub enum SampleTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SampleTypeProp")]
impl TryFrom<SchemaValue> for SampleTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SampleTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SampleTypeProp")]
impl TryFrom<&SchemaValue> for SampleTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SampleTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date that this organization was founded.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FoundingDateProp")]
pub enum FoundingDateProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "FoundingDateProp")]
impl TryFrom<SchemaValue> for FoundingDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoundingDateProp::Text(v)),
SchemaValue::Date(v) => Ok(FoundingDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FoundingDateProp")]
impl TryFrom<&SchemaValue> for FoundingDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoundingDateProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(FoundingDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of milligrams of cholesterol.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CholesterolContentProp")]
pub enum CholesterolContentProp {
Mass(Mass),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CholesterolContentProp")]
impl TryFrom<SchemaValue> for CholesterolContentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CholesterolContentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(CholesterolContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CholesterolContentProp")]
impl TryFrom<&SchemaValue> for CholesterolContentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CholesterolContentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(CholesterolContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Given name. In the U.S., the first name of a Person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GivenNameProp")]
pub enum GivenNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GivenNameProp")]
impl TryFrom<SchemaValue> for GivenNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GivenNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GivenNameProp")]
impl TryFrom<&SchemaValue> for GivenNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GivenNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A URL to a map of the place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MapsProp")]
pub enum MapsProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "MapsProp")]
impl TryFrom<SchemaValue> for MapsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MapsProp::Text(v)),
SchemaValue::Url(v) => Ok(MapsProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MapsProp")]
impl TryFrom<&SchemaValue> for MapsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MapsProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(MapsProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The volume swept by all of the pistons inside the cylinders of an internal combustion engine in a single movement.
///
/// Typical unit code(s): CMQ for cubic centimeter, LTR for liters, INQ for cubic inches
/// * Note 1: You can link to information about how the given value has been determined using the [valueReference] property.
/// * Note 2: You can use [minValue] and [maxValue] to indicate ranges.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EngineDisplacementProp")]
pub enum EngineDisplacementProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EngineDisplacementProp")]
impl TryFrom<SchemaValue> for EngineDisplacementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EngineDisplacementProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(EngineDisplacementProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EngineDisplacementProp")]
impl TryFrom<&SchemaValue> for EngineDisplacementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EngineDisplacementProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(EngineDisplacementProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Organizations that the person works for.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WorksForProp")]
pub enum WorksForProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WorksForProp")]
impl TryFrom<SchemaValue> for WorksForProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorksForProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(WorksForProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WorksForProp")]
impl TryFrom<&SchemaValue> for WorksForProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorksForProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(WorksForProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The substage, e.g. 'a' for Stage IIIa.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SubStageSuffixProp")]
pub enum SubStageSuffixProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SubStageSuffixProp")]
impl TryFrom<SchemaValue> for SubStageSuffixProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubStageSuffixProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SubStageSuffixProp")]
impl TryFrom<&SchemaValue> for SubStageSuffixProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubStageSuffixProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An organization that the person is an alumni of.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlumniOfProp")]
pub enum AlumniOfProp {
EducationalOrganization(EducationalOrganization),
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "AlumniOfProp")]
impl TryFrom<SchemaValue> for AlumniOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlumniOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOrganization::try_from(v.clone()) { return Ok(AlumniOfProp::EducationalOrganization(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AlumniOfProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlumniOfProp")]
impl TryFrom<&SchemaValue> for AlumniOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlumniOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOrganization::try_from(v.clone()) { return Ok(AlumniOfProp::EducationalOrganization(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AlumniOfProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The frequency used for over-the-air broadcasts. Numeric values or simple ranges, e.g. 87-99. In addition a shortcut idiom is supported for frequences of AM and FM radio channels, e.g. "87 FM".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BroadcastFrequencyProp")]
pub enum BroadcastFrequencyProp {
Text(String),
BroadcastFrequencySpecification(BroadcastFrequencySpecification),
}
#[automatically_derived]
#[cfg(feature = "BroadcastFrequencyProp")]
impl TryFrom<SchemaValue> for BroadcastFrequencyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastFrequencyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BroadcastFrequencySpecification::try_from(v.clone()) { return Ok(BroadcastFrequencyProp::BroadcastFrequencySpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BroadcastFrequencyProp")]
impl TryFrom<&SchemaValue> for BroadcastFrequencyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastFrequencyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BroadcastFrequencySpecification::try_from(v.clone()) { return Ok(BroadcastFrequencyProp::BroadcastFrequencySpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The actual infectious agent, such as a specific bacterium.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InfectiousAgentProp")]
pub enum InfectiousAgentProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InfectiousAgentProp")]
impl TryFrom<SchemaValue> for InfectiousAgentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InfectiousAgentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InfectiousAgentProp")]
impl TryFrom<&SchemaValue> for InfectiousAgentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InfectiousAgentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The actual body of the review.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReviewBodyProp")]
pub enum ReviewBodyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReviewBodyProp")]
impl TryFrom<SchemaValue> for ReviewBodyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewBodyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReviewBodyProp")]
impl TryFrom<&SchemaValue> for ReviewBodyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewBodyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Specifies either a fixed return date or the number of days (from the delivery date) that a product can be returned. Used when the [returnPolicyCategory] property is specified as [MerchantReturnFiniteReturnWindow].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MerchantReturnDaysProp")]
pub enum MerchantReturnDaysProp {
DateTime(String),
Date(String),
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MerchantReturnDaysProp")]
impl TryFrom<SchemaValue> for MerchantReturnDaysProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(MerchantReturnDaysProp::DateTime(v)),
SchemaValue::Date(v) => Ok(MerchantReturnDaysProp::Date(v)),
SchemaValue::Integer(v) => Ok(MerchantReturnDaysProp::Integer(v)),
SchemaValue::Text(v) => Ok(MerchantReturnDaysProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MerchantReturnDaysProp")]
impl TryFrom<&SchemaValue> for MerchantReturnDaysProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(MerchantReturnDaysProp::DateTime(v.clone())),
SchemaValue::Date(v) => Ok(MerchantReturnDaysProp::Date(v.clone())),
SchemaValue::Integer(v) => Ok(MerchantReturnDaysProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(MerchantReturnDaysProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The status of the study (enumerated).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StatusProp")]
pub enum StatusProp {
EventStatusType(EventStatusType),
Text(String),
MedicalStudyStatus(MedicalStudyStatus),
}
#[automatically_derived]
#[cfg(feature = "StatusProp")]
impl TryFrom<SchemaValue> for StatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EventStatusType::try_from(v.clone()) { return Ok(StatusProp::EventStatusType(object)) }
if let Ok(object) = MedicalStudyStatus::try_from(v.clone()) { return Ok(StatusProp::MedicalStudyStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StatusProp")]
impl TryFrom<&SchemaValue> for StatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EventStatusType::try_from(v.clone()) { return Ok(StatusProp::EventStatusType(object)) }
if let Ok(object) = MedicalStudyStatus::try_from(v.clone()) { return Ok(StatusProp::MedicalStudyStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The medical conditions, treatments, etc. that are the subject of the guideline.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GuidelineSubjectProp")]
pub enum GuidelineSubjectProp {
Text(String),
MedicalEntity(MedicalEntity),
}
#[automatically_derived]
#[cfg(feature = "GuidelineSubjectProp")]
impl TryFrom<SchemaValue> for GuidelineSubjectProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GuidelineSubjectProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(GuidelineSubjectProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GuidelineSubjectProp")]
impl TryFrom<&SchemaValue> for GuidelineSubjectProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GuidelineSubjectProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(GuidelineSubjectProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of items in the [Collection].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CollectionSizeProp")]
pub enum CollectionSizeProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "CollectionSizeProp")]
impl TryFrom<SchemaValue> for CollectionSizeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CollectionSizeProp::Text(v)),
SchemaValue::Integer(v) => Ok(CollectionSizeProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CollectionSizeProp")]
impl TryFrom<&SchemaValue> for CollectionSizeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CollectionSizeProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(CollectionSizeProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The location(s) applicants can apply from. This is usually used for telecommuting jobs where the applicant does not need to be in a physical office. Note: This should not be used for citizenship or work visa requirements.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ApplicantLocationRequirementsProp")]
pub enum ApplicantLocationRequirementsProp {
Text(String),
AdministrativeArea(AdministrativeArea),
}
#[automatically_derived]
#[cfg(feature = "ApplicantLocationRequirementsProp")]
impl TryFrom<SchemaValue> for ApplicantLocationRequirementsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicantLocationRequirementsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(ApplicantLocationRequirementsProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ApplicantLocationRequirementsProp")]
impl TryFrom<&SchemaValue> for ApplicantLocationRequirementsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicantLocationRequirementsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(ApplicantLocationRequirementsProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The tangible thing generated by the service, e.g. a passport, permit, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServiceOutputProp")]
pub enum ServiceOutputProp {
Text(String),
Thing(Thing),
}
#[automatically_derived]
#[cfg(feature = "ServiceOutputProp")]
impl TryFrom<SchemaValue> for ServiceOutputProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceOutputProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ServiceOutputProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServiceOutputProp")]
impl TryFrom<&SchemaValue> for ServiceOutputProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceOutputProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ServiceOutputProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The publishingPrinciples property indicates (typically via [URL]) a document describing the editorial principles of an [Organization] (or individual, e.g. a [Person] writing a blog) that relate to their activities as a publisher, e.g. ethics or diversity policies. When applied to a [CreativeWork] (e.g. [NewsArticle]) the principles are those of the party primarily responsible for the creation of the [CreativeWork].
///
/// While such policies are most typically expressed in natural language, sometimes related information (e.g. indicating a [funder]) can be expressed using schema.org terminology.
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PublishingPrinciplesProp")]
pub enum PublishingPrinciplesProp {
Text(String),
CreativeWork(CreativeWork),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "PublishingPrinciplesProp")]
impl TryFrom<SchemaValue> for PublishingPrinciplesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublishingPrinciplesProp::Text(v)),
SchemaValue::Url(v) => Ok(PublishingPrinciplesProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(PublishingPrinciplesProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PublishingPrinciplesProp")]
impl TryFrom<&SchemaValue> for PublishingPrinciplesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublishingPrinciplesProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(PublishingPrinciplesProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(PublishingPrinciplesProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Alumni of an organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlumniProp")]
pub enum AlumniProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "AlumniProp")]
impl TryFrom<SchemaValue> for AlumniProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlumniProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AlumniProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlumniProp")]
impl TryFrom<&SchemaValue> for AlumniProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlumniProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AlumniProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The CO2 emissions in g/km. When used in combination with a QuantitativeValue, put "g/km" into the unitText property of that value, since there is no UN/CEFACT Common Code for "g/km".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EmissionsCO2Prop")]
pub enum EmissionsCO2Prop {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EmissionsCO2Prop")]
impl TryFrom<SchemaValue> for EmissionsCO2Prop {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(EmissionsCO2Prop::Number(v)),
SchemaValue::Text(v) => Ok(EmissionsCO2Prop::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EmissionsCO2Prop")]
impl TryFrom<&SchemaValue> for EmissionsCO2Prop {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(EmissionsCO2Prop::Number(v.clone())),
SchemaValue::Text(v) => Ok(EmissionsCO2Prop::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The current status of the reservation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReservationStatusProp")]
pub enum ReservationStatusProp {
ReservationStatusType(ReservationStatusType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReservationStatusProp")]
impl TryFrom<SchemaValue> for ReservationStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReservationStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReservationStatusType::try_from(v.clone()) { return Ok(ReservationStatusProp::ReservationStatusType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReservationStatusProp")]
impl TryFrom<&SchemaValue> for ReservationStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReservationStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReservationStatusType::try_from(v.clone()) { return Ok(ReservationStatusProp::ReservationStatusType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The place where the item (typically [Product]) was last processed and tested before importation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CountryOfLastProcessingProp")]
pub enum CountryOfLastProcessingProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CountryOfLastProcessingProp")]
impl TryFrom<SchemaValue> for CountryOfLastProcessingProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CountryOfLastProcessingProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CountryOfLastProcessingProp")]
impl TryFrom<&SchemaValue> for CountryOfLastProcessingProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CountryOfLastProcessingProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The type of return fees if the product is returned due to customer remorse.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CustomerRemorseReturnFeesProp")]
pub enum CustomerRemorseReturnFeesProp {
ReturnFeesEnumeration(ReturnFeesEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CustomerRemorseReturnFeesProp")]
impl TryFrom<SchemaValue> for CustomerRemorseReturnFeesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CustomerRemorseReturnFeesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnFeesEnumeration::try_from(v.clone()) { return Ok(CustomerRemorseReturnFeesProp::ReturnFeesEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CustomerRemorseReturnFeesProp")]
impl TryFrom<&SchemaValue> for CustomerRemorseReturnFeesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CustomerRemorseReturnFeesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnFeesEnumeration::try_from(v.clone()) { return Ok(CustomerRemorseReturnFeesProp::ReturnFeesEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A medical service available from this provider.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailableServiceProp")]
pub enum AvailableServiceProp {
MedicalTherapy(MedicalTherapy),
Text(String),
MedicalProcedure(MedicalProcedure),
MedicalTest(MedicalTest),
}
#[automatically_derived]
#[cfg(feature = "AvailableServiceProp")]
impl TryFrom<SchemaValue> for AvailableServiceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableServiceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(AvailableServiceProp::MedicalTherapy(object)) }
if let Ok(object) = MedicalProcedure::try_from(v.clone()) { return Ok(AvailableServiceProp::MedicalProcedure(object)) }
if let Ok(object) = MedicalTest::try_from(v.clone()) { return Ok(AvailableServiceProp::MedicalTest(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailableServiceProp")]
impl TryFrom<&SchemaValue> for AvailableServiceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableServiceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(AvailableServiceProp::MedicalTherapy(object)) }
if let Ok(object) = MedicalProcedure::try_from(v.clone()) { return Ok(AvailableServiceProp::MedicalProcedure(object)) }
if let Ok(object) = MedicalTest::try_from(v.clone()) { return Ok(AvailableServiceProp::MedicalTest(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The drug or supplement's legal status, including any controlled substance schedules that apply.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegalStatusProp")]
pub enum LegalStatusProp {
DrugLegalStatus(DrugLegalStatus),
MedicalEnumeration(MedicalEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LegalStatusProp")]
impl TryFrom<SchemaValue> for LegalStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegalStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugLegalStatus::try_from(v.clone()) { return Ok(LegalStatusProp::DrugLegalStatus(object)) }
if let Ok(object) = MedicalEnumeration::try_from(v.clone()) { return Ok(LegalStatusProp::MedicalEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegalStatusProp")]
impl TryFrom<&SchemaValue> for LegalStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegalStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugLegalStatus::try_from(v.clone()) { return Ok(LegalStatusProp::DrugLegalStatus(object)) }
if let Ok(object) = MedicalEnumeration::try_from(v.clone()) { return Ok(LegalStatusProp::MedicalEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The time of day the program normally runs. For example, "evenings".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TimeOfDayProp")]
pub enum TimeOfDayProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TimeOfDayProp")]
impl TryFrom<SchemaValue> for TimeOfDayProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TimeOfDayProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TimeOfDayProp")]
impl TryFrom<&SchemaValue> for TimeOfDayProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TimeOfDayProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Proprietary name given to the diet plan, typically by its originator or creator.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProprietaryNameProp")]
pub enum ProprietaryNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProprietaryNameProp")]
impl TryFrom<SchemaValue> for ProprietaryNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProprietaryNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProprietaryNameProp")]
impl TryFrom<&SchemaValue> for ProprietaryNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProprietaryNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The variableMeasured property can indicate (repeated as necessary) the variables that are measured in some dataset, either described as text or as pairs of identifier and description using PropertyValue, or more explicitly as a [StatisticalVariable].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VariableMeasuredProp")]
pub enum VariableMeasuredProp {
StatisticalVariable(StatisticalVariable),
Property(Property),
PropertyValue(PropertyValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VariableMeasuredProp")]
impl TryFrom<SchemaValue> for VariableMeasuredProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VariableMeasuredProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = StatisticalVariable::try_from(v.clone()) { return Ok(VariableMeasuredProp::StatisticalVariable(object)) }
if let Ok(object) = Property::try_from(v.clone()) { return Ok(VariableMeasuredProp::Property(object)) }
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(VariableMeasuredProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VariableMeasuredProp")]
impl TryFrom<&SchemaValue> for VariableMeasuredProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VariableMeasuredProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = StatisticalVariable::try_from(v.clone()) { return Ok(VariableMeasuredProp::StatisticalVariable(object)) }
if let Ok(object) = Property::try_from(v.clone()) { return Ok(VariableMeasuredProp::Property(object)) }
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(VariableMeasuredProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Countries for which the application is supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CountriesSupportedProp")]
pub enum CountriesSupportedProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CountriesSupportedProp")]
impl TryFrom<SchemaValue> for CountriesSupportedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CountriesSupportedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CountriesSupportedProp")]
impl TryFrom<&SchemaValue> for CountriesSupportedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CountriesSupportedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The annual rate that is charged for borrowing (or made by investing), expressed as a single percentage number that represents the actual yearly cost of funds over the term of a loan. This includes any fees or additional costs associated with the transaction.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AnnualPercentageRateProp")]
pub enum AnnualPercentageRateProp {
QuantitativeValue(QuantitativeValue),
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "AnnualPercentageRateProp")]
impl TryFrom<SchemaValue> for AnnualPercentageRateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AnnualPercentageRateProp::Text(v)),
SchemaValue::Number(v) => Ok(AnnualPercentageRateProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(AnnualPercentageRateProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AnnualPercentageRateProp")]
impl TryFrom<&SchemaValue> for AnnualPercentageRateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AnnualPercentageRateProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(AnnualPercentageRateProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(AnnualPercentageRateProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of grams of trans fat.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TransFatContentProp")]
pub enum TransFatContentProp {
Text(String),
Mass(Mass),
}
#[automatically_derived]
#[cfg(feature = "TransFatContentProp")]
impl TryFrom<SchemaValue> for TransFatContentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TransFatContentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(TransFatContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TransFatContentProp")]
impl TryFrom<&SchemaValue> for TransFatContentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TransFatContentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(TransFatContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An XPath, e.g. of a [SpeakableSpecification] or [WebPageElement]. In the latter case, multiple matches within a page can constitute a single conceptual "Web page element".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "XpathProp")]
pub enum XpathProp {
XPathType(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "XpathProp")]
impl TryFrom<SchemaValue> for XpathProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::XPath(v) => Ok(XpathProp::XPathType(v)),
SchemaValue::Text(v) => Ok(XpathProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "XpathProp")]
impl TryFrom<&SchemaValue> for XpathProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::XPath(v) => Ok(XpathProp::XPathType(v.clone())),
SchemaValue::Text(v) => Ok(XpathProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The individual who draws the primary narrative artwork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PencilerProp")]
pub enum PencilerProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "PencilerProp")]
impl TryFrom<SchemaValue> for PencilerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PencilerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(PencilerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PencilerProp")]
impl TryFrom<&SchemaValue> for PencilerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PencilerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(PencilerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The item being described is intended to assess the competency or learning outcome defined by the referenced term.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AssessesProp")]
pub enum AssessesProp {
Text(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "AssessesProp")]
impl TryFrom<SchemaValue> for AssessesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssessesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(AssessesProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AssessesProp")]
impl TryFrom<&SchemaValue> for AssessesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssessesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(AssessesProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The edition of a video game.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GameEditionProp")]
pub enum GameEditionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GameEditionProp")]
impl TryFrom<SchemaValue> for GameEditionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameEditionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GameEditionProp")]
impl TryFrom<&SchemaValue> for GameEditionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameEditionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The place where the product was assembled.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CountryOfAssemblyProp")]
pub enum CountryOfAssemblyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CountryOfAssemblyProp")]
impl TryFrom<SchemaValue> for CountryOfAssemblyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CountryOfAssemblyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CountryOfAssemblyProp")]
impl TryFrom<&SchemaValue> for CountryOfAssemblyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CountryOfAssemblyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date and time the reservation was booked.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BookingTimeProp")]
pub enum BookingTimeProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "BookingTimeProp")]
impl TryFrom<SchemaValue> for BookingTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BookingTimeProp::Text(v)),
SchemaValue::DateTime(v) => Ok(BookingTimeProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BookingTimeProp")]
impl TryFrom<&SchemaValue> for BookingTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BookingTimeProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(BookingTimeProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The seat associated with the ticket.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TicketedSeatProp")]
pub enum TicketedSeatProp {
Seat(Seat),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TicketedSeatProp")]
impl TryFrom<SchemaValue> for TicketedSeatProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TicketedSeatProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Seat::try_from(v.clone()) { return Ok(TicketedSeatProp::Seat(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TicketedSeatProp")]
impl TryFrom<&SchemaValue> for TicketedSeatProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TicketedSeatProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Seat::try_from(v.clone()) { return Ok(TicketedSeatProp::Seat(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3. Values should be drawn from the [approved vocabulary](https://www.w3.org/2021/a11y-discov-vocab/latest/#accessibilityHazard-vocabulary).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccessibilityHazardProp")]
pub enum AccessibilityHazardProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AccessibilityHazardProp")]
impl TryFrom<SchemaValue> for AccessibilityHazardProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessibilityHazardProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccessibilityHazardProp")]
impl TryFrom<&SchemaValue> for AccessibilityHazardProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessibilityHazardProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The year during which the claimed copyright for the CreativeWork was first asserted.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CopyrightYearProp")]
pub enum CopyrightYearProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CopyrightYearProp")]
impl TryFrom<SchemaValue> for CopyrightYearProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CopyrightYearProp::Number(v)),
SchemaValue::Text(v) => Ok(CopyrightYearProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CopyrightYearProp")]
impl TryFrom<&SchemaValue> for CopyrightYearProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CopyrightYearProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(CopyrightYearProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The available volume for cargo or luggage. For automobiles, this is usually the trunk volume.
///
/// Typical unit code(s): LTR for liters, FTQ for cubic foot/feet
///
/// Note: You can use [minValue] and [maxValue] to indicate ranges.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CargoVolumeProp")]
pub enum CargoVolumeProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "CargoVolumeProp")]
impl TryFrom<SchemaValue> for CargoVolumeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CargoVolumeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(CargoVolumeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CargoVolumeProp")]
impl TryFrom<&SchemaValue> for CargoVolumeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CargoVolumeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(CargoVolumeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A license document that applies to this content, typically indicated by URL.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LicenseProp")]
pub enum LicenseProp {
Text(String),
CreativeWork(CreativeWork),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "LicenseProp")]
impl TryFrom<SchemaValue> for LicenseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LicenseProp::Text(v)),
SchemaValue::Url(v) => Ok(LicenseProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(LicenseProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LicenseProp")]
impl TryFrom<&SchemaValue> for LicenseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LicenseProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(LicenseProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(LicenseProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the first known occurrence of a [Claim] in some [CreativeWork].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FirstAppearanceProp")]
pub enum FirstAppearanceProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FirstAppearanceProp")]
impl TryFrom<SchemaValue> for FirstAppearanceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FirstAppearanceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(FirstAppearanceProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FirstAppearanceProp")]
impl TryFrom<&SchemaValue> for FirstAppearanceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FirstAppearanceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(FirstAppearanceProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The fax number.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FaxNumberProp")]
pub enum FaxNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FaxNumberProp")]
impl TryFrom<SchemaValue> for FaxNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FaxNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FaxNumberProp")]
impl TryFrom<&SchemaValue> for FaxNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FaxNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The Order(s) related to this Invoice. One or more Orders may be combined into a single Invoice.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReferencesOrderProp")]
pub enum ReferencesOrderProp {
Order(Order),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReferencesOrderProp")]
impl TryFrom<SchemaValue> for ReferencesOrderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReferencesOrderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Order::try_from(v.clone()) { return Ok(ReferencesOrderProp::Order(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReferencesOrderProp")]
impl TryFrom<&SchemaValue> for ReferencesOrderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReferencesOrderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Order::try_from(v.clone()) { return Ok(ReferencesOrderProp::Order(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The exchange traded instrument associated with a Corporation object. The tickerSymbol is expressed as an exchange and an instrument name separated by a space character. For the exchange component of the tickerSymbol attribute, we recommend using the controlled vocabulary of Market Identifier Codes (MIC) specified in ISO 15022.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TickerSymbolProp")]
pub enum TickerSymbolProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TickerSymbolProp")]
impl TryFrom<SchemaValue> for TickerSymbolProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TickerSymbolProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TickerSymbolProp")]
impl TryFrom<&SchemaValue> for TickerSymbolProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TickerSymbolProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Smaller compositions included in this work (e.g. a movement in a symphony).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncludedCompositionProp")]
pub enum IncludedCompositionProp {
MusicComposition(MusicComposition),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IncludedCompositionProp")]
impl TryFrom<SchemaValue> for IncludedCompositionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludedCompositionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicComposition::try_from(v.clone()) { return Ok(IncludedCompositionProp::MusicComposition(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncludedCompositionProp")]
impl TryFrom<&SchemaValue> for IncludedCompositionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludedCompositionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicComposition::try_from(v.clone()) { return Ok(IncludedCompositionProp::MusicComposition(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Imaging technique used.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ImagingTechniqueProp")]
pub enum ImagingTechniqueProp {
Text(String),
MedicalImagingTechnique(MedicalImagingTechnique),
}
#[automatically_derived]
#[cfg(feature = "ImagingTechniqueProp")]
impl TryFrom<SchemaValue> for ImagingTechniqueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ImagingTechniqueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalImagingTechnique::try_from(v.clone()) { return Ok(ImagingTechniqueProp::MedicalImagingTechnique(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ImagingTechniqueProp")]
impl TryFrom<&SchemaValue> for ImagingTechniqueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ImagingTechniqueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalImagingTechnique::try_from(v.clone()) { return Ok(ImagingTechniqueProp::MedicalImagingTechnique(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The composition this track is a recording of.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecordingOfProp")]
pub enum RecordingOfProp {
MusicComposition(MusicComposition),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecordingOfProp")]
impl TryFrom<SchemaValue> for RecordingOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecordingOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicComposition::try_from(v.clone()) { return Ok(RecordingOfProp::MusicComposition(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecordingOfProp")]
impl TryFrom<&SchemaValue> for RecordingOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecordingOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicComposition::try_from(v.clone()) { return Ok(RecordingOfProp::MusicComposition(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The CableOrSatelliteService offering the channel.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InBroadcastLineupProp")]
pub enum InBroadcastLineupProp {
CableOrSatelliteService(CableOrSatelliteService),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InBroadcastLineupProp")]
impl TryFrom<SchemaValue> for InBroadcastLineupProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InBroadcastLineupProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CableOrSatelliteService::try_from(v.clone()) { return Ok(InBroadcastLineupProp::CableOrSatelliteService(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InBroadcastLineupProp")]
impl TryFrom<&SchemaValue> for InBroadcastLineupProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InBroadcastLineupProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CableOrSatelliteService::try_from(v.clone()) { return Ok(InBroadcastLineupProp::CableOrSatelliteService(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Disease associated to this BioChemEntity. Such disease can be a MedicalCondition or a URL. If you want to add an evidence supporting the association, please use PropertyValue.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AssociatedDiseaseProp")]
pub enum AssociatedDiseaseProp {
Text(String),
Url(String),
MedicalCondition(MedicalCondition),
PropertyValue(PropertyValue),
}
#[automatically_derived]
#[cfg(feature = "AssociatedDiseaseProp")]
impl TryFrom<SchemaValue> for AssociatedDiseaseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedDiseaseProp::Text(v)),
SchemaValue::Url(v) => Ok(AssociatedDiseaseProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCondition::try_from(v.clone()) { return Ok(AssociatedDiseaseProp::MedicalCondition(object)) }
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(AssociatedDiseaseProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AssociatedDiseaseProp")]
impl TryFrom<&SchemaValue> for AssociatedDiseaseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedDiseaseProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(AssociatedDiseaseProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCondition::try_from(v.clone()) { return Ok(AssociatedDiseaseProp::MedicalCondition(object)) }
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(AssociatedDiseaseProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SameAsProp")]
pub enum SameAsProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "SameAsProp")]
impl TryFrom<SchemaValue> for SameAsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SameAsProp::Text(v)),
SchemaValue::Url(v) => Ok(SameAsProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SameAsProp")]
impl TryFrom<&SchemaValue> for SameAsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SameAsProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(SameAsProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The length of time an Observation took place over. The format follows `P[0-9]*[Y|M|D|h|m|s]`. For example, P1Y is Period 1 Year, P3M is Period 3 Months, P3h is Period 3 hours.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ObservationPeriodProp")]
pub enum ObservationPeriodProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ObservationPeriodProp")]
impl TryFrom<SchemaValue> for ObservationPeriodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ObservationPeriodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ObservationPeriodProp")]
impl TryFrom<&SchemaValue> for ObservationPeriodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ObservationPeriodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates that this legislation (or part of a legislation) somehow transfers another legislation in a different legislative context. This is an informative link, and it has no legal value. For legally-binding links of transposition, use the <a href="/legislationTransposes">legislationTransposes</a> property. For example an informative consolidated law of a European Union's member state "applies" the consolidated version of the European Directive implemented in it.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationAppliesProp")]
pub enum LegislationAppliesProp {
Legislation(Legislation),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LegislationAppliesProp")]
impl TryFrom<SchemaValue> for LegislationAppliesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationAppliesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Legislation::try_from(v.clone()) { return Ok(LegislationAppliesProp::Legislation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationAppliesProp")]
impl TryFrom<&SchemaValue> for LegislationAppliesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationAppliesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Legislation::try_from(v.clone()) { return Ok(LegislationAppliesProp::Legislation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A CSS selector, e.g. of a [SpeakableSpecification] or [WebPageElement]. In the latter case, multiple matches within a page can constitute a single conceptual "Web page element".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CssSelectorProp")]
pub enum CssSelectorProp {
Text(String),
CssSelectorType(String),
}
#[automatically_derived]
#[cfg(feature = "CssSelectorProp")]
impl TryFrom<SchemaValue> for CssSelectorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CssSelectorProp::Text(v)),
SchemaValue::CssSelector(v) => Ok(CssSelectorProp::CssSelectorType(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CssSelectorProp")]
impl TryFrom<&SchemaValue> for CssSelectorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CssSelectorProp::Text(v.clone())),
SchemaValue::CssSelector(v) => Ok(CssSelectorProp::CssSelectorType(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An url template (RFC6570) that will be used to construct the target of the execution of the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UrlTemplateProp")]
pub enum UrlTemplateProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "UrlTemplateProp")]
impl TryFrom<SchemaValue> for UrlTemplateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UrlTemplateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UrlTemplateProp")]
impl TryFrom<&SchemaValue> for UrlTemplateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UrlTemplateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Quantitative measure gauging the degree of force involved in the exercise, for example, heartbeats per minute. May include the velocity of the movement.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IntensityProp")]
pub enum IntensityProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IntensityProp")]
impl TryFrom<SchemaValue> for IntensityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IntensityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(IntensityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IntensityProp")]
impl TryFrom<&SchemaValue> for IntensityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IntensityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(IntensityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specific qualifications required for this role or Occupation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "QualificationsProp")]
pub enum QualificationsProp {
Text(String),
EducationalOccupationalCredential(EducationalOccupationalCredential),
}
#[automatically_derived]
#[cfg(feature = "QualificationsProp")]
impl TryFrom<SchemaValue> for QualificationsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(QualificationsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(QualificationsProp::EducationalOccupationalCredential(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "QualificationsProp")]
impl TryFrom<&SchemaValue> for QualificationsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(QualificationsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(QualificationsProp::EducationalOccupationalCredential(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The URL of a node in an established educational framework.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TargetUrlProp")]
pub enum TargetUrlProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "TargetUrlProp")]
impl TryFrom<SchemaValue> for TargetUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetUrlProp::Text(v)),
SchemaValue::Url(v) => Ok(TargetUrlProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TargetUrlProp")]
impl TryFrom<&SchemaValue> for TargetUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetUrlProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(TargetUrlProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Processor architecture required to run the application (e.g. IA64).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProcessorRequirementsProp")]
pub enum ProcessorRequirementsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProcessorRequirementsProp")]
impl TryFrom<SchemaValue> for ProcessorRequirementsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProcessorRequirementsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProcessorRequirementsProp")]
impl TryFrom<&SchemaValue> for ProcessorRequirementsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProcessorRequirementsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The address for accessing the service by mail.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServicePostalAddressProp")]
pub enum ServicePostalAddressProp {
Text(String),
PostalAddress(PostalAddress),
}
#[automatically_derived]
#[cfg(feature = "ServicePostalAddressProp")]
impl TryFrom<SchemaValue> for ServicePostalAddressProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServicePostalAddressProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(ServicePostalAddressProp::PostalAddress(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServicePostalAddressProp")]
impl TryFrom<&SchemaValue> for ServicePostalAddressProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServicePostalAddressProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(ServicePostalAddressProp::PostalAddress(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A [CategoryCodeSet] that contains this category code.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InCodeSetProp")]
pub enum InCodeSetProp {
Url(String),
CategoryCodeSet(CategoryCodeSet),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InCodeSetProp")]
impl TryFrom<SchemaValue> for InCodeSetProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(InCodeSetProp::Url(v)),
SchemaValue::Text(v) => Ok(InCodeSetProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CategoryCodeSet::try_from(v.clone()) { return Ok(InCodeSetProp::CategoryCodeSet(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InCodeSetProp")]
impl TryFrom<&SchemaValue> for InCodeSetProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(InCodeSetProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(InCodeSetProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CategoryCodeSet::try_from(v.clone()) { return Ok(InCodeSetProp::CategoryCodeSet(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The generic name of this drug or supplement.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NonProprietaryNameProp")]
pub enum NonProprietaryNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NonProprietaryNameProp")]
impl TryFrom<SchemaValue> for NonProprietaryNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NonProprietaryNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NonProprietaryNameProp")]
impl TryFrom<&SchemaValue> for NonProprietaryNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NonProprietaryNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of instrument. The diet used in this action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExerciseRelatedDietProp")]
pub enum ExerciseRelatedDietProp {
Diet(Diet),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ExerciseRelatedDietProp")]
impl TryFrom<SchemaValue> for ExerciseRelatedDietProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExerciseRelatedDietProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Diet::try_from(v.clone()) { return Ok(ExerciseRelatedDietProp::Diet(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExerciseRelatedDietProp")]
impl TryFrom<&SchemaValue> for ExerciseRelatedDietProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExerciseRelatedDietProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Diet::try_from(v.clone()) { return Ok(ExerciseRelatedDietProp::Diet(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// For an [Organization] (often but not necessarily a [NewsMediaOrganization]), a report on staffing diversity issues. In a news context this might be for example ASNE or RTDNA (US) reports, or self-reported.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DiversityStaffingReportProp")]
pub enum DiversityStaffingReportProp {
Article(Article),
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "DiversityStaffingReportProp")]
impl TryFrom<SchemaValue> for DiversityStaffingReportProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiversityStaffingReportProp::Text(v)),
SchemaValue::Url(v) => Ok(DiversityStaffingReportProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Article::try_from(v.clone()) { return Ok(DiversityStaffingReportProp::Article(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DiversityStaffingReportProp")]
impl TryFrom<&SchemaValue> for DiversityStaffingReportProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiversityStaffingReportProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(DiversityStaffingReportProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Article::try_from(v.clone()) { return Ok(DiversityStaffingReportProp::Article(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The stage of the condition, if applicable.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StageProp")]
pub enum StageProp {
Text(String),
MedicalConditionStage(MedicalConditionStage),
}
#[automatically_derived]
#[cfg(feature = "StageProp")]
impl TryFrom<SchemaValue> for StageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalConditionStage::try_from(v.clone()) { return Ok(StageProp::MedicalConditionStage(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StageProp")]
impl TryFrom<&SchemaValue> for StageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalConditionStage::try_from(v.clone()) { return Ok(StageProp::MedicalConditionStage(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the [NATO stock number](https://en.wikipedia.org/wiki/NATO_Stock_Number) (nsn) of a [Product].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NsnProp")]
pub enum NsnProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NsnProp")]
impl TryFrom<SchemaValue> for NsnProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NsnProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NsnProp")]
impl TryFrom<&SchemaValue> for NsnProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NsnProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The maximum physical attendee capacity of an [Event] whose [eventAttendanceMode] is [OfflineEventAttendanceMode] (or the offline aspects, in the case of a [MixedEventAttendanceMode]).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MaximumPhysicalAttendeeCapacityProp")]
pub enum MaximumPhysicalAttendeeCapacityProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "MaximumPhysicalAttendeeCapacityProp")]
impl TryFrom<SchemaValue> for MaximumPhysicalAttendeeCapacityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MaximumPhysicalAttendeeCapacityProp::Text(v)),
SchemaValue::Integer(v) => Ok(MaximumPhysicalAttendeeCapacityProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MaximumPhysicalAttendeeCapacityProp")]
impl TryFrom<&SchemaValue> for MaximumPhysicalAttendeeCapacityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MaximumPhysicalAttendeeCapacityProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(MaximumPhysicalAttendeeCapacityProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Whether the coinsurance applies before or after deductible, etc. TODO: Is this a closed set?
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanCoinsuranceOptionProp")]
pub enum HealthPlanCoinsuranceOptionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanCoinsuranceOptionProp")]
impl TryFrom<SchemaValue> for HealthPlanCoinsuranceOptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanCoinsuranceOptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanCoinsuranceOptionProp")]
impl TryFrom<&SchemaValue> for HealthPlanCoinsuranceOptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanCoinsuranceOptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// This is the molecular weight of the entity being described, not of the parent. Units should be included in the form '<Number> <unit>', for example '12 amu' or as '<QuantitativeValue>.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MolecularWeightProp")]
pub enum MolecularWeightProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MolecularWeightProp")]
impl TryFrom<SchemaValue> for MolecularWeightProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MolecularWeightProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MolecularWeightProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MolecularWeightProp")]
impl TryFrom<&SchemaValue> for MolecularWeightProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MolecularWeightProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MolecularWeightProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Subcellular location where this BioChemEntity is located; please use PropertyValue if you want to include any evidence.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsLocatedInSubcellularLocationProp")]
pub enum IsLocatedInSubcellularLocationProp {
Url(String),
Text(String),
PropertyValue(PropertyValue),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "IsLocatedInSubcellularLocationProp")]
impl TryFrom<SchemaValue> for IsLocatedInSubcellularLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(IsLocatedInSubcellularLocationProp::Url(v)),
SchemaValue::Text(v) => Ok(IsLocatedInSubcellularLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(IsLocatedInSubcellularLocationProp::PropertyValue(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(IsLocatedInSubcellularLocationProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsLocatedInSubcellularLocationProp")]
impl TryFrom<&SchemaValue> for IsLocatedInSubcellularLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(IsLocatedInSubcellularLocationProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(IsLocatedInSubcellularLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(IsLocatedInSubcellularLocationProp::PropertyValue(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(IsLocatedInSubcellularLocationProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates sections of a Web page that are particularly 'speakable' in the sense of being highlighted as being especially appropriate for text-to-speech conversion. Other sections of a page may also be usefully spoken in particular circumstances; the 'speakable' property serves to indicate the parts most likely to be generally useful for speech.
///
/// The *speakable* property can be repeated an arbitrary number of times, with three kinds of possible 'content-locator' values:
///
/// 1.) *id-value* URL references - uses *id-value* of an element in the page being annotated. The simplest use of *speakable* has (potentially relative) URL values, referencing identified sections of the document concerned.
///
/// 2.) CSS Selectors - addresses content in the annotated page, e.g. via class attribute. Use the [cssSelector] property.
///
/// 3.) XPaths - addresses content via XPaths (assuming an XML view of the content). Use the [xpath] property.
///
///
/// For more sophisticated markup of speakable sections beyond simple ID references, either CSS selectors or XPath expressions to pick out document section(s) as speakable. For this
/// we define a supporting type, [SpeakableSpecification] which is defined to be a possible value of the *speakable* property.
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SpeakableProp")]
pub enum SpeakableProp {
SpeakableSpecification(SpeakableSpecification),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SpeakableProp")]
impl TryFrom<SchemaValue> for SpeakableProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SpeakableProp::Url(v)),
SchemaValue::Text(v) => Ok(SpeakableProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SpeakableSpecification::try_from(v.clone()) { return Ok(SpeakableProp::SpeakableSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SpeakableProp")]
impl TryFrom<&SchemaValue> for SpeakableProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SpeakableProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(SpeakableProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SpeakableSpecification::try_from(v.clone()) { return Ok(SpeakableProp::SpeakableSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The beginning of the availability of the product or service included in the offer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailabilityStartsProp")]
pub enum AvailabilityStartsProp {
Text(String),
DateTime(String),
Date(String),
Time(String),
}
#[automatically_derived]
#[cfg(feature = "AvailabilityStartsProp")]
impl TryFrom<SchemaValue> for AvailabilityStartsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailabilityStartsProp::Text(v)),
SchemaValue::DateTime(v) => Ok(AvailabilityStartsProp::DateTime(v)),
SchemaValue::Date(v) => Ok(AvailabilityStartsProp::Date(v)),
SchemaValue::Time(v) => Ok(AvailabilityStartsProp::Time(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailabilityStartsProp")]
impl TryFrom<&SchemaValue> for AvailabilityStartsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailabilityStartsProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(AvailabilityStartsProp::DateTime(v.clone())),
SchemaValue::Date(v) => Ok(AvailabilityStartsProp::Date(v.clone())),
SchemaValue::Time(v) => Ok(AvailabilityStartsProp::Time(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The modulation (e.g. FM, AM, etc) used by a particular broadcast service.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BroadcastSignalModulationProp")]
pub enum BroadcastSignalModulationProp {
QualitativeValue(QualitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BroadcastSignalModulationProp")]
impl TryFrom<SchemaValue> for BroadcastSignalModulationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastSignalModulationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(BroadcastSignalModulationProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BroadcastSignalModulationProp")]
impl TryFrom<&SchemaValue> for BroadcastSignalModulationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastSignalModulationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(BroadcastSignalModulationProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Identifies the volume of publication or multi-part work; for example, "iii" or "2".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VolumeNumberProp")]
pub enum VolumeNumberProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "VolumeNumberProp")]
impl TryFrom<SchemaValue> for VolumeNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VolumeNumberProp::Text(v)),
SchemaValue::Integer(v) => Ok(VolumeNumberProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VolumeNumberProp")]
impl TryFrom<&SchemaValue> for VolumeNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VolumeNumberProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(VolumeNumberProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A page providing information on how to book a tour of some [Place], such as an [Accommodation] or [ApartmentComplex] in a real estate setting, as well as other kinds of tours as appropriate.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TourBookingPageProp")]
pub enum TourBookingPageProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "TourBookingPageProp")]
impl TryFrom<SchemaValue> for TourBookingPageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TourBookingPageProp::Text(v)),
SchemaValue::Url(v) => Ok(TourBookingPageProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TourBookingPageProp")]
impl TryFrom<&SchemaValue> for TourBookingPageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TourBookingPageProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(TourBookingPageProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The current status of the order.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OrderStatusProp")]
pub enum OrderStatusProp {
OrderStatus(OrderStatus),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OrderStatusProp")]
impl TryFrom<SchemaValue> for OrderStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OrderStatus::try_from(v.clone()) { return Ok(OrderStatusProp::OrderStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OrderStatusProp")]
impl TryFrom<&SchemaValue> for OrderStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OrderStatus::try_from(v.clone()) { return Ok(OrderStatusProp::OrderStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of a loan or credit.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LoanTypeProp")]
pub enum LoanTypeProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LoanTypeProp")]
impl TryFrom<SchemaValue> for LoanTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(LoanTypeProp::Url(v)),
SchemaValue::Text(v) => Ok(LoanTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LoanTypeProp")]
impl TryFrom<&SchemaValue> for LoanTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(LoanTypeProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(LoanTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of grams of fiber.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FiberContentProp")]
pub enum FiberContentProp {
Text(String),
Mass(Mass),
}
#[automatically_derived]
#[cfg(feature = "FiberContentProp")]
impl TryFrom<SchemaValue> for FiberContentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FiberContentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(FiberContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FiberContentProp")]
impl TryFrom<&SchemaValue> for FiberContentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FiberContentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(FiberContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a dietary restriction or guideline for which this recipe or menu item is suitable, e.g. diabetic, halal etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SuitableForDietProp")]
pub enum SuitableForDietProp {
Text(String),
RestrictedDiet(RestrictedDiet),
}
#[automatically_derived]
#[cfg(feature = "SuitableForDietProp")]
impl TryFrom<SchemaValue> for SuitableForDietProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuitableForDietProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RestrictedDiet::try_from(v.clone()) { return Ok(SuitableForDietProp::RestrictedDiet(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SuitableForDietProp")]
impl TryFrom<&SchemaValue> for SuitableForDietProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuitableForDietProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RestrictedDiet::try_from(v.clone()) { return Ok(SuitableForDietProp::RestrictedDiet(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The most significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SignificantLinksProp")]
pub enum SignificantLinksProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SignificantLinksProp")]
impl TryFrom<SchemaValue> for SignificantLinksProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SignificantLinksProp::Url(v)),
SchemaValue::Text(v) => Ok(SignificantLinksProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SignificantLinksProp")]
impl TryFrom<&SchemaValue> for SignificantLinksProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SignificantLinksProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(SignificantLinksProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of interactions for the CreativeWork using the WebSite or SoftwareApplication. The most specific child type of InteractionCounter should be used.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InteractionStatisticProp")]
pub enum InteractionStatisticProp {
InteractionCounter(InteractionCounter),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InteractionStatisticProp")]
impl TryFrom<SchemaValue> for InteractionStatisticProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractionStatisticProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = InteractionCounter::try_from(v.clone()) { return Ok(InteractionStatisticProp::InteractionCounter(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InteractionStatisticProp")]
impl TryFrom<&SchemaValue> for InteractionStatisticProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractionStatisticProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = InteractionCounter::try_from(v.clone()) { return Ok(InteractionStatisticProp::InteractionCounter(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date on which a successful applicant for this job would be expected to start work. Choose a specific date in the future or use the jobImmediateStart property to indicate the position is to be filled as soon as possible.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "JobStartDateProp")]
pub enum JobStartDateProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "JobStartDateProp")]
impl TryFrom<SchemaValue> for JobStartDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobStartDateProp::Text(v)),
SchemaValue::Date(v) => Ok(JobStartDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "JobStartDateProp")]
impl TryFrom<&SchemaValue> for JobStartDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobStartDateProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(JobStartDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a textual identifier for a ProductGroup.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProductGroupIDProp")]
pub enum ProductGroupIDProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProductGroupIDProp")]
impl TryFrom<SchemaValue> for ProductGroupIDProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProductGroupIDProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProductGroupIDProp")]
impl TryFrom<&SchemaValue> for ProductGroupIDProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProductGroupIDProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A season in a media series.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SeasonProp")]
pub enum SeasonProp {
CreativeWorkSeason(CreativeWorkSeason),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SeasonProp")]
impl TryFrom<SchemaValue> for SeasonProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SeasonProp::Url(v)),
SchemaValue::Text(v) => Ok(SeasonProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWorkSeason::try_from(v.clone()) { return Ok(SeasonProp::CreativeWorkSeason(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SeasonProp")]
impl TryFrom<&SchemaValue> for SeasonProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SeasonProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(SeasonProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWorkSeason::try_from(v.clone()) { return Ok(SeasonProp::CreativeWorkSeason(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The series to which this episode or season belongs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PartOfSeriesProp")]
pub enum PartOfSeriesProp {
Text(String),
CreativeWorkSeries(CreativeWorkSeries),
}
#[automatically_derived]
#[cfg(feature = "PartOfSeriesProp")]
impl TryFrom<SchemaValue> for PartOfSeriesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfSeriesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWorkSeries::try_from(v.clone()) { return Ok(PartOfSeriesProp::CreativeWorkSeries(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PartOfSeriesProp")]
impl TryFrom<&SchemaValue> for PartOfSeriesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfSeriesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWorkSeries::try_from(v.clone()) { return Ok(PartOfSeriesProp::CreativeWorkSeries(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// People or organizations that have reviewed the content on this web page for accuracy and/or completeness.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReviewedByProp")]
pub enum ReviewedByProp {
Text(String),
Person(Person),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "ReviewedByProp")]
impl TryFrom<SchemaValue> for ReviewedByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewedByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ReviewedByProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ReviewedByProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReviewedByProp")]
impl TryFrom<&SchemaValue> for ReviewedByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewedByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ReviewedByProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ReviewedByProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The neurological pathway extension that inputs and sends information to the brain or spinal cord.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SensoryUnitProp")]
pub enum SensoryUnitProp {
AnatomicalStructure(AnatomicalStructure),
SuperficialAnatomy(SuperficialAnatomy),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SensoryUnitProp")]
impl TryFrom<SchemaValue> for SensoryUnitProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SensoryUnitProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(SensoryUnitProp::AnatomicalStructure(object)) }
if let Ok(object) = SuperficialAnatomy::try_from(v.clone()) { return Ok(SensoryUnitProp::SuperficialAnatomy(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SensoryUnitProp")]
impl TryFrom<&SchemaValue> for SensoryUnitProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SensoryUnitProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(SensoryUnitProp::AnatomicalStructure(object)) }
if let Ok(object) = SuperficialAnatomy::try_from(v.clone()) { return Ok(SensoryUnitProp::SuperficialAnatomy(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An Organization (or ProgramMembership) to which this Person or Organization belongs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MemberOfProp")]
pub enum MemberOfProp {
ProgramMembership(ProgramMembership),
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MemberOfProp")]
impl TryFrom<SchemaValue> for MemberOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MemberOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProgramMembership::try_from(v.clone()) { return Ok(MemberOfProp::ProgramMembership(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(MemberOfProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MemberOfProp")]
impl TryFrom<&SchemaValue> for MemberOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MemberOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProgramMembership::try_from(v.clone()) { return Ok(MemberOfProp::ProgramMembership(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(MemberOfProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The timezone in [ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601) for which the service bases its broadcasts.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BroadcastTimezoneProp")]
pub enum BroadcastTimezoneProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BroadcastTimezoneProp")]
impl TryFrom<SchemaValue> for BroadcastTimezoneProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastTimezoneProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BroadcastTimezoneProp")]
impl TryFrom<&SchemaValue> for BroadcastTimezoneProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastTimezoneProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Number of players on the server.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PlayersOnlineProp")]
pub enum PlayersOnlineProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PlayersOnlineProp")]
impl TryFrom<SchemaValue> for PlayersOnlineProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(PlayersOnlineProp::Integer(v)),
SchemaValue::Text(v) => Ok(PlayersOnlineProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PlayersOnlineProp")]
impl TryFrom<&SchemaValue> for PlayersOnlineProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(PlayersOnlineProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(PlayersOnlineProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An associated logo.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LogoProp")]
pub enum LogoProp {
ImageObject(ImageObject),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LogoProp")]
impl TryFrom<SchemaValue> for LogoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(LogoProp::Url(v)),
SchemaValue::Text(v) => Ok(LogoProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(LogoProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LogoProp")]
impl TryFrom<&SchemaValue> for LogoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(LogoProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(LogoProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(LogoProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The latest someone may check out of a lodging establishment.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CheckoutTimeProp")]
pub enum CheckoutTimeProp {
DateTime(String),
Text(String),
Time(String),
}
#[automatically_derived]
#[cfg(feature = "CheckoutTimeProp")]
impl TryFrom<SchemaValue> for CheckoutTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(CheckoutTimeProp::DateTime(v)),
SchemaValue::Text(v) => Ok(CheckoutTimeProp::Text(v)),
SchemaValue::Time(v) => Ok(CheckoutTimeProp::Time(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CheckoutTimeProp")]
impl TryFrom<&SchemaValue> for CheckoutTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(CheckoutTimeProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(CheckoutTimeProp::Text(v.clone())),
SchemaValue::Time(v) => Ok(CheckoutTimeProp::Time(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Any precaution, guidance, contraindication, etc. related to consumption of alcohol while taking this drug.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlcoholWarningProp")]
pub enum AlcoholWarningProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AlcoholWarningProp")]
impl TryFrom<SchemaValue> for AlcoholWarningProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlcoholWarningProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlcoholWarningProp")]
impl TryFrom<&SchemaValue> for AlcoholWarningProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlcoholWarningProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A music recording (track)—usually a single song.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TracksProp")]
pub enum TracksProp {
MusicRecording(MusicRecording),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TracksProp")]
impl TryFrom<SchemaValue> for TracksProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TracksProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicRecording::try_from(v.clone()) { return Ok(TracksProp::MusicRecording(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TracksProp")]
impl TryFrom<&SchemaValue> for TracksProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TracksProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicRecording::try_from(v.clone()) { return Ok(TracksProp::MusicRecording(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Another legislation that this legislation changes. This encompasses the notions of amendment, replacement, correction, repeal, or other types of change. This may be a direct change (textual or non-textual amendment) or a consequential or indirect change. The property is to be used to express the existence of a change relationship between two acts rather than the existence of a consolidated version of the text that shows the result of the change. For consolidation relationships, use the <a href="/legislationConsolidates">legislationConsolidates</a> property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationChangesProp")]
pub enum LegislationChangesProp {
Text(String),
Legislation(Legislation),
}
#[automatically_derived]
#[cfg(feature = "LegislationChangesProp")]
impl TryFrom<SchemaValue> for LegislationChangesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationChangesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Legislation::try_from(v.clone()) { return Ok(LegislationChangesProp::Legislation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationChangesProp")]
impl TryFrom<&SchemaValue> for LegislationChangesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationChangesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Legislation::try_from(v.clone()) { return Ok(LegislationChangesProp::Legislation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The opening hour of the place or service on the given day(s) of the week.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OpensProp")]
pub enum OpensProp {
Text(String),
Time(String),
}
#[automatically_derived]
#[cfg(feature = "OpensProp")]
impl TryFrom<SchemaValue> for OpensProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OpensProp::Text(v)),
SchemaValue::Time(v) => Ok(OpensProp::Time(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OpensProp")]
impl TryFrom<&SchemaValue> for OpensProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OpensProp::Text(v.clone())),
SchemaValue::Time(v) => Ok(OpensProp::Time(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The color of the product.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ColorProp")]
pub enum ColorProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ColorProp")]
impl TryFrom<SchemaValue> for ColorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ColorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ColorProp")]
impl TryFrom<&SchemaValue> for ColorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ColorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The stepValue attribute indicates the granularity that is expected (and required) of the value in a PropertyValueSpecification.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StepValueProp")]
pub enum StepValueProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "StepValueProp")]
impl TryFrom<SchemaValue> for StepValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(StepValueProp::Number(v)),
SchemaValue::Text(v) => Ok(StepValueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StepValueProp")]
impl TryFrom<&SchemaValue> for StepValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(StepValueProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(StepValueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// This can be marked 'true' to indicate that some published [DeliveryTimeSettings] or [ShippingRateSettings] are intended to apply to all [OfferShippingDetails] published by the same merchant, when referenced by a [shippingSettingsLink] in those settings. It is not meaningful to use a 'true' value for this property alongside a transitTimeLabel (for [DeliveryTimeSettings]) or shippingLabel (for [ShippingRateSettings]), since this property is for use with unlabelled settings.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsUnlabelledFallbackProp")]
pub enum IsUnlabelledFallbackProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IsUnlabelledFallbackProp")]
impl TryFrom<SchemaValue> for IsUnlabelledFallbackProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(IsUnlabelledFallbackProp::Boolean(v)),
SchemaValue::Text(v) => Ok(IsUnlabelledFallbackProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsUnlabelledFallbackProp")]
impl TryFrom<&SchemaValue> for IsUnlabelledFallbackProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(IsUnlabelledFallbackProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(IsUnlabelledFallbackProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The overall rating, based on a collection of reviews or ratings, of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AggregateRatingProp")]
pub enum AggregateRatingProp {
Text(String),
AggregateRating(AggregateRating),
}
#[automatically_derived]
#[cfg(feature = "AggregateRatingProp")]
impl TryFrom<SchemaValue> for AggregateRatingProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AggregateRatingProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AggregateRating::try_from(v.clone()) { return Ok(AggregateRatingProp::AggregateRating(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AggregateRatingProp")]
impl TryFrom<&SchemaValue> for AggregateRatingProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AggregateRatingProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AggregateRating::try_from(v.clone()) { return Ok(AggregateRatingProp::AggregateRating(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Defines the day(s) of the month on which a recurring [Event] takes place. Specified as an [Integer] between 1-31.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ByMonthDayProp")]
pub enum ByMonthDayProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ByMonthDayProp")]
impl TryFrom<SchemaValue> for ByMonthDayProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(ByMonthDayProp::Integer(v)),
SchemaValue::Text(v) => Ok(ByMonthDayProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ByMonthDayProp")]
impl TryFrom<&SchemaValue> for ByMonthDayProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(ByMonthDayProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(ByMonthDayProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of milligrams of sodium.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SodiumContentProp")]
pub enum SodiumContentProp {
Mass(Mass),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SodiumContentProp")]
impl TryFrom<SchemaValue> for SodiumContentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SodiumContentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(SodiumContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SodiumContentProp")]
impl TryFrom<&SchemaValue> for SodiumContentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SodiumContentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(SodiumContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The material used. (E.g. Oil, Watercolour, Acrylic, Linoprint, Marble, Cyanotype, Digital, Lithograph, DryPoint, Intaglio, Pastel, Woodcut, Pencil, Mixed Media, etc.)
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArtMediumProp")]
pub enum ArtMediumProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArtMediumProp")]
impl TryFrom<SchemaValue> for ArtMediumProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ArtMediumProp::Url(v)),
SchemaValue::Text(v) => Ok(ArtMediumProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArtMediumProp")]
impl TryFrom<&SchemaValue> for ArtMediumProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ArtMediumProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(ArtMediumProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Information about public transport closures.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PublicTransportClosuresInfoProp")]
pub enum PublicTransportClosuresInfoProp {
Text(String),
WebContent(WebContent),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "PublicTransportClosuresInfoProp")]
impl TryFrom<SchemaValue> for PublicTransportClosuresInfoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublicTransportClosuresInfoProp::Text(v)),
SchemaValue::Url(v) => Ok(PublicTransportClosuresInfoProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(PublicTransportClosuresInfoProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PublicTransportClosuresInfoProp")]
impl TryFrom<&SchemaValue> for PublicTransportClosuresInfoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublicTransportClosuresInfoProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(PublicTransportClosuresInfoProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(PublicTransportClosuresInfoProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of answers this question has received.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AnswerCountProp")]
pub enum AnswerCountProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AnswerCountProp")]
impl TryFrom<SchemaValue> for AnswerCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(AnswerCountProp::Integer(v)),
SchemaValue::Text(v) => Ok(AnswerCountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AnswerCountProp")]
impl TryFrom<&SchemaValue> for AnswerCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(AnswerCountProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(AnswerCountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date after which the price is no longer available.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PriceValidUntilProp")]
pub enum PriceValidUntilProp {
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PriceValidUntilProp")]
impl TryFrom<SchemaValue> for PriceValidUntilProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(PriceValidUntilProp::Date(v)),
SchemaValue::Text(v) => Ok(PriceValidUntilProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PriceValidUntilProp")]
impl TryFrom<&SchemaValue> for PriceValidUntilProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(PriceValidUntilProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(PriceValidUntilProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A hospital with which the physician or office is affiliated.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HospitalAffiliationProp")]
pub enum HospitalAffiliationProp {
Hospital(Hospital),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HospitalAffiliationProp")]
impl TryFrom<SchemaValue> for HospitalAffiliationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HospitalAffiliationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Hospital::try_from(v.clone()) { return Ok(HospitalAffiliationProp::Hospital(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HospitalAffiliationProp")]
impl TryFrom<&SchemaValue> for HospitalAffiliationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HospitalAffiliationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Hospital::try_from(v.clone()) { return Ok(HospitalAffiliationProp::Hospital(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. E.g. John wrote a book from January to *December*. For media, including audio and video, it's the time offset of the end of a clip within a larger file.
///
/// Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EndTimeProp")]
pub enum EndTimeProp {
Text(String),
Time(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "EndTimeProp")]
impl TryFrom<SchemaValue> for EndTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EndTimeProp::Text(v)),
SchemaValue::Time(v) => Ok(EndTimeProp::Time(v)),
SchemaValue::DateTime(v) => Ok(EndTimeProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EndTimeProp")]
impl TryFrom<&SchemaValue> for EndTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EndTimeProp::Text(v.clone())),
SchemaValue::Time(v) => Ok(EndTimeProp::Time(v.clone())),
SchemaValue::DateTime(v) => Ok(EndTimeProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Non-proprietary identifier for molecular entity that can be used in printed and electronic data sources thus enabling easier linking of diverse data compilations.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InChIProp")]
pub enum InChIProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InChIProp")]
impl TryFrom<SchemaValue> for InChIProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InChIProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InChIProp")]
impl TryFrom<&SchemaValue> for InChIProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InChIProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An indicator as to whether a position is available for an immediate start.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "JobImmediateStartProp")]
pub enum JobImmediateStartProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "JobImmediateStartProp")]
impl TryFrom<SchemaValue> for JobImmediateStartProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobImmediateStartProp::Text(v)),
SchemaValue::Boolean(v) => Ok(JobImmediateStartProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "JobImmediateStartProp")]
impl TryFrom<&SchemaValue> for JobImmediateStartProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobImmediateStartProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(JobImmediateStartProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// IATA identifier for an airline or airport.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IataCodeProp")]
pub enum IataCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IataCodeProp")]
impl TryFrom<SchemaValue> for IataCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IataCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IataCodeProp")]
impl TryFrom<&SchemaValue> for IataCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IataCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The typical delay the order has been sent for delivery and the goods reach the final customer. Typical properties: minValue, maxValue, unitCode (d for DAY).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TransitTimeProp")]
pub enum TransitTimeProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "TransitTimeProp")]
impl TryFrom<SchemaValue> for TransitTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TransitTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(TransitTimeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TransitTimeProp")]
impl TryFrom<&SchemaValue> for TransitTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TransitTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(TransitTimeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The amount of time in a term as defined by the institution. A term is a length of time where students take one or more classes. Semesters and quarters are common units for term.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TermDurationProp")]
pub enum TermDurationProp {
Duration(Duration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TermDurationProp")]
impl TryFrom<SchemaValue> for TermDurationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TermDurationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(TermDurationProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TermDurationProp")]
impl TryFrom<&SchemaValue> for TermDurationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TermDurationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(TermDurationProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A monetary value above (or at) which the shipping rate becomes free. Intended to be used via an [OfferShippingDetails] with [shippingSettingsLink] matching this [ShippingRateSettings].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FreeShippingThresholdProp")]
pub enum FreeShippingThresholdProp {
DeliveryChargeSpecification(DeliveryChargeSpecification),
MonetaryAmount(MonetaryAmount),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FreeShippingThresholdProp")]
impl TryFrom<SchemaValue> for FreeShippingThresholdProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FreeShippingThresholdProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryChargeSpecification::try_from(v.clone()) { return Ok(FreeShippingThresholdProp::DeliveryChargeSpecification(object)) }
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(FreeShippingThresholdProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FreeShippingThresholdProp")]
impl TryFrom<&SchemaValue> for FreeShippingThresholdProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FreeShippingThresholdProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryChargeSpecification::try_from(v.clone()) { return Ok(FreeShippingThresholdProp::DeliveryChargeSpecification(object)) }
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(FreeShippingThresholdProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date when the item becomes valid.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValidFromProp")]
pub enum ValidFromProp {
Text(String),
Date(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "ValidFromProp")]
impl TryFrom<SchemaValue> for ValidFromProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValidFromProp::Text(v)),
SchemaValue::Date(v) => Ok(ValidFromProp::Date(v)),
SchemaValue::DateTime(v) => Ok(ValidFromProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValidFromProp")]
impl TryFrom<&SchemaValue> for ValidFromProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValidFromProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(ValidFromProp::Date(v.clone())),
SchemaValue::DateTime(v) => Ok(ValidFromProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A creative work that this work is an example/instance/realization/derivation of.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExampleOfWorkProp")]
pub enum ExampleOfWorkProp {
Text(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "ExampleOfWorkProp")]
impl TryFrom<SchemaValue> for ExampleOfWorkProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExampleOfWorkProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(ExampleOfWorkProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExampleOfWorkProp")]
impl TryFrom<&SchemaValue> for ExampleOfWorkProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExampleOfWorkProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(ExampleOfWorkProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The estimated salary earned while in the program.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TrainingSalaryProp")]
pub enum TrainingSalaryProp {
Text(String),
MonetaryAmountDistribution(MonetaryAmountDistribution),
}
#[automatically_derived]
#[cfg(feature = "TrainingSalaryProp")]
impl TryFrom<SchemaValue> for TrainingSalaryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrainingSalaryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmountDistribution::try_from(v.clone()) { return Ok(TrainingSalaryProp::MonetaryAmountDistribution(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TrainingSalaryProp")]
impl TryFrom<&SchemaValue> for TrainingSalaryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrainingSalaryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmountDistribution::try_from(v.clone()) { return Ok(TrainingSalaryProp::MonetaryAmountDistribution(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of pages in the book.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfPagesProp")]
pub enum NumberOfPagesProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfPagesProp")]
impl TryFrom<SchemaValue> for NumberOfPagesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumberOfPagesProp::Integer(v)),
SchemaValue::Text(v) => Ok(NumberOfPagesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfPagesProp")]
impl TryFrom<&SchemaValue> for NumberOfPagesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumberOfPagesProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(NumberOfPagesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Specifies the least energy efficient class on the regulated EU energy consumption scale for the product category a product belongs to. For example, energy consumption for televisions placed on the market after January 1, 2020 is scaled from D to A+++.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EnergyEfficiencyScaleMinProp")]
pub enum EnergyEfficiencyScaleMinProp {
Text(String),
EUEnergyEfficiencyEnumeration(EUEnergyEfficiencyEnumeration),
}
#[automatically_derived]
#[cfg(feature = "EnergyEfficiencyScaleMinProp")]
impl TryFrom<SchemaValue> for EnergyEfficiencyScaleMinProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EnergyEfficiencyScaleMinProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EUEnergyEfficiencyEnumeration::try_from(v.clone()) { return Ok(EnergyEfficiencyScaleMinProp::EUEnergyEfficiencyEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EnergyEfficiencyScaleMinProp")]
impl TryFrom<&SchemaValue> for EnergyEfficiencyScaleMinProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EnergyEfficiencyScaleMinProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EUEnergyEfficiencyEnumeration::try_from(v.clone()) { return Ok(EnergyEfficiencyScaleMinProp::EUEnergyEfficiencyEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A secondary value that provides additional information on the original value, e.g. a reference temperature or a type of measurement.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValueReferenceProp")]
pub enum ValueReferenceProp {
QuantitativeValue(QuantitativeValue),
QualitativeValue(QualitativeValue),
MeasurementTypeEnumeration(MeasurementTypeEnumeration),
Enumeration(Enumeration),
DefinedTerm(DefinedTerm),
Text(String),
StructuredValue(StructuredValue),
PropertyValue(PropertyValue),
}
#[automatically_derived]
#[cfg(feature = "ValueReferenceProp")]
impl TryFrom<SchemaValue> for ValueReferenceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValueReferenceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(ValueReferenceProp::QuantitativeValue(object)) }
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(ValueReferenceProp::QualitativeValue(object)) }
if let Ok(object) = MeasurementTypeEnumeration::try_from(v.clone()) { return Ok(ValueReferenceProp::MeasurementTypeEnumeration(object)) }
if let Ok(object) = Enumeration::try_from(v.clone()) { return Ok(ValueReferenceProp::Enumeration(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(ValueReferenceProp::DefinedTerm(object)) }
if let Ok(object) = StructuredValue::try_from(v.clone()) { return Ok(ValueReferenceProp::StructuredValue(object)) }
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(ValueReferenceProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValueReferenceProp")]
impl TryFrom<&SchemaValue> for ValueReferenceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValueReferenceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(ValueReferenceProp::QuantitativeValue(object)) }
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(ValueReferenceProp::QualitativeValue(object)) }
if let Ok(object) = MeasurementTypeEnumeration::try_from(v.clone()) { return Ok(ValueReferenceProp::MeasurementTypeEnumeration(object)) }
if let Ok(object) = Enumeration::try_from(v.clone()) { return Ok(ValueReferenceProp::Enumeration(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(ValueReferenceProp::DefinedTerm(object)) }
if let Ok(object) = StructuredValue::try_from(v.clone()) { return Ok(ValueReferenceProp::StructuredValue(object)) }
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(ValueReferenceProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Size of the application / package (e.g. 18MB). In the absence of a unit (MB, KB etc.), KB will be assumed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FileSizeProp")]
pub enum FileSizeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FileSizeProp")]
impl TryFrom<SchemaValue> for FileSizeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FileSizeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FileSizeProp")]
impl TryFrom<&SchemaValue> for FileSizeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FileSizeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Biological process this BioChemEntity is involved in; please use PropertyValue if you want to include any evidence.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsInvolvedInBiologicalProcessProp")]
pub enum IsInvolvedInBiologicalProcessProp {
Text(String),
Url(String),
PropertyValue(PropertyValue),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "IsInvolvedInBiologicalProcessProp")]
impl TryFrom<SchemaValue> for IsInvolvedInBiologicalProcessProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsInvolvedInBiologicalProcessProp::Text(v)),
SchemaValue::Url(v) => Ok(IsInvolvedInBiologicalProcessProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(IsInvolvedInBiologicalProcessProp::PropertyValue(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(IsInvolvedInBiologicalProcessProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsInvolvedInBiologicalProcessProp")]
impl TryFrom<&SchemaValue> for IsInvolvedInBiologicalProcessProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsInvolvedInBiologicalProcessProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(IsInvolvedInBiologicalProcessProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(IsInvolvedInBiologicalProcessProp::PropertyValue(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(IsInvolvedInBiologicalProcessProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A specification in form of a line notation for describing the structure of chemical species using short ASCII strings. Double bond stereochemistry \ indicators may need to be escaped in the string in formats where the backslash is an escape character.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SmilesProp")]
pub enum SmilesProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SmilesProp")]
impl TryFrom<SchemaValue> for SmilesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SmilesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SmilesProp")]
impl TryFrom<&SchemaValue> for SmilesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SmilesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The subject matter of the content.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AboutProp")]
pub enum AboutProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AboutProp")]
impl TryFrom<SchemaValue> for AboutProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AboutProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(AboutProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AboutProp")]
impl TryFrom<&SchemaValue> for AboutProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AboutProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(AboutProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The payment method(s) to which the payment charge specification applies.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AppliesToPaymentMethodProp")]
pub enum AppliesToPaymentMethodProp {
PaymentMethod(PaymentMethod),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AppliesToPaymentMethodProp")]
impl TryFrom<SchemaValue> for AppliesToPaymentMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AppliesToPaymentMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PaymentMethod::try_from(v.clone()) { return Ok(AppliesToPaymentMethodProp::PaymentMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AppliesToPaymentMethodProp")]
impl TryFrom<&SchemaValue> for AppliesToPaymentMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AppliesToPaymentMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PaymentMethod::try_from(v.clone()) { return Ok(AppliesToPaymentMethodProp::PaymentMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Estimated processing time for the service using this channel.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProcessingTimeProp")]
pub enum ProcessingTimeProp {
Text(String),
Duration(Duration),
}
#[automatically_derived]
#[cfg(feature = "ProcessingTimeProp")]
impl TryFrom<SchemaValue> for ProcessingTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProcessingTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(ProcessingTimeProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProcessingTimeProp")]
impl TryFrom<&SchemaValue> for ProcessingTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProcessingTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(ProcessingTimeProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the property or properties by which the variants in a [ProductGroup] vary, e.g. their size, color etc. Schema.org properties can be referenced by their short name e.g. "color"; terms defined elsewhere can be referenced with their URIs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VariesByProp")]
pub enum VariesByProp {
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VariesByProp")]
impl TryFrom<SchemaValue> for VariesByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VariesByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(VariesByProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VariesByProp")]
impl TryFrom<&SchemaValue> for VariesByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VariesByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(VariesByProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number or other unique designator assigned to a Report by the publishing organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReportNumberProp")]
pub enum ReportNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReportNumberProp")]
impl TryFrom<SchemaValue> for ReportNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReportNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReportNumberProp")]
impl TryFrom<&SchemaValue> for ReportNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReportNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The Organization on whose behalf the creator was working.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SourceOrganizationProp")]
pub enum SourceOrganizationProp {
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "SourceOrganizationProp")]
impl TryFrom<SchemaValue> for SourceOrganizationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SourceOrganizationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SourceOrganizationProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SourceOrganizationProp")]
impl TryFrom<&SchemaValue> for SourceOrganizationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SourceOrganizationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SourceOrganizationProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The stage represented as a number, e.g. 3.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StageAsNumberProp")]
pub enum StageAsNumberProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "StageAsNumberProp")]
impl TryFrom<SchemaValue> for StageAsNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(StageAsNumberProp::Number(v)),
SchemaValue::Text(v) => Ok(StageAsNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StageAsNumberProp")]
impl TryFrom<&SchemaValue> for StageAsNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(StageAsNumberProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(StageAsNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A line is a point-to-point path consisting of two or more points. A line is expressed as a series of two or more point objects separated by space.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LineProp")]
pub enum LineProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LineProp")]
impl TryFrom<SchemaValue> for LineProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LineProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LineProp")]
impl TryFrom<&SchemaValue> for LineProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LineProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The anatomy of the underlying organ system or structures associated with this entity.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AssociatedAnatomyProp")]
pub enum AssociatedAnatomyProp {
SuperficialAnatomy(SuperficialAnatomy),
AnatomicalStructure(AnatomicalStructure),
AnatomicalSystem(AnatomicalSystem),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AssociatedAnatomyProp")]
impl TryFrom<SchemaValue> for AssociatedAnatomyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedAnatomyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SuperficialAnatomy::try_from(v.clone()) { return Ok(AssociatedAnatomyProp::SuperficialAnatomy(object)) }
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(AssociatedAnatomyProp::AnatomicalStructure(object)) }
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(AssociatedAnatomyProp::AnatomicalSystem(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AssociatedAnatomyProp")]
impl TryFrom<&SchemaValue> for AssociatedAnatomyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedAnatomyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SuperficialAnatomy::try_from(v.clone()) { return Ok(AssociatedAnatomyProp::SuperficialAnatomy(object)) }
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(AssociatedAnatomyProp::AnatomicalStructure(object)) }
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(AssociatedAnatomyProp::AnatomicalSystem(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of doors.
///
/// Typical unit code(s): C62
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfDoorsProp")]
pub enum NumberOfDoorsProp {
Number(f64),
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "NumberOfDoorsProp")]
impl TryFrom<SchemaValue> for NumberOfDoorsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfDoorsProp::Number(v)),
SchemaValue::Text(v) => Ok(NumberOfDoorsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfDoorsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfDoorsProp")]
impl TryFrom<&SchemaValue> for NumberOfDoorsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfDoorsProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(NumberOfDoorsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfDoorsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of location. The final location of the object or the agent after the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ToLocationProp")]
pub enum ToLocationProp {
Text(String),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "ToLocationProp")]
impl TryFrom<SchemaValue> for ToLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ToLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ToLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ToLocationProp")]
impl TryFrom<&SchemaValue> for ToLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ToLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ToLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// URL of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UrlProp")]
pub enum UrlProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "UrlProp")]
impl TryFrom<SchemaValue> for UrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UrlProp::Text(v)),
SchemaValue::Url(v) => Ok(UrlProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UrlProp")]
impl TryFrom<&SchemaValue> for UrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UrlProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(UrlProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The parent of a question, answer or item in general.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ParentItemProp")]
pub enum ParentItemProp {
Text(String),
Comment(Comment),
}
#[automatically_derived]
#[cfg(feature = "ParentItemProp")]
impl TryFrom<SchemaValue> for ParentItemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentItemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Comment::try_from(v.clone()) { return Ok(ParentItemProp::Comment(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ParentItemProp")]
impl TryFrom<&SchemaValue> for ParentItemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentItemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Comment::try_from(v.clone()) { return Ok(ParentItemProp::Comment(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Human-readable terms of service documentation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TermsOfServiceProp")]
pub enum TermsOfServiceProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "TermsOfServiceProp")]
impl TryFrom<SchemaValue> for TermsOfServiceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TermsOfServiceProp::Text(v)),
SchemaValue::Url(v) => Ok(TermsOfServiceProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TermsOfServiceProp")]
impl TryFrom<&SchemaValue> for TermsOfServiceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TermsOfServiceProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(TermsOfServiceProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The phone number to use to access the service.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServicePhoneProp")]
pub enum ServicePhoneProp {
Text(String),
ContactPoint(ContactPoint),
}
#[automatically_derived]
#[cfg(feature = "ServicePhoneProp")]
impl TryFrom<SchemaValue> for ServicePhoneProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServicePhoneProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ServicePhoneProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServicePhoneProp")]
impl TryFrom<&SchemaValue> for ServicePhoneProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServicePhoneProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ServicePhoneProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The depth of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DepthProp")]
pub enum DepthProp {
Distance(Distance),
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "DepthProp")]
impl TryFrom<SchemaValue> for DepthProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepthProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(DepthProp::Distance(object)) }
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(DepthProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DepthProp")]
impl TryFrom<&SchemaValue> for DepthProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepthProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(DepthProp::Distance(object)) }
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(DepthProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Representation of a text [textValue] using the specified [speechToTextMarkup]. For example the city name of Houston in IPA: /ˈhjuːstən/.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PhoneticTextProp")]
pub enum PhoneticTextProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PhoneticTextProp")]
impl TryFrom<SchemaValue> for PhoneticTextProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PhoneticTextProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PhoneticTextProp")]
impl TryFrom<&SchemaValue> for PhoneticTextProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PhoneticTextProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of adults staying in the unit.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumAdultsProp")]
pub enum NumAdultsProp {
QuantitativeValue(QuantitativeValue),
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumAdultsProp")]
impl TryFrom<SchemaValue> for NumAdultsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumAdultsProp::Integer(v)),
SchemaValue::Text(v) => Ok(NumAdultsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumAdultsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumAdultsProp")]
impl TryFrom<&SchemaValue> for NumAdultsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumAdultsProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(NumAdultsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumAdultsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of location. The original location of the object or the agent before the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FromLocationProp")]
pub enum FromLocationProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FromLocationProp")]
impl TryFrom<SchemaValue> for FromLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FromLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(FromLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FromLocationProp")]
impl TryFrom<&SchemaValue> for FromLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FromLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(FromLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The individual reservations included in the package. Typically a repeated property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SubReservationProp")]
pub enum SubReservationProp {
Reservation(Reservation),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SubReservationProp")]
impl TryFrom<SchemaValue> for SubReservationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubReservationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Reservation::try_from(v.clone()) { return Ok(SubReservationProp::Reservation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SubReservationProp")]
impl TryFrom<&SchemaValue> for SubReservationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubReservationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Reservation::try_from(v.clone()) { return Ok(SubReservationProp::Reservation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The person that lends the object being borrowed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LenderProp")]
pub enum LenderProp {
Organization(Organization),
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "LenderProp")]
impl TryFrom<SchemaValue> for LenderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LenderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(LenderProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LenderProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LenderProp")]
impl TryFrom<&SchemaValue> for LenderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LenderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(LenderProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LenderProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The neurological pathway that originates the neurons.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SourcedFromProp")]
pub enum SourcedFromProp {
BrainStructure(BrainStructure),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SourcedFromProp")]
impl TryFrom<SchemaValue> for SourcedFromProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SourcedFromProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BrainStructure::try_from(v.clone()) { return Ok(SourcedFromProp::BrainStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SourcedFromProp")]
impl TryFrom<&SchemaValue> for SourcedFromProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SourcedFromProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BrainStructure::try_from(v.clone()) { return Ok(SourcedFromProp::BrainStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Nutritional information specific to the dietary plan. May include dietary recommendations on what foods to avoid, what foods to consume, and specific alterations/deviations from the USDA or other regulatory body's approved dietary guidelines.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DietFeaturesProp")]
pub enum DietFeaturesProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DietFeaturesProp")]
impl TryFrom<SchemaValue> for DietFeaturesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DietFeaturesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DietFeaturesProp")]
impl TryFrom<&SchemaValue> for DietFeaturesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DietFeaturesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The priority status assigned to a passenger for security or boarding (e.g. FastTrack or Priority).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PassengerPriorityStatusProp")]
pub enum PassengerPriorityStatusProp {
Text(String),
QualitativeValue(QualitativeValue),
}
#[automatically_derived]
#[cfg(feature = "PassengerPriorityStatusProp")]
impl TryFrom<SchemaValue> for PassengerPriorityStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PassengerPriorityStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(PassengerPriorityStatusProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PassengerPriorityStatusProp")]
impl TryFrom<&SchemaValue> for PassengerPriorityStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PassengerPriorityStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(PassengerPriorityStatusProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The total distance travelled by the particular vehicle since its initial production, as read from its odometer.
///
/// Typical unit code(s): KMT for kilometers, SMI for statute miles
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MileageFromOdometerProp")]
pub enum MileageFromOdometerProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MileageFromOdometerProp")]
impl TryFrom<SchemaValue> for MileageFromOdometerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MileageFromOdometerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MileageFromOdometerProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MileageFromOdometerProp")]
impl TryFrom<&SchemaValue> for MileageFromOdometerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MileageFromOdometerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MileageFromOdometerProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PreviousStartDateProp")]
pub enum PreviousStartDateProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "PreviousStartDateProp")]
impl TryFrom<SchemaValue> for PreviousStartDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PreviousStartDateProp::Text(v)),
SchemaValue::Date(v) => Ok(PreviousStartDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PreviousStartDateProp")]
impl TryFrom<&SchemaValue> for PreviousStartDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PreviousStartDateProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(PreviousStartDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A contact point for a person or organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContactPointsProp")]
pub enum ContactPointsProp {
Text(String),
ContactPoint(ContactPoint),
}
#[automatically_derived]
#[cfg(feature = "ContactPointsProp")]
impl TryFrom<SchemaValue> for ContactPointsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContactPointsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ContactPointsProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContactPointsProp")]
impl TryFrom<&SchemaValue> for ContactPointsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContactPointsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ContactPointsProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The name of a character played in some acting or performing role, i.e. in a PerformanceRole.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CharacterNameProp")]
pub enum CharacterNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CharacterNameProp")]
impl TryFrom<SchemaValue> for CharacterNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CharacterNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CharacterNameProp")]
impl TryFrom<&SchemaValue> for CharacterNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CharacterNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Are in-store returns offered? (For more advanced return methods use the [returnMethod] property.)
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InStoreReturnsOfferedProp")]
pub enum InStoreReturnsOfferedProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "InStoreReturnsOfferedProp")]
impl TryFrom<SchemaValue> for InStoreReturnsOfferedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InStoreReturnsOfferedProp::Text(v)),
SchemaValue::Boolean(v) => Ok(InStoreReturnsOfferedProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InStoreReturnsOfferedProp")]
impl TryFrom<&SchemaValue> for InStoreReturnsOfferedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InStoreReturnsOfferedProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(InStoreReturnsOfferedProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A medical specialty of the provider.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MedicalSpecialtyProp")]
pub enum MedicalSpecialtyProp {
Text(String),
MedicalSpecialty(MedicalSpecialty),
}
#[automatically_derived]
#[cfg(feature = "MedicalSpecialtyProp")]
impl TryFrom<SchemaValue> for MedicalSpecialtyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MedicalSpecialtyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalSpecialty::try_from(v.clone()) { return Ok(MedicalSpecialtyProp::MedicalSpecialty(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MedicalSpecialtyProp")]
impl TryFrom<&SchemaValue> for MedicalSpecialtyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MedicalSpecialtyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalSpecialty::try_from(v.clone()) { return Ok(MedicalSpecialtyProp::MedicalSpecialty(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Molecular function performed by this BioChemEntity; please use PropertyValue if you want to include any evidence.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasMolecularFunctionProp")]
pub enum HasMolecularFunctionProp {
PropertyValue(PropertyValue),
Url(String),
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasMolecularFunctionProp")]
impl TryFrom<SchemaValue> for HasMolecularFunctionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(HasMolecularFunctionProp::Url(v)),
SchemaValue::Text(v) => Ok(HasMolecularFunctionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(HasMolecularFunctionProp::PropertyValue(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(HasMolecularFunctionProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasMolecularFunctionProp")]
impl TryFrom<&SchemaValue> for HasMolecularFunctionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(HasMolecularFunctionProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(HasMolecularFunctionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(HasMolecularFunctionProp::PropertyValue(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(HasMolecularFunctionProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SkuProp")]
pub enum SkuProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SkuProp")]
impl TryFrom<SchemaValue> for SkuProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SkuProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SkuProp")]
impl TryFrom<&SchemaValue> for SkuProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SkuProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A code that identifies this [DefinedTerm] within a [DefinedTermSet]
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TermCodeProp")]
pub enum TermCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TermCodeProp")]
impl TryFrom<SchemaValue> for TermCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TermCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TermCodeProp")]
impl TryFrom<&SchemaValue> for TermCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TermCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Information about the engine or engines of the vehicle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VehicleEngineProp")]
pub enum VehicleEngineProp {
EngineSpecification(EngineSpecification),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VehicleEngineProp")]
impl TryFrom<SchemaValue> for VehicleEngineProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleEngineProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EngineSpecification::try_from(v.clone()) { return Ok(VehicleEngineProp::EngineSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VehicleEngineProp")]
impl TryFrom<&SchemaValue> for VehicleEngineProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleEngineProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EngineSpecification::try_from(v.clone()) { return Ok(VehicleEngineProp::EngineSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The time when the live blog will stop covering the Event. Note that coverage may continue after the Event concludes.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CoverageEndTimeProp")]
pub enum CoverageEndTimeProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "CoverageEndTimeProp")]
impl TryFrom<SchemaValue> for CoverageEndTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CoverageEndTimeProp::Text(v)),
SchemaValue::DateTime(v) => Ok(CoverageEndTimeProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CoverageEndTimeProp")]
impl TryFrom<&SchemaValue> for CoverageEndTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CoverageEndTimeProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(CoverageEndTimeProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Products owned by the organization or person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OwnsProp")]
pub enum OwnsProp {
Product(Product),
OwnershipInfo(OwnershipInfo),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OwnsProp")]
impl TryFrom<SchemaValue> for OwnsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OwnsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(OwnsProp::Product(object)) }
if let Ok(object) = OwnershipInfo::try_from(v.clone()) { return Ok(OwnsProp::OwnershipInfo(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OwnsProp")]
impl TryFrom<&SchemaValue> for OwnsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OwnsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(OwnsProp::Product(object)) }
if let Ok(object) = OwnershipInfo::try_from(v.clone()) { return Ok(OwnsProp::OwnershipInfo(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the number of available accommodation units in an [ApartmentComplex], or the number of accommodation units for a specific [FloorPlan] (within its specific [ApartmentComplex]). See also [numberOfAccommodationUnits].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfAvailableAccommodationUnitsProp")]
pub enum NumberOfAvailableAccommodationUnitsProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfAvailableAccommodationUnitsProp")]
impl TryFrom<SchemaValue> for NumberOfAvailableAccommodationUnitsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfAvailableAccommodationUnitsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfAvailableAccommodationUnitsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfAvailableAccommodationUnitsProp")]
impl TryFrom<&SchemaValue> for NumberOfAvailableAccommodationUnitsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfAvailableAccommodationUnitsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfAvailableAccommodationUnitsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A polygon is the area enclosed by a point-to-point path for which the starting and ending points are the same. A polygon is expressed as a series of four or more space delimited points where the first and final points are identical.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PolygonProp")]
pub enum PolygonProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PolygonProp")]
impl TryFrom<SchemaValue> for PolygonProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PolygonProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PolygonProp")]
impl TryFrom<&SchemaValue> for PolygonProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PolygonProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The type of component used for transmitting the power from a rotating power source to the wheels or other relevant component(s) ("gearbox" for cars).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VehicleTransmissionProp")]
pub enum VehicleTransmissionProp {
QualitativeValue(QualitativeValue),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VehicleTransmissionProp")]
impl TryFrom<SchemaValue> for VehicleTransmissionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(VehicleTransmissionProp::Url(v)),
SchemaValue::Text(v) => Ok(VehicleTransmissionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(VehicleTransmissionProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VehicleTransmissionProp")]
impl TryFrom<&SchemaValue> for VehicleTransmissionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(VehicleTransmissionProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(VehicleTransmissionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(VehicleTransmissionProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of words in the text of the Article.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WordCountProp")]
pub enum WordCountProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "WordCountProp")]
impl TryFrom<SchemaValue> for WordCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WordCountProp::Text(v)),
SchemaValue::Integer(v) => Ok(WordCountProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WordCountProp")]
impl TryFrom<&SchemaValue> for WordCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WordCountProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(WordCountProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An offering of the course at a specific time and place or through specific media or mode of study or to a specific section of students.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasCourseInstanceProp")]
pub enum HasCourseInstanceProp {
Text(String),
CourseInstance(CourseInstance),
}
#[automatically_derived]
#[cfg(feature = "HasCourseInstanceProp")]
impl TryFrom<SchemaValue> for HasCourseInstanceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasCourseInstanceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CourseInstance::try_from(v.clone()) { return Ok(HasCourseInstanceProp::CourseInstance(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasCourseInstanceProp")]
impl TryFrom<&SchemaValue> for HasCourseInstanceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasCourseInstanceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CourseInstance::try_from(v.clone()) { return Ok(HasCourseInstanceProp::CourseInstance(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of location. The specific food establishment where the action occurred.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FoodEstablishmentProp")]
pub enum FoodEstablishmentProp {
Place(Place),
Text(String),
FoodEstablishment(FoodEstablishment),
}
#[automatically_derived]
#[cfg(feature = "FoodEstablishmentProp")]
impl TryFrom<SchemaValue> for FoodEstablishmentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoodEstablishmentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(FoodEstablishmentProp::Place(object)) }
if let Ok(object) = FoodEstablishment::try_from(v.clone()) { return Ok(FoodEstablishmentProp::FoodEstablishment(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FoodEstablishmentProp")]
impl TryFrom<&SchemaValue> for FoodEstablishmentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoodEstablishmentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(FoodEstablishmentProp::Place(object)) }
if let Ok(object) = FoodEstablishment::try_from(v.clone()) { return Ok(FoodEstablishmentProp::FoodEstablishment(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The typical expected age range, e.g. '7-9', '11-'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TypicalAgeRangeProp")]
pub enum TypicalAgeRangeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TypicalAgeRangeProp")]
impl TryFrom<SchemaValue> for TypicalAgeRangeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TypicalAgeRangeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TypicalAgeRangeProp")]
impl TryFrom<&SchemaValue> for TypicalAgeRangeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TypicalAgeRangeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Any precaution, guidance, contraindication, etc. related to consumption of specific foods while taking this drug.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FoodWarningProp")]
pub enum FoodWarningProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FoodWarningProp")]
impl TryFrom<SchemaValue> for FoodWarningProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoodWarningProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FoodWarningProp")]
impl TryFrom<&SchemaValue> for FoodWarningProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoodWarningProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Event that this person is a performer or participant in.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PerformerInProp")]
pub enum PerformerInProp {
Event(Event),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PerformerInProp")]
impl TryFrom<SchemaValue> for PerformerInProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PerformerInProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(PerformerInProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PerformerInProp")]
impl TryFrom<&SchemaValue> for PerformerInProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PerformerInProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(PerformerInProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Audiences defined by a person's maximum age.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RequiredMaxAgeProp")]
pub enum RequiredMaxAgeProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RequiredMaxAgeProp")]
impl TryFrom<SchemaValue> for RequiredMaxAgeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(RequiredMaxAgeProp::Integer(v)),
SchemaValue::Text(v) => Ok(RequiredMaxAgeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RequiredMaxAgeProp")]
impl TryFrom<&SchemaValue> for RequiredMaxAgeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(RequiredMaxAgeProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(RequiredMaxAgeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A route by which this drug may be administered, e.g. 'oral'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AdministrationRouteProp")]
pub enum AdministrationRouteProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AdministrationRouteProp")]
impl TryFrom<SchemaValue> for AdministrationRouteProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdministrationRouteProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AdministrationRouteProp")]
impl TryFrom<&SchemaValue> for AdministrationRouteProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdministrationRouteProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Relates a property to a class that constitutes (one of) the expected type(s) for values of the property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RangeIncludesProp")]
pub enum RangeIncludesProp {
Class(Class),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RangeIncludesProp")]
impl TryFrom<SchemaValue> for RangeIncludesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RangeIncludesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Class::try_from(v.clone()) { return Ok(RangeIncludesProp::Class(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RangeIncludesProp")]
impl TryFrom<&SchemaValue> for RangeIncludesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RangeIncludesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Class::try_from(v.clone()) { return Ok(RangeIncludesProp::Class(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date the ticket was issued.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DateIssuedProp")]
pub enum DateIssuedProp {
Text(String),
Date(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "DateIssuedProp")]
impl TryFrom<SchemaValue> for DateIssuedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DateIssuedProp::Text(v)),
SchemaValue::Date(v) => Ok(DateIssuedProp::Date(v)),
SchemaValue::DateTime(v) => Ok(DateIssuedProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DateIssuedProp")]
impl TryFrom<&SchemaValue> for DateIssuedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DateIssuedProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(DateIssuedProp::Date(v.clone())),
SchemaValue::DateTime(v) => Ok(DateIssuedProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Upcoming or past event associated with this place, organization, or action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EventProp")]
pub enum EventProp {
Text(String),
Event(Event),
}
#[automatically_derived]
#[cfg(feature = "EventProp")]
impl TryFrom<SchemaValue> for EventProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EventProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(EventProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EventProp")]
impl TryFrom<&SchemaValue> for EventProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EventProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(EventProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Whether multiple values are allowed for the property. Default is false.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MultipleValuesProp")]
pub enum MultipleValuesProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "MultipleValuesProp")]
impl TryFrom<SchemaValue> for MultipleValuesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MultipleValuesProp::Text(v)),
SchemaValue::Boolean(v) => Ok(MultipleValuesProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MultipleValuesProp")]
impl TryFrom<&SchemaValue> for MultipleValuesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MultipleValuesProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(MultipleValuesProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Email address.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EmailProp")]
pub enum EmailProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EmailProp")]
impl TryFrom<SchemaValue> for EmailProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmailProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EmailProp")]
impl TryFrom<&SchemaValue> for EmailProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmailProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The CreativeWork encoded by this media object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EncodesCreativeWorkProp")]
pub enum EncodesCreativeWorkProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EncodesCreativeWorkProp")]
impl TryFrom<SchemaValue> for EncodesCreativeWorkProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EncodesCreativeWorkProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(EncodesCreativeWorkProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EncodesCreativeWorkProp")]
impl TryFrom<&SchemaValue> for EncodesCreativeWorkProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EncodesCreativeWorkProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(EncodesCreativeWorkProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The availability of this item—for example In stock, Out of stock, Pre-order, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailabilityProp")]
pub enum AvailabilityProp {
Text(String),
ItemAvailability(ItemAvailability),
}
#[automatically_derived]
#[cfg(feature = "AvailabilityProp")]
impl TryFrom<SchemaValue> for AvailabilityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailabilityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemAvailability::try_from(v.clone()) { return Ok(AvailabilityProp::ItemAvailability(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailabilityProp")]
impl TryFrom<&SchemaValue> for AvailabilityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailabilityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemAvailability::try_from(v.clone()) { return Ok(AvailabilityProp::ItemAvailability(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether the offer was accepted as a gift for someone other than the buyer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsGiftProp")]
pub enum IsGiftProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "IsGiftProp")]
impl TryFrom<SchemaValue> for IsGiftProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsGiftProp::Text(v)),
SchemaValue::Boolean(v) => Ok(IsGiftProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsGiftProp")]
impl TryFrom<&SchemaValue> for IsGiftProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsGiftProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(IsGiftProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Links to tips, tactics, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GameTipProp")]
pub enum GameTipProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GameTipProp")]
impl TryFrom<SchemaValue> for GameTipProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameTipProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(GameTipProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GameTipProp")]
impl TryFrom<&SchemaValue> for GameTipProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameTipProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(GameTipProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A pointer from a previous, often discontinued variant of the product to its newer variant.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PredecessorOfProp")]
pub enum PredecessorOfProp {
Text(String),
ProductModel(ProductModel),
}
#[automatically_derived]
#[cfg(feature = "PredecessorOfProp")]
impl TryFrom<SchemaValue> for PredecessorOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PredecessorOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProductModel::try_from(v.clone()) { return Ok(PredecessorOfProp::ProductModel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PredecessorOfProp")]
impl TryFrom<&SchemaValue> for PredecessorOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PredecessorOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProductModel::try_from(v.clone()) { return Ok(PredecessorOfProp::ProductModel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A music album.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlbumProp")]
pub enum AlbumProp {
MusicAlbum(MusicAlbum),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AlbumProp")]
impl TryFrom<SchemaValue> for AlbumProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlbumProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbum::try_from(v.clone()) { return Ok(AlbumProp::MusicAlbum(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlbumProp")]
impl TryFrom<&SchemaValue> for AlbumProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlbumProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbum::try_from(v.clone()) { return Ok(AlbumProp::MusicAlbum(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a page with news updates and guidelines. This could often be (but is not required to be) the main page containing [SpecialAnnouncement] markup on a site.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NewsUpdatesAndGuidelinesProp")]
pub enum NewsUpdatesAndGuidelinesProp {
Text(String),
WebContent(WebContent),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "NewsUpdatesAndGuidelinesProp")]
impl TryFrom<SchemaValue> for NewsUpdatesAndGuidelinesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NewsUpdatesAndGuidelinesProp::Text(v)),
SchemaValue::Url(v) => Ok(NewsUpdatesAndGuidelinesProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(NewsUpdatesAndGuidelinesProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NewsUpdatesAndGuidelinesProp")]
impl TryFrom<&SchemaValue> for NewsUpdatesAndGuidelinesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NewsUpdatesAndGuidelinesProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(NewsUpdatesAndGuidelinesProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(NewsUpdatesAndGuidelinesProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A work featured in some event, e.g. exhibited in an ExhibitionEvent.
/// Specific subproperties are available for workPerformed (e.g. a play), or a workPresented (a Movie at a ScreeningEvent).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WorkFeaturedProp")]
pub enum WorkFeaturedProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WorkFeaturedProp")]
impl TryFrom<SchemaValue> for WorkFeaturedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkFeaturedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(WorkFeaturedProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WorkFeaturedProp")]
impl TryFrom<&SchemaValue> for WorkFeaturedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkFeaturedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(WorkFeaturedProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The name displayed in the channel guide. For many US affiliates, it is the network name.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BroadcastDisplayNameProp")]
pub enum BroadcastDisplayNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BroadcastDisplayNameProp")]
impl TryFrom<SchemaValue> for BroadcastDisplayNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastDisplayNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BroadcastDisplayNameProp")]
impl TryFrom<&SchemaValue> for BroadcastDisplayNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastDisplayNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A technique, method or technology used in an [Observation], [StatisticalVariable] or [Dataset] (or [DataDownload], [DataCatalog]), corresponding to the method used for measuring the corresponding variable(s) (for datasets, described using [variableMeasured]; for [Observation], a [StatisticalVariable]). Often but not necessarily each [variableMeasured] will have an explicit representation as (or mapping to) an property such as those defined in Schema.org, or other RDF vocabularies and "knowledge graphs". In that case the subproperty of [variableMeasured] called [measuredProperty] is applicable.
///
/// The [measurementTechnique] property helps when extra clarification is needed about how a [measuredProperty] was measured. This is oriented towards scientific and scholarly dataset publication but may have broader applicability; it is not intended as a full representation of measurement, but can often serve as a high level summary for dataset discovery.
///
/// For example, if [variableMeasured] is: molecule concentration, [measurementTechnique] could be: "mass spectrometry" or "nmr spectroscopy" or "colorimetry" or "immunofluorescence". If the [variableMeasured] is "depression rating", the [measurementTechnique] could be "Zung Scale" or "HAM-D" or "Beck Depression Inventory".
///
/// If there are several [variableMeasured] properties recorded for some given data object, use a [PropertyValue] for each [variableMeasured] and attach the corresponding [measurementTechnique]. The value can also be from an enumeration, organized as a [MeasurementMetholdEnumeration].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MeasurementTechniqueProp")]
pub enum MeasurementTechniqueProp {
Url(String),
MeasurementMethodEnum(MeasurementMethodEnum),
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MeasurementTechniqueProp")]
impl TryFrom<SchemaValue> for MeasurementTechniqueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MeasurementTechniqueProp::Url(v)),
SchemaValue::Text(v) => Ok(MeasurementTechniqueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MeasurementMethodEnum::try_from(v.clone()) { return Ok(MeasurementTechniqueProp::MeasurementMethodEnum(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(MeasurementTechniqueProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MeasurementTechniqueProp")]
impl TryFrom<&SchemaValue> for MeasurementTechniqueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MeasurementTechniqueProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(MeasurementTechniqueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MeasurementMethodEnum::try_from(v.clone()) { return Ok(MeasurementTechniqueProp::MeasurementMethodEnum(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(MeasurementTechniqueProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the kind of product that this is a variant of. In the case of [ProductModel], this is a pointer (from a ProductModel) to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive. In the case of a [ProductGroup], the group description also serves as a template, representing a set of Products that vary on explicitly defined, specific dimensions only (so it defines both a set of variants, as well as which values distinguish amongst those variants). When used with [ProductGroup], this property can apply to any [Product] included in the group.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsVariantOfProp")]
pub enum IsVariantOfProp {
ProductGroup(ProductGroup),
Text(String),
ProductModel(ProductModel),
}
#[automatically_derived]
#[cfg(feature = "IsVariantOfProp")]
impl TryFrom<SchemaValue> for IsVariantOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsVariantOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProductGroup::try_from(v.clone()) { return Ok(IsVariantOfProp::ProductGroup(object)) }
if let Ok(object) = ProductModel::try_from(v.clone()) { return Ok(IsVariantOfProp::ProductModel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsVariantOfProp")]
impl TryFrom<&SchemaValue> for IsVariantOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsVariantOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProductGroup::try_from(v.clone()) { return Ok(IsVariantOfProp::ProductGroup(object)) }
if let Ok(object) = ProductModel::try_from(v.clone()) { return Ok(IsVariantOfProp::ProductModel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date on which the CreativeWork was most recently modified or when the item's entry was modified within a DataFeed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DateModifiedProp")]
pub enum DateModifiedProp {
Text(String),
Date(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "DateModifiedProp")]
impl TryFrom<SchemaValue> for DateModifiedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DateModifiedProp::Text(v)),
SchemaValue::Date(v) => Ok(DateModifiedProp::Date(v)),
SchemaValue::DateTime(v) => Ok(DateModifiedProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DateModifiedProp")]
impl TryFrom<&SchemaValue> for DateModifiedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DateModifiedProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(DateModifiedProp::Date(v.clone())),
SchemaValue::DateTime(v) => Ok(DateModifiedProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The lowest price if the price is a range.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MinPriceProp")]
pub enum MinPriceProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "MinPriceProp")]
impl TryFrom<SchemaValue> for MinPriceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MinPriceProp::Text(v)),
SchemaValue::Number(v) => Ok(MinPriceProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MinPriceProp")]
impl TryFrom<&SchemaValue> for MinPriceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MinPriceProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(MinPriceProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A broadcast service associated with the publication event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PublishedOnProp")]
pub enum PublishedOnProp {
BroadcastService(BroadcastService),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PublishedOnProp")]
impl TryFrom<SchemaValue> for PublishedOnProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublishedOnProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BroadcastService::try_from(v.clone()) { return Ok(PublishedOnProp::BroadcastService(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PublishedOnProp")]
impl TryFrom<&SchemaValue> for PublishedOnProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublishedOnProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BroadcastService::try_from(v.clone()) { return Ok(PublishedOnProp::BroadcastService(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The age of the business.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "YearsInOperationProp")]
pub enum YearsInOperationProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "YearsInOperationProp")]
impl TryFrom<SchemaValue> for YearsInOperationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(YearsInOperationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(YearsInOperationProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "YearsInOperationProp")]
impl TryFrom<&SchemaValue> for YearsInOperationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(YearsInOperationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(YearsInOperationProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The warranty promise(s) included in the offer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WarrantyProp")]
pub enum WarrantyProp {
WarrantyPromise(WarrantyPromise),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WarrantyProp")]
impl TryFrom<SchemaValue> for WarrantyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WarrantyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WarrantyPromise::try_from(v.clone()) { return Ok(WarrantyProp::WarrantyPromise(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WarrantyProp")]
impl TryFrom<&SchemaValue> for WarrantyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WarrantyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WarrantyPromise::try_from(v.clone()) { return Ok(WarrantyProp::WarrantyPromise(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A piece of data that represents a particular aspect of a fictional character (skill, power, character points, advantage, disadvantage).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CharacterAttributeProp")]
pub enum CharacterAttributeProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CharacterAttributeProp")]
impl TryFrom<SchemaValue> for CharacterAttributeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CharacterAttributeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(CharacterAttributeProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CharacterAttributeProp")]
impl TryFrom<&SchemaValue> for CharacterAttributeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CharacterAttributeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(CharacterAttributeProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Any precaution, guidance, contraindication, etc. related to this drug's use by breastfeeding mothers.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BreastfeedingWarningProp")]
pub enum BreastfeedingWarningProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BreastfeedingWarningProp")]
impl TryFrom<SchemaValue> for BreastfeedingWarningProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BreastfeedingWarningProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BreastfeedingWarningProp")]
impl TryFrom<&SchemaValue> for BreastfeedingWarningProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BreastfeedingWarningProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Number of partial bathrooms - The total number of half and ¼ bathrooms in an [Accommodation]. This corresponds to the [BathroomsPartial field in RESO](https://ddwiki.reso.org/display/DDW17/BathroomsPartial+Field).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfPartialBathroomsProp")]
pub enum NumberOfPartialBathroomsProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfPartialBathroomsProp")]
impl TryFrom<SchemaValue> for NumberOfPartialBathroomsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfPartialBathroomsProp::Number(v)),
SchemaValue::Text(v) => Ok(NumberOfPartialBathroomsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfPartialBathroomsProp")]
impl TryFrom<&SchemaValue> for NumberOfPartialBathroomsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfPartialBathroomsProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(NumberOfPartialBathroomsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Requirements for taking the Course. May be completion of another [Course] or a textual description like "permission of instructor". Requirements may be a pre-requisite competency, referenced using [AlignmentObject].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CoursePrerequisitesProp")]
pub enum CoursePrerequisitesProp {
Course(Course),
Text(String),
AlignmentObject(AlignmentObject),
}
#[automatically_derived]
#[cfg(feature = "CoursePrerequisitesProp")]
impl TryFrom<SchemaValue> for CoursePrerequisitesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CoursePrerequisitesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Course::try_from(v.clone()) { return Ok(CoursePrerequisitesProp::Course(object)) }
if let Ok(object) = AlignmentObject::try_from(v.clone()) { return Ok(CoursePrerequisitesProp::AlignmentObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CoursePrerequisitesProp")]
impl TryFrom<&SchemaValue> for CoursePrerequisitesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CoursePrerequisitesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Course::try_from(v.clone()) { return Ok(CoursePrerequisitesProp::Course(object)) }
if let Ok(object) = AlignmentObject::try_from(v.clone()) { return Ok(CoursePrerequisitesProp::AlignmentObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A modifiable or non-modifiable risk factor included in the calculation, e.g. age, coexisting condition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncludedRiskFactorProp")]
pub enum IncludedRiskFactorProp {
MedicalRiskFactor(MedicalRiskFactor),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IncludedRiskFactorProp")]
impl TryFrom<SchemaValue> for IncludedRiskFactorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludedRiskFactorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalRiskFactor::try_from(v.clone()) { return Ok(IncludedRiskFactorProp::MedicalRiskFactor(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncludedRiskFactorProp")]
impl TryFrom<&SchemaValue> for IncludedRiskFactorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludedRiskFactorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalRiskFactor::try_from(v.clone()) { return Ok(IncludedRiskFactorProp::MedicalRiskFactor(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Position of the season within an ordered group of seasons.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SeasonNumberProp")]
pub enum SeasonNumberProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "SeasonNumberProp")]
impl TryFrom<SchemaValue> for SeasonNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeasonNumberProp::Text(v)),
SchemaValue::Integer(v) => Ok(SeasonNumberProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SeasonNumberProp")]
impl TryFrom<&SchemaValue> for SeasonNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeasonNumberProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(SeasonNumberProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates that the resource is compatible with the referenced accessibility API. Values should be drawn from the [approved vocabulary](https://www.w3.org/2021/a11y-discov-vocab/latest/#accessibilityAPI-vocabulary).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccessibilityAPIProp")]
pub enum AccessibilityAPIProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AccessibilityAPIProp")]
impl TryFrom<SchemaValue> for AccessibilityAPIProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessibilityAPIProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccessibilityAPIProp")]
impl TryFrom<&SchemaValue> for AccessibilityAPIProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessibilityAPIProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A pointer to another, somehow related product (or multiple products).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsRelatedToProp")]
pub enum IsRelatedToProp {
Service(Service),
Product(Product),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IsRelatedToProp")]
impl TryFrom<SchemaValue> for IsRelatedToProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsRelatedToProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Service::try_from(v.clone()) { return Ok(IsRelatedToProp::Service(object)) }
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsRelatedToProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsRelatedToProp")]
impl TryFrom<&SchemaValue> for IsRelatedToProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsRelatedToProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Service::try_from(v.clone()) { return Ok(IsRelatedToProp::Service(object)) }
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsRelatedToProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The latest date the package may arrive.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExpectedArrivalUntilProp")]
pub enum ExpectedArrivalUntilProp {
Date(String),
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ExpectedArrivalUntilProp")]
impl TryFrom<SchemaValue> for ExpectedArrivalUntilProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ExpectedArrivalUntilProp::Date(v)),
SchemaValue::DateTime(v) => Ok(ExpectedArrivalUntilProp::DateTime(v)),
SchemaValue::Text(v) => Ok(ExpectedArrivalUntilProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExpectedArrivalUntilProp")]
impl TryFrom<&SchemaValue> for ExpectedArrivalUntilProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ExpectedArrivalUntilProp::Date(v.clone())),
SchemaValue::DateTime(v) => Ok(ExpectedArrivalUntilProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(ExpectedArrivalUntilProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Reference to an asset (e.g., Barcode, QR code image or PDF) usable for entrance.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TicketTokenProp")]
pub enum TicketTokenProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "TicketTokenProp")]
impl TryFrom<SchemaValue> for TicketTokenProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TicketTokenProp::Text(v)),
SchemaValue::Url(v) => Ok(TicketTokenProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TicketTokenProp")]
impl TryFrom<&SchemaValue> for TicketTokenProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TicketTokenProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(TicketTokenProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Anatomical systems or structures that relate to the superficial anatomy.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RelatedAnatomyProp")]
pub enum RelatedAnatomyProp {
AnatomicalStructure(AnatomicalStructure),
AnatomicalSystem(AnatomicalSystem),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RelatedAnatomyProp")]
impl TryFrom<SchemaValue> for RelatedAnatomyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedAnatomyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(RelatedAnatomyProp::AnatomicalStructure(object)) }
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(RelatedAnatomyProp::AnatomicalSystem(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RelatedAnatomyProp")]
impl TryFrom<&SchemaValue> for RelatedAnatomyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedAnatomyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(RelatedAnatomyProp::AnatomicalStructure(object)) }
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(RelatedAnatomyProp::AnatomicalSystem(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A description of the variant cover
/// for the issue, if the issue is a variant printing. For example, "Bryan Hitch
/// Variant Cover" or "2nd Printing Variant".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VariantCoverProp")]
pub enum VariantCoverProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VariantCoverProp")]
impl TryFrom<SchemaValue> for VariantCoverProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VariantCoverProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VariantCoverProp")]
impl TryFrom<&SchemaValue> for VariantCoverProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VariantCoverProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The temporalCoverage of a CreativeWork indicates the period that the content applies to, i.e. that it describes, either as a DateTime or as a textual string indicating a time period in [ISO 8601 time interval format](https://en.wikipedia.org/wiki/ISO_8601#Time_intervals). In
/// the case of a Dataset it will typically indicate the relevant time period in a precise notation (e.g. for a 2011 census dataset, the year 2011 would be written "2011/2012"). Other forms of content, e.g. ScholarlyArticle, Book, TVSeries or TVEpisode, may indicate their temporalCoverage in broader terms - textually or via well-known URL.
/// Written works such as books may sometimes have precise temporal coverage too, e.g. a work set in 1939 - 1945 can be indicated in ISO 8601 interval format format via "1939/1945".
///
/// Open-ended date ranges can be written with ".." in place of the end date. For example, "2015-11/.." indicates a range beginning in November 2015 and with no specified final date. This is tentative and might be updated in future when ISO 8601 is officially updated.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TemporalCoverageProp")]
pub enum TemporalCoverageProp {
Text(String),
DateTime(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "TemporalCoverageProp")]
impl TryFrom<SchemaValue> for TemporalCoverageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TemporalCoverageProp::Text(v)),
SchemaValue::DateTime(v) => Ok(TemporalCoverageProp::DateTime(v)),
SchemaValue::Url(v) => Ok(TemporalCoverageProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TemporalCoverageProp")]
impl TryFrom<&SchemaValue> for TemporalCoverageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TemporalCoverageProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(TemporalCoverageProp::DateTime(v.clone())),
SchemaValue::Url(v) => Ok(TemporalCoverageProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MainEntityOfPageProp")]
pub enum MainEntityOfPageProp {
CreativeWork(CreativeWork),
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "MainEntityOfPageProp")]
impl TryFrom<SchemaValue> for MainEntityOfPageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MainEntityOfPageProp::Text(v)),
SchemaValue::Url(v) => Ok(MainEntityOfPageProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(MainEntityOfPageProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MainEntityOfPageProp")]
impl TryFrom<&SchemaValue> for MainEntityOfPageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MainEntityOfPageProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(MainEntityOfPageProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(MainEntityOfPageProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A subproperty of [measurementTechnique] that can be used for specifying specific methods, in particular via [MeasurementMethodEnum].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MeasurementMethodProp")]
pub enum MeasurementMethodProp {
Url(String),
MeasurementMethodEnum(MeasurementMethodEnum),
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MeasurementMethodProp")]
impl TryFrom<SchemaValue> for MeasurementMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MeasurementMethodProp::Url(v)),
SchemaValue::Text(v) => Ok(MeasurementMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MeasurementMethodEnum::try_from(v.clone()) { return Ok(MeasurementMethodProp::MeasurementMethodEnum(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(MeasurementMethodProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MeasurementMethodProp")]
impl TryFrom<&SchemaValue> for MeasurementMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MeasurementMethodProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(MeasurementMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MeasurementMethodEnum::try_from(v.clone()) { return Ok(MeasurementMethodProp::MeasurementMethodEnum(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(MeasurementMethodProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A role played by the BioChemEntity within a chemical context.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ChemicalRoleProp")]
pub enum ChemicalRoleProp {
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ChemicalRoleProp")]
impl TryFrom<SchemaValue> for ChemicalRoleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ChemicalRoleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(ChemicalRoleProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ChemicalRoleProp")]
impl TryFrom<&SchemaValue> for ChemicalRoleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ChemicalRoleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(ChemicalRoleProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The estimated cost of the supply or supplies consumed when performing instructions.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EstimatedCostProp")]
pub enum EstimatedCostProp {
Text(String),
MonetaryAmount(MonetaryAmount),
}
#[automatically_derived]
#[cfg(feature = "EstimatedCostProp")]
impl TryFrom<SchemaValue> for EstimatedCostProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EstimatedCostProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(EstimatedCostProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EstimatedCostProp")]
impl TryFrom<&SchemaValue> for EstimatedCostProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EstimatedCostProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(EstimatedCostProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the primary entity described in some page or other CreativeWork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MainEntityProp")]
pub enum MainEntityProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MainEntityProp")]
impl TryFrom<SchemaValue> for MainEntityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MainEntityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(MainEntityProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MainEntityProp")]
impl TryFrom<&SchemaValue> for MainEntityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MainEntityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(MainEntityProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Approximate or typical time it usually takes to work with or through the content of this work for the typical or target audience.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TimeRequiredProp")]
pub enum TimeRequiredProp {
Text(String),
Duration(Duration),
}
#[automatically_derived]
#[cfg(feature = "TimeRequiredProp")]
impl TryFrom<SchemaValue> for TimeRequiredProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TimeRequiredProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(TimeRequiredProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TimeRequiredProp")]
impl TryFrom<&SchemaValue> for TimeRequiredProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TimeRequiredProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(TimeRequiredProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Password, PIN, or access code needed for delivery (e.g. from a locker).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccessCodeProp")]
pub enum AccessCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AccessCodeProp")]
impl TryFrom<SchemaValue> for AccessCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccessCodeProp")]
impl TryFrom<&SchemaValue> for AccessCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of credits or units a full-time student would be expected to take in 1 term however 'term' is defined by the institution.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TypicalCreditsPerTermProp")]
pub enum TypicalCreditsPerTermProp {
StructuredValue(StructuredValue),
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TypicalCreditsPerTermProp")]
impl TryFrom<SchemaValue> for TypicalCreditsPerTermProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(TypicalCreditsPerTermProp::Integer(v)),
SchemaValue::Text(v) => Ok(TypicalCreditsPerTermProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = StructuredValue::try_from(v.clone()) { return Ok(TypicalCreditsPerTermProp::StructuredValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TypicalCreditsPerTermProp")]
impl TryFrom<&SchemaValue> for TypicalCreditsPerTermProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(TypicalCreditsPerTermProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(TypicalCreditsPerTermProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = StructuredValue::try_from(v.clone()) { return Ok(TypicalCreditsPerTermProp::StructuredValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in [ISO 3166 format](http://en.wikipedia.org/wiki/ISO_3166).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RegionsAllowedProp")]
pub enum RegionsAllowedProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RegionsAllowedProp")]
impl TryFrom<SchemaValue> for RegionsAllowedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RegionsAllowedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(RegionsAllowedProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RegionsAllowedProp")]
impl TryFrom<&SchemaValue> for RegionsAllowedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RegionsAllowedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(RegionsAllowedProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Shipper tracking number.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TrackingNumberProp")]
pub enum TrackingNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TrackingNumberProp")]
impl TryFrom<SchemaValue> for TrackingNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrackingNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TrackingNumberProp")]
impl TryFrom<&SchemaValue> for TrackingNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrackingNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A dosing schedule for the drug for a given population, either observed, recommended, or maximum dose based on the type used.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DoseScheduleProp")]
pub enum DoseScheduleProp {
DoseSchedule(DoseSchedule),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DoseScheduleProp")]
impl TryFrom<SchemaValue> for DoseScheduleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DoseScheduleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DoseSchedule::try_from(v.clone()) { return Ok(DoseScheduleProp::DoseSchedule(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DoseScheduleProp")]
impl TryFrom<&SchemaValue> for DoseScheduleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DoseScheduleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DoseSchedule::try_from(v.clone()) { return Ok(DoseScheduleProp::DoseSchedule(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The electronic systems used to play <a href="http://en.wikipedia.org/wiki/Category:Video_game_platforms">video games</a>.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GamePlatformProp")]
pub enum GamePlatformProp {
Text(String),
Thing(Thing),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "GamePlatformProp")]
impl TryFrom<SchemaValue> for GamePlatformProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GamePlatformProp::Text(v)),
SchemaValue::Url(v) => Ok(GamePlatformProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(GamePlatformProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GamePlatformProp")]
impl TryFrom<&SchemaValue> for GamePlatformProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GamePlatformProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(GamePlatformProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(GamePlatformProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// numicubedsocc - ICU BED OCCUPANCY: Total number of staffed inpatient ICU beds that are occupied.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumICUBedsOccProp")]
pub enum CvdNumICUBedsOccProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "CvdNumICUBedsOccProp")]
impl TryFrom<SchemaValue> for CvdNumICUBedsOccProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumICUBedsOccProp::Text(v)),
SchemaValue::Number(v) => Ok(CvdNumICUBedsOccProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumICUBedsOccProp")]
impl TryFrom<&SchemaValue> for CvdNumICUBedsOccProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumICUBedsOccProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(CvdNumICUBedsOccProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The quantity of the given bed type available in the HotelRoom, Suite, House, or Apartment.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfBedsProp")]
pub enum NumberOfBedsProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfBedsProp")]
impl TryFrom<SchemaValue> for NumberOfBedsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfBedsProp::Number(v)),
SchemaValue::Text(v) => Ok(NumberOfBedsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfBedsProp")]
impl TryFrom<&SchemaValue> for NumberOfBedsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfBedsProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(NumberOfBedsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// numvent - MECHANICAL VENTILATORS: Total number of ventilators available.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumVentProp")]
pub enum CvdNumVentProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CvdNumVentProp")]
impl TryFrom<SchemaValue> for CvdNumVentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumVentProp::Number(v)),
SchemaValue::Text(v) => Ok(CvdNumVentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumVentProp")]
impl TryFrom<&SchemaValue> for CvdNumVentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumVentProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(CvdNumVentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The point-in-time at which the provided description of the legislation is valid (e.g.: when looking at the law on the 2016-04-07 (= dateVersion), I get the consolidation of 2015-04-12 of the "National Insurance Contributions Act 2015")
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationDateVersionProp")]
pub enum LegislationDateVersionProp {
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LegislationDateVersionProp")]
impl TryFrom<SchemaValue> for LegislationDateVersionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(LegislationDateVersionProp::Date(v)),
SchemaValue::Text(v) => Ok(LegislationDateVersionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationDateVersionProp")]
impl TryFrom<&SchemaValue> for LegislationDateVersionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(LegislationDateVersionProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(LegislationDateVersionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date of adoption or signature of the legislation. This is the date at which the text is officially aknowledged to be a legislation, even though it might not even be published or in force.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationDateProp")]
pub enum LegislationDateProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "LegislationDateProp")]
impl TryFrom<SchemaValue> for LegislationDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationDateProp::Text(v)),
SchemaValue::Date(v) => Ok(LegislationDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationDateProp")]
impl TryFrom<&SchemaValue> for LegislationDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationDateProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(LegislationDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Category of an [Accommodation], following real estate conventions, e.g. RESO (see [PropertySubType](https://ddwiki.reso.org/display/DDW17/PropertySubType+Field), and [PropertyType](https://ddwiki.reso.org/display/DDW17/PropertyType+Field) fields for suggested values).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccommodationCategoryProp")]
pub enum AccommodationCategoryProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AccommodationCategoryProp")]
impl TryFrom<SchemaValue> for AccommodationCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccommodationCategoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccommodationCategoryProp")]
impl TryFrom<&SchemaValue> for AccommodationCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccommodationCategoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A [dateline](https://en.wikipedia.org/wiki/Dateline) is a brief piece of text included in news articles that describes where and when the story was written or filed though the date is often omitted. Sometimes only a placename is provided.
///
/// Structured representations of dateline-related information can also be expressed more explicitly using [locationCreated] (which represents where a work was created, e.g. where a news report was written). For location depicted or described in the content, use [contentLocation].
///
/// Dateline summaries are oriented more towards human readers than towards automated processing, and can vary substantially. Some examples: "BEIRUT, Lebanon, June 2.", "Paris, France", "December 19, 2017 11:43AM Reporting from Washington", "Beijing/Moscow", "QUEZON CITY, Philippines".
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DatelineProp")]
pub enum DatelineProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DatelineProp")]
impl TryFrom<SchemaValue> for DatelineProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DatelineProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DatelineProp")]
impl TryFrom<&SchemaValue> for DatelineProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DatelineProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The highest price if the price is a range.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MaxPriceProp")]
pub enum MaxPriceProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MaxPriceProp")]
impl TryFrom<SchemaValue> for MaxPriceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(MaxPriceProp::Number(v)),
SchemaValue::Text(v) => Ok(MaxPriceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MaxPriceProp")]
impl TryFrom<&SchemaValue> for MaxPriceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(MaxPriceProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(MaxPriceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BusinessFunctionProp")]
pub enum BusinessFunctionProp {
BusinessFunction(BusinessFunction),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BusinessFunctionProp")]
impl TryFrom<SchemaValue> for BusinessFunctionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BusinessFunctionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BusinessFunction::try_from(v.clone()) { return Ok(BusinessFunctionProp::BusinessFunction(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BusinessFunctionProp")]
impl TryFrom<&SchemaValue> for BusinessFunctionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BusinessFunctionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BusinessFunction::try_from(v.clone()) { return Ok(BusinessFunctionProp::BusinessFunction(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The 25th percentile value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "Percentile25Prop")]
pub enum Percentile25Prop {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "Percentile25Prop")]
impl TryFrom<SchemaValue> for Percentile25Prop {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(Percentile25Prop::Number(v)),
SchemaValue::Text(v) => Ok(Percentile25Prop::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "Percentile25Prop")]
impl TryFrom<&SchemaValue> for Percentile25Prop {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(Percentile25Prop::Number(v.clone())),
SchemaValue::Text(v) => Ok(Percentile25Prop::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A suggested range of body measurements for the intended audience or person, for example inseam between 32 and 34 inches or height between 170 and 190 cm. Typically found on a size chart for wearable products.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SuggestedMeasurementProp")]
pub enum SuggestedMeasurementProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SuggestedMeasurementProp")]
impl TryFrom<SchemaValue> for SuggestedMeasurementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuggestedMeasurementProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(SuggestedMeasurementProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SuggestedMeasurementProp")]
impl TryFrom<&SchemaValue> for SuggestedMeasurementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuggestedMeasurementProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(SuggestedMeasurementProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The person that borrows the object being lent.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BorrowerProp")]
pub enum BorrowerProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BorrowerProp")]
impl TryFrom<SchemaValue> for BorrowerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BorrowerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(BorrowerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BorrowerProp")]
impl TryFrom<&SchemaValue> for BorrowerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BorrowerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(BorrowerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The condition, complication, symptom, sign, etc. caused.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CauseOfProp")]
pub enum CauseOfProp {
MedicalEntity(MedicalEntity),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CauseOfProp")]
impl TryFrom<SchemaValue> for CauseOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CauseOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(CauseOfProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CauseOfProp")]
impl TryFrom<&SchemaValue> for CauseOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CauseOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(CauseOfProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Runtime platform or script interpreter dependencies (example: Java v1, Python 2.3, .NET Framework 3.0).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RuntimePlatformProp")]
pub enum RuntimePlatformProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RuntimePlatformProp")]
impl TryFrom<SchemaValue> for RuntimePlatformProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RuntimePlatformProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RuntimePlatformProp")]
impl TryFrom<&SchemaValue> for RuntimePlatformProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RuntimePlatformProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Description of the absorption and elimination of drugs, including their concentration (pharmacokinetics, pK) and biological effects (pharmacodynamics, pD).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ClinicalPharmacologyProp")]
pub enum ClinicalPharmacologyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ClinicalPharmacologyProp")]
impl TryFrom<SchemaValue> for ClinicalPharmacologyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ClinicalPharmacologyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ClinicalPharmacologyProp")]
impl TryFrom<&SchemaValue> for ClinicalPharmacologyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ClinicalPharmacologyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The region in which the locality is, and which is in the country. For example, California or another appropriate first-level [Administrative division](https://en.wikipedia.org/wiki/List_of_administrative_divisions_by_country).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AddressRegionProp")]
pub enum AddressRegionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AddressRegionProp")]
impl TryFrom<SchemaValue> for AddressRegionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AddressRegionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AddressRegionProp")]
impl TryFrom<&SchemaValue> for AddressRegionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AddressRegionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the number of constraints property values defined for a particular [ConstraintNode] such as [StatisticalVariable]. This helps applications understand if they have access to a sufficiently complete description of a [StatisticalVariable] or other construct that is defined using properties on template-style nodes.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumConstraintsProp")]
pub enum NumConstraintsProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumConstraintsProp")]
impl TryFrom<SchemaValue> for NumConstraintsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumConstraintsProp::Integer(v)),
SchemaValue::Text(v) => Ok(NumConstraintsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumConstraintsProp")]
impl TryFrom<&SchemaValue> for NumConstraintsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumConstraintsProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(NumConstraintsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An alias for the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlternateNameProp")]
pub enum AlternateNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AlternateNameProp")]
impl TryFrom<SchemaValue> for AlternateNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlternateNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlternateNameProp")]
impl TryFrom<&SchemaValue> for AlternateNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlternateNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A link related to this web page, for example to other related web pages.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RelatedLinkProp")]
pub enum RelatedLinkProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "RelatedLinkProp")]
impl TryFrom<SchemaValue> for RelatedLinkProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedLinkProp::Text(v)),
SchemaValue::Url(v) => Ok(RelatedLinkProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RelatedLinkProp")]
impl TryFrom<&SchemaValue> for RelatedLinkProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedLinkProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(RelatedLinkProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A person attending the event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AttendeesProp")]
pub enum AttendeesProp {
Organization(Organization),
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AttendeesProp")]
impl TryFrom<SchemaValue> for AttendeesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AttendeesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AttendeesProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AttendeesProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AttendeesProp")]
impl TryFrom<&SchemaValue> for AttendeesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AttendeesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AttendeesProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AttendeesProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The total delay between the receipt of the order and the goods reaching the final customer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DeliveryTimeProp")]
pub enum DeliveryTimeProp {
ShippingDeliveryTime(ShippingDeliveryTime),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DeliveryTimeProp")]
impl TryFrom<SchemaValue> for DeliveryTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeliveryTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ShippingDeliveryTime::try_from(v.clone()) { return Ok(DeliveryTimeProp::ShippingDeliveryTime(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DeliveryTimeProp")]
impl TryFrom<&SchemaValue> for DeliveryTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeliveryTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ShippingDeliveryTime::try_from(v.clone()) { return Ok(DeliveryTimeProp::ShippingDeliveryTime(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExpectsAcceptanceOfProp")]
pub enum ExpectsAcceptanceOfProp {
Text(String),
Offer(Offer),
}
#[automatically_derived]
#[cfg(feature = "ExpectsAcceptanceOfProp")]
impl TryFrom<SchemaValue> for ExpectsAcceptanceOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpectsAcceptanceOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Offer::try_from(v.clone()) { return Ok(ExpectsAcceptanceOfProp::Offer(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExpectsAcceptanceOfProp")]
impl TryFrom<&SchemaValue> for ExpectsAcceptanceOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpectsAcceptanceOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Offer::try_from(v.clone()) { return Ok(ExpectsAcceptanceOfProp::Offer(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A pointer to another product (or multiple products) for which this product is a consumable.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsConsumableForProp")]
pub enum IsConsumableForProp {
Text(String),
Product(Product),
}
#[automatically_derived]
#[cfg(feature = "IsConsumableForProp")]
impl TryFrom<SchemaValue> for IsConsumableForProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsConsumableForProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsConsumableForProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsConsumableForProp")]
impl TryFrom<&SchemaValue> for IsConsumableForProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsConsumableForProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsConsumableForProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub-property of instrument. A supply consumed when performing instructions or a direction.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SupplyProp")]
pub enum SupplyProp {
HowToSupply(HowToSupply),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SupplyProp")]
impl TryFrom<SchemaValue> for SupplyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SupplyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HowToSupply::try_from(v.clone()) { return Ok(SupplyProp::HowToSupply(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SupplyProp")]
impl TryFrom<&SchemaValue> for SupplyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SupplyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HowToSupply::try_from(v.clone()) { return Ok(SupplyProp::HowToSupply(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifying a drug or medicine used in a medication procedure.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DrugProp")]
pub enum DrugProp {
Text(String),
Drug(Drug),
}
#[automatically_derived]
#[cfg(feature = "DrugProp")]
impl TryFrom<SchemaValue> for DrugProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DrugProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Drug::try_from(v.clone()) { return Ok(DrugProp::Drug(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DrugProp")]
impl TryFrom<&SchemaValue> for DrugProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DrugProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Drug::try_from(v.clone()) { return Ok(DrugProp::Drug(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The participant who is at the receiving end of the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecipientProp")]
pub enum RecipientProp {
Text(String),
Organization(Organization),
Audience(Audience),
Person(Person),
ContactPoint(ContactPoint),
}
#[automatically_derived]
#[cfg(feature = "RecipientProp")]
impl TryFrom<SchemaValue> for RecipientProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipientProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(RecipientProp::Organization(object)) }
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(RecipientProp::Audience(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(RecipientProp::Person(object)) }
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(RecipientProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecipientProp")]
impl TryFrom<&SchemaValue> for RecipientProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipientProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(RecipientProp::Organization(object)) }
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(RecipientProp::Audience(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(RecipientProp::Person(object)) }
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(RecipientProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of location. The sports activity location where this action occurred.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SportsActivityLocationProp")]
pub enum SportsActivityLocationProp {
SportsActivityLocation(SportsActivityLocation),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SportsActivityLocationProp")]
impl TryFrom<SchemaValue> for SportsActivityLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SportsActivityLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SportsActivityLocation::try_from(v.clone()) { return Ok(SportsActivityLocationProp::SportsActivityLocation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SportsActivityLocationProp")]
impl TryFrom<&SchemaValue> for SportsActivityLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SportsActivityLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SportsActivityLocation::try_from(v.clone()) { return Ok(SportsActivityLocationProp::SportsActivityLocation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The time when a passenger can check into the flight online.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WebCheckinTimeProp")]
pub enum WebCheckinTimeProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "WebCheckinTimeProp")]
impl TryFrom<SchemaValue> for WebCheckinTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WebCheckinTimeProp::Text(v)),
SchemaValue::DateTime(v) => Ok(WebCheckinTimeProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WebCheckinTimeProp")]
impl TryFrom<&SchemaValue> for WebCheckinTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WebCheckinTimeProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(WebCheckinTimeProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Minimum recommended age in years for the audience or user.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SuggestedMinAgeProp")]
pub enum SuggestedMinAgeProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "SuggestedMinAgeProp")]
impl TryFrom<SchemaValue> for SuggestedMinAgeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuggestedMinAgeProp::Text(v)),
SchemaValue::Number(v) => Ok(SuggestedMinAgeProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SuggestedMinAgeProp")]
impl TryFrom<&SchemaValue> for SuggestedMinAgeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuggestedMinAgeProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(SuggestedMinAgeProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The album to which this recording belongs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InAlbumProp")]
pub enum InAlbumProp {
Text(String),
MusicAlbum(MusicAlbum),
}
#[automatically_derived]
#[cfg(feature = "InAlbumProp")]
impl TryFrom<SchemaValue> for InAlbumProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InAlbumProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbum::try_from(v.clone()) { return Ok(InAlbumProp::MusicAlbum(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InAlbumProp")]
impl TryFrom<&SchemaValue> for InAlbumProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InAlbumProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbum::try_from(v.clone()) { return Ok(InAlbumProp::MusicAlbum(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A short explanation (e.g. one to two sentences) providing background context and other information that led to the conclusion expressed in the rating. This is particularly applicable to ratings associated with "fact check" markup using [ClaimReview].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RatingExplanationProp")]
pub enum RatingExplanationProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RatingExplanationProp")]
impl TryFrom<SchemaValue> for RatingExplanationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RatingExplanationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RatingExplanationProp")]
impl TryFrom<&SchemaValue> for RatingExplanationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RatingExplanationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Attraction located at destination.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncludesAttractionProp")]
pub enum IncludesAttractionProp {
TouristAttraction(TouristAttraction),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IncludesAttractionProp")]
impl TryFrom<SchemaValue> for IncludesAttractionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludesAttractionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TouristAttraction::try_from(v.clone()) { return Ok(IncludesAttractionProp::TouristAttraction(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncludesAttractionProp")]
impl TryFrom<&SchemaValue> for IncludesAttractionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludesAttractionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TouristAttraction::try_from(v.clone()) { return Ok(IncludesAttractionProp::TouristAttraction(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A short text indicating the configuration of the vehicle, e.g. '5dr hatchback ST 2.5 MT 225 hp' or 'limited edition'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VehicleConfigurationProp")]
pub enum VehicleConfigurationProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VehicleConfigurationProp")]
impl TryFrom<SchemaValue> for VehicleConfigurationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleConfigurationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VehicleConfigurationProp")]
impl TryFrom<&SchemaValue> for VehicleConfigurationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleConfigurationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Specific physiologic benefits associated to the plan.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PhysiologicalBenefitsProp")]
pub enum PhysiologicalBenefitsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PhysiologicalBenefitsProp")]
impl TryFrom<SchemaValue> for PhysiologicalBenefitsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PhysiologicalBenefitsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PhysiologicalBenefitsProp")]
impl TryFrom<&SchemaValue> for PhysiologicalBenefitsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PhysiologicalBenefitsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Whether or not a property is mutable. Default is false. Specifying this for a property that also has a value makes it act similar to a "hidden" input in an HTML form.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReadonlyValueProp")]
pub enum ReadonlyValueProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReadonlyValueProp")]
impl TryFrom<SchemaValue> for ReadonlyValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(ReadonlyValueProp::Boolean(v)),
SchemaValue::Text(v) => Ok(ReadonlyValueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReadonlyValueProp")]
impl TryFrom<&SchemaValue> for ReadonlyValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(ReadonlyValueProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(ReadonlyValueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// This ordering relation for qualitative values indicates that the subject is equal to the object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EqualProp")]
pub enum EqualProp {
Text(String),
QualitativeValue(QualitativeValue),
}
#[automatically_derived]
#[cfg(feature = "EqualProp")]
impl TryFrom<SchemaValue> for EqualProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EqualProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(EqualProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EqualProp")]
impl TryFrom<&SchemaValue> for EqualProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EqualProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(EqualProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a target EntryPoint, or url, for an Action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TargetProp")]
pub enum TargetProp {
Url(String),
Text(String),
EntryPoint(EntryPoint),
}
#[automatically_derived]
#[cfg(feature = "TargetProp")]
impl TryFrom<SchemaValue> for TargetProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(TargetProp::Url(v)),
SchemaValue::Text(v) => Ok(TargetProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EntryPoint::try_from(v.clone()) { return Ok(TargetProp::EntryPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TargetProp")]
impl TryFrom<&SchemaValue> for TargetProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(TargetProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(TargetProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EntryPoint::try_from(v.clone()) { return Ok(TargetProp::EntryPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The method (from an enumeration) by which the customer obtains a return shipping label for a product returned for any reason.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReturnLabelSourceProp")]
pub enum ReturnLabelSourceProp {
Text(String),
ReturnLabelSourceEnumeration(ReturnLabelSourceEnumeration),
}
#[automatically_derived]
#[cfg(feature = "ReturnLabelSourceProp")]
impl TryFrom<SchemaValue> for ReturnLabelSourceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnLabelSourceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnLabelSourceEnumeration::try_from(v.clone()) { return Ok(ReturnLabelSourceProp::ReturnLabelSourceEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReturnLabelSourceProp")]
impl TryFrom<&SchemaValue> for ReturnLabelSourceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnLabelSourceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnLabelSourceEnumeration::try_from(v.clone()) { return Ok(ReturnLabelSourceProp::ReturnLabelSourceEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Description of fees, commissions, and other terms applied either to a class of financial product, or by a financial service organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FeesAndCommissionsSpecificationProp")]
pub enum FeesAndCommissionsSpecificationProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "FeesAndCommissionsSpecificationProp")]
impl TryFrom<SchemaValue> for FeesAndCommissionsSpecificationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FeesAndCommissionsSpecificationProp::Text(v)),
SchemaValue::Url(v) => Ok(FeesAndCommissionsSpecificationProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FeesAndCommissionsSpecificationProp")]
impl TryFrom<&SchemaValue> for FeesAndCommissionsSpecificationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FeesAndCommissionsSpecificationProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(FeesAndCommissionsSpecificationProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Specifics about the trial design (enumerated).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TrialDesignProp")]
pub enum TrialDesignProp {
Text(String),
MedicalTrialDesign(MedicalTrialDesign),
}
#[automatically_derived]
#[cfg(feature = "TrialDesignProp")]
impl TryFrom<SchemaValue> for TrialDesignProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrialDesignProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTrialDesign::try_from(v.clone()) { return Ok(TrialDesignProp::MedicalTrialDesign(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TrialDesignProp")]
impl TryFrom<&SchemaValue> for TrialDesignProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrialDesignProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTrialDesign::try_from(v.clone()) { return Ok(TrialDesignProp::MedicalTrialDesign(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A slogan or motto associated with the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SloganProp")]
pub enum SloganProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SloganProp")]
impl TryFrom<SchemaValue> for SloganProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SloganProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SloganProp")]
impl TryFrom<&SchemaValue> for SloganProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SloganProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of result. The Comment created or sent as a result of this action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ResultCommentProp")]
pub enum ResultCommentProp {
Comment(Comment),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ResultCommentProp")]
impl TryFrom<SchemaValue> for ResultCommentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ResultCommentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Comment::try_from(v.clone()) { return Ok(ResultCommentProp::Comment(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ResultCommentProp")]
impl TryFrom<&SchemaValue> for ResultCommentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ResultCommentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Comment::try_from(v.clone()) { return Ok(ResultCommentProp::Comment(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The location where the CreativeWork was created, which may not be the same as the location depicted in the CreativeWork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LocationCreatedProp")]
pub enum LocationCreatedProp {
Text(String),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "LocationCreatedProp")]
impl TryFrom<SchemaValue> for LocationCreatedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LocationCreatedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(LocationCreatedProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LocationCreatedProp")]
impl TryFrom<&SchemaValue> for LocationCreatedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LocationCreatedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(LocationCreatedProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of interactions for the CreativeWork using the WebSite or SoftwareApplication.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UserInteractionCountProp")]
pub enum UserInteractionCountProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "UserInteractionCountProp")]
impl TryFrom<SchemaValue> for UserInteractionCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UserInteractionCountProp::Text(v)),
SchemaValue::Integer(v) => Ok(UserInteractionCountProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UserInteractionCountProp")]
impl TryFrom<&SchemaValue> for UserInteractionCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UserInteractionCountProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(UserInteractionCountProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of object. The options subject to this action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OptionTypeProp")]
pub enum OptionTypeProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OptionTypeProp")]
impl TryFrom<SchemaValue> for OptionTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OptionTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(OptionTypeProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OptionTypeProp")]
impl TryFrom<&SchemaValue> for OptionTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OptionTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(OptionTypeProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for
/// <a href='unitCode'>unitCode</a>.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UnitTextProp")]
pub enum UnitTextProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "UnitTextProp")]
impl TryFrom<SchemaValue> for UnitTextProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UnitTextProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UnitTextProp")]
impl TryFrom<&SchemaValue> for UnitTextProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UnitTextProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The artist that performed this album or recording.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ByArtistProp")]
pub enum ByArtistProp {
Person(Person),
MusicGroup(MusicGroup),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ByArtistProp")]
impl TryFrom<SchemaValue> for ByArtistProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ByArtistProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ByArtistProp::Person(object)) }
if let Ok(object) = MusicGroup::try_from(v.clone()) { return Ok(ByArtistProp::MusicGroup(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ByArtistProp")]
impl TryFrom<&SchemaValue> for ByArtistProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ByArtistProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ByArtistProp::Person(object)) }
if let Ok(object) = MusicGroup::try_from(v.clone()) { return Ok(ByArtistProp::MusicGroup(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PaginationProp")]
pub enum PaginationProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PaginationProp")]
impl TryFrom<SchemaValue> for PaginationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaginationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PaginationProp")]
impl TryFrom<&SchemaValue> for PaginationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaginationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of attendee places for an event that remain unallocated.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RemainingAttendeeCapacityProp")]
pub enum RemainingAttendeeCapacityProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RemainingAttendeeCapacityProp")]
impl TryFrom<SchemaValue> for RemainingAttendeeCapacityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(RemainingAttendeeCapacityProp::Integer(v)),
SchemaValue::Text(v) => Ok(RemainingAttendeeCapacityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RemainingAttendeeCapacityProp")]
impl TryFrom<&SchemaValue> for RemainingAttendeeCapacityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(RemainingAttendeeCapacityProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(RemainingAttendeeCapacityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Describes, in a [MediaReview] when dealing with [DecontextualizedContent], background information that can contribute to better interpretation of the [MediaObject].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OriginalMediaContextDescriptionProp")]
pub enum OriginalMediaContextDescriptionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OriginalMediaContextDescriptionProp")]
impl TryFrom<SchemaValue> for OriginalMediaContextDescriptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OriginalMediaContextDescriptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OriginalMediaContextDescriptionProp")]
impl TryFrom<&SchemaValue> for OriginalMediaContextDescriptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OriginalMediaContextDescriptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// One of a set of signs and symptoms that can be used to distinguish this diagnosis from others in the differential diagnosis.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DistinguishingSignProp")]
pub enum DistinguishingSignProp {
Text(String),
MedicalSignOrSymptom(MedicalSignOrSymptom),
}
#[automatically_derived]
#[cfg(feature = "DistinguishingSignProp")]
impl TryFrom<SchemaValue> for DistinguishingSignProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DistinguishingSignProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalSignOrSymptom::try_from(v.clone()) { return Ok(DistinguishingSignProp::MedicalSignOrSymptom(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DistinguishingSignProp")]
impl TryFrom<&SchemaValue> for DistinguishingSignProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DistinguishingSignProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalSignOrSymptom::try_from(v.clone()) { return Ok(DistinguishingSignProp::MedicalSignOrSymptom(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// True if the drug is available in a generic form (regardless of name).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsAvailableGenericallyProp")]
pub enum IsAvailableGenericallyProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IsAvailableGenericallyProp")]
impl TryFrom<SchemaValue> for IsAvailableGenericallyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(IsAvailableGenericallyProp::Boolean(v)),
SchemaValue::Text(v) => Ok(IsAvailableGenericallyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsAvailableGenericallyProp")]
impl TryFrom<&SchemaValue> for IsAvailableGenericallyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(IsAvailableGenericallyProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(IsAvailableGenericallyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecognizingAuthorityProp")]
pub enum RecognizingAuthorityProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecognizingAuthorityProp")]
impl TryFrom<SchemaValue> for RecognizingAuthorityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecognizingAuthorityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(RecognizingAuthorityProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecognizingAuthorityProp")]
impl TryFrom<&SchemaValue> for RecognizingAuthorityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecognizingAuthorityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(RecognizingAuthorityProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Nutrition information about the recipe or menu item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NutritionProp")]
pub enum NutritionProp {
NutritionInformation(NutritionInformation),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NutritionProp")]
impl TryFrom<SchemaValue> for NutritionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NutritionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = NutritionInformation::try_from(v.clone()) { return Ok(NutritionProp::NutritionInformation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NutritionProp")]
impl TryFrom<&SchemaValue> for NutritionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NutritionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = NutritionInformation::try_from(v.clone()) { return Ok(NutritionProp::NutritionInformation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A colleague of the person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ColleagueProp")]
pub enum ColleagueProp {
Text(String),
Url(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "ColleagueProp")]
impl TryFrom<SchemaValue> for ColleagueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ColleagueProp::Text(v)),
SchemaValue::Url(v) => Ok(ColleagueProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ColleagueProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ColleagueProp")]
impl TryFrom<&SchemaValue> for ColleagueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ColleagueProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ColleagueProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ColleagueProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The ISBN of the book.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsbnProp")]
pub enum IsbnProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IsbnProp")]
impl TryFrom<SchemaValue> for IsbnProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsbnProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsbnProp")]
impl TryFrom<&SchemaValue> for IsbnProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsbnProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The time needed to accelerate the vehicle from a given start velocity to a given target velocity.
///
/// Typical unit code(s): SEC for seconds
///
/// * Note: There are unfortunately no standard unit codes for seconds/0..100 km/h or seconds/0..60 mph. Simply use "SEC" for seconds and indicate the velocities in the [name] of the [QuantitativeValue], or use [valueReference] with a [QuantitativeValue] of 0..60 mph or 0..100 km/h to specify the reference speeds.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccelerationTimeProp")]
pub enum AccelerationTimeProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "AccelerationTimeProp")]
impl TryFrom<SchemaValue> for AccelerationTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccelerationTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(AccelerationTimeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccelerationTimeProp")]
impl TryFrom<&SchemaValue> for AccelerationTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccelerationTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(AccelerationTimeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Identifies a price component (for example, a line item on an invoice), part of the total price for an offer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PriceComponentTypeProp")]
pub enum PriceComponentTypeProp {
Text(String),
PriceComponentTypeEnumeration(PriceComponentTypeEnumeration),
}
#[automatically_derived]
#[cfg(feature = "PriceComponentTypeProp")]
impl TryFrom<SchemaValue> for PriceComponentTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceComponentTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceComponentTypeEnumeration::try_from(v.clone()) { return Ok(PriceComponentTypeProp::PriceComponentTypeEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PriceComponentTypeProp")]
impl TryFrom<&SchemaValue> for PriceComponentTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceComponentTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceComponentTypeEnumeration::try_from(v.clone()) { return Ok(PriceComponentTypeProp::PriceComponentTypeEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A [marginOfError] for an [Observation].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MarginOfErrorProp")]
pub enum MarginOfErrorProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MarginOfErrorProp")]
impl TryFrom<SchemaValue> for MarginOfErrorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MarginOfErrorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MarginOfErrorProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MarginOfErrorProp")]
impl TryFrom<&SchemaValue> for MarginOfErrorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MarginOfErrorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MarginOfErrorProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The eventAttendanceMode of an event indicates whether it occurs online, offline, or a mix.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EventAttendanceModeProp")]
pub enum EventAttendanceModeProp {
Text(String),
EventAttendanceModeEnumeration(EventAttendanceModeEnumeration),
}
#[automatically_derived]
#[cfg(feature = "EventAttendanceModeProp")]
impl TryFrom<SchemaValue> for EventAttendanceModeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EventAttendanceModeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EventAttendanceModeEnumeration::try_from(v.clone()) { return Ok(EventAttendanceModeProp::EventAttendanceModeEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EventAttendanceModeProp")]
impl TryFrom<&SchemaValue> for EventAttendanceModeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EventAttendanceModeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EventAttendanceModeEnumeration::try_from(v.clone()) { return Ok(EventAttendanceModeProp::EventAttendanceModeEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A description of any sensory requirements and levels necessary to function on the job, including hearing and vision. Defined terms such as those in O*net may be used, but note that there is no way to specify the level of ability as well as its nature when using a defined term.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SensoryRequirementProp")]
pub enum SensoryRequirementProp {
Text(String),
Url(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "SensoryRequirementProp")]
impl TryFrom<SchemaValue> for SensoryRequirementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SensoryRequirementProp::Text(v)),
SchemaValue::Url(v) => Ok(SensoryRequirementProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(SensoryRequirementProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SensoryRequirementProp")]
impl TryFrom<&SchemaValue> for SensoryRequirementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SensoryRequirementProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(SensoryRequirementProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(SensoryRequirementProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A person or organization can have different contact points, for different purposes. For example, a sales contact point, a PR contact point and so on. This property is used to specify the kind of contact point.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContactTypeProp")]
pub enum ContactTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ContactTypeProp")]
impl TryFrom<SchemaValue> for ContactTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContactTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContactTypeProp")]
impl TryFrom<&SchemaValue> for ContactTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContactTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TaxIDProp")]
pub enum TaxIDProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TaxIDProp")]
impl TryFrom<SchemaValue> for TaxIDProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TaxIDProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TaxIDProp")]
impl TryFrom<&SchemaValue> for TaxIDProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TaxIDProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date when the item is no longer valid.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValidUntilProp")]
pub enum ValidUntilProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "ValidUntilProp")]
impl TryFrom<SchemaValue> for ValidUntilProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValidUntilProp::Text(v)),
SchemaValue::Date(v) => Ok(ValidUntilProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValidUntilProp")]
impl TryFrom<&SchemaValue> for ValidUntilProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValidUntilProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(ValidUntilProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The row location of the reserved seat (e.g., B).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SeatRowProp")]
pub enum SeatRowProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SeatRowProp")]
impl TryFrom<SchemaValue> for SeatRowProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeatRowProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SeatRowProp")]
impl TryFrom<&SchemaValue> for SeatRowProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeatRowProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The cuisine of the recipe (for example, French or Ethiopian).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecipeCuisineProp")]
pub enum RecipeCuisineProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecipeCuisineProp")]
impl TryFrom<SchemaValue> for RecipeCuisineProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeCuisineProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecipeCuisineProp")]
impl TryFrom<&SchemaValue> for RecipeCuisineProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeCuisineProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a legal jurisdiction, e.g. of some legislation, or where some government service is based.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "JurisdictionProp")]
pub enum JurisdictionProp {
Text(String),
AdministrativeArea(AdministrativeArea),
}
#[automatically_derived]
#[cfg(feature = "JurisdictionProp")]
impl TryFrom<SchemaValue> for JurisdictionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JurisdictionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(JurisdictionProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "JurisdictionProp")]
impl TryFrom<&SchemaValue> for JurisdictionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JurisdictionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(JurisdictionProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The URL for a feed, e.g. associated with a podcast series, blog, or series of date-stamped updates. This is usually RSS or Atom.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WebFeedProp")]
pub enum WebFeedProp {
Url(String),
DataFeed(DataFeed),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WebFeedProp")]
impl TryFrom<SchemaValue> for WebFeedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(WebFeedProp::Url(v)),
SchemaValue::Text(v) => Ok(WebFeedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataFeed::try_from(v.clone()) { return Ok(WebFeedProp::DataFeed(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WebFeedProp")]
impl TryFrom<&SchemaValue> for WebFeedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(WebFeedProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(WebFeedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataFeed::try_from(v.clone()) { return Ok(WebFeedProp::DataFeed(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of tissue sample required for the test.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TissueSampleProp")]
pub enum TissueSampleProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TissueSampleProp")]
impl TryFrom<SchemaValue> for TissueSampleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TissueSampleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TissueSampleProp")]
impl TryFrom<&SchemaValue> for TissueSampleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TissueSampleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The amount of time that is required between accepting the offer and the actual usage of the resource or service.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AdvanceBookingRequirementProp")]
pub enum AdvanceBookingRequirementProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "AdvanceBookingRequirementProp")]
impl TryFrom<SchemaValue> for AdvanceBookingRequirementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdvanceBookingRequirementProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(AdvanceBookingRequirementProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AdvanceBookingRequirementProp")]
impl TryFrom<&SchemaValue> for AdvanceBookingRequirementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdvanceBookingRequirementProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(AdvanceBookingRequirementProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "Gtin12Prop")]
pub enum Gtin12Prop {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "Gtin12Prop")]
impl TryFrom<SchemaValue> for Gtin12Prop {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Gtin12Prop::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "Gtin12Prop")]
impl TryFrom<&SchemaValue> for Gtin12Prop {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Gtin12Prop::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The distance traveled per unit of fuel used; most commonly miles per gallon (mpg) or kilometers per liter (km/L).
///
/// * Note 1: There are unfortunately no standard unit codes for miles per gallon or kilometers per liter. Use [unitText] to indicate the unit of measurement, e.g. mpg or km/L.
/// * Note 2: There are two ways of indicating the fuel consumption, [fuelConsumption] (e.g. 8 liters per 100 km) and [fuelEfficiency] (e.g. 30 miles per gallon). They are reciprocal.
/// * Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use [valueReference] to link the value for the fuel economy to another value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FuelEfficiencyProp")]
pub enum FuelEfficiencyProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FuelEfficiencyProp")]
impl TryFrom<SchemaValue> for FuelEfficiencyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FuelEfficiencyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(FuelEfficiencyProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FuelEfficiencyProp")]
impl TryFrom<&SchemaValue> for FuelEfficiencyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FuelEfficiencyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(FuelEfficiencyProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The expected arrival time.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArrivalTimeProp")]
pub enum ArrivalTimeProp {
Text(String),
DateTime(String),
Time(String),
}
#[automatically_derived]
#[cfg(feature = "ArrivalTimeProp")]
impl TryFrom<SchemaValue> for ArrivalTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalTimeProp::Text(v)),
SchemaValue::DateTime(v) => Ok(ArrivalTimeProp::DateTime(v)),
SchemaValue::Time(v) => Ok(ArrivalTimeProp::Time(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArrivalTimeProp")]
impl TryFrom<&SchemaValue> for ArrivalTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalTimeProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(ArrivalTimeProp::DateTime(v.clone())),
SchemaValue::Time(v) => Ok(ArrivalTimeProp::Time(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The typical delay between the receipt of the order and the goods either leaving the warehouse or being prepared for pickup, in case the delivery method is on site pickup. Typical properties: minValue, maxValue, unitCode (d for DAY). This is by common convention assumed to mean business days (if a unitCode is used, coded as "d"), i.e. only counting days when the business normally operates.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HandlingTimeProp")]
pub enum HandlingTimeProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HandlingTimeProp")]
impl TryFrom<SchemaValue> for HandlingTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HandlingTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(HandlingTimeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HandlingTimeProp")]
impl TryFrom<&SchemaValue> for HandlingTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HandlingTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(HandlingTimeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Whether the legislation is currently in force, not in force, or partially in force.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationLegalForceProp")]
pub enum LegislationLegalForceProp {
LegalForceStatus(LegalForceStatus),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LegislationLegalForceProp")]
impl TryFrom<SchemaValue> for LegislationLegalForceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationLegalForceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = LegalForceStatus::try_from(v.clone()) { return Ok(LegislationLegalForceProp::LegalForceStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationLegalForceProp")]
impl TryFrom<&SchemaValue> for LegislationLegalForceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationLegalForceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = LegalForceStatus::try_from(v.clone()) { return Ok(LegislationLegalForceProp::LegalForceStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The target group associated with a given audience (e.g. veterans, car owners, musicians, etc.).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AudienceTypeProp")]
pub enum AudienceTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AudienceTypeProp")]
impl TryFrom<SchemaValue> for AudienceTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AudienceTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AudienceTypeProp")]
impl TryFrom<&SchemaValue> for AudienceTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AudienceTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The postal code. For example, 94043.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PostalCodeProp")]
pub enum PostalCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PostalCodeProp")]
impl TryFrom<SchemaValue> for PostalCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostalCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PostalCodeProp")]
impl TryFrom<&SchemaValue> for PostalCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostalCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A [DefinedTermSet] that contains this term.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InDefinedTermSetProp")]
pub enum InDefinedTermSetProp {
Url(String),
DefinedTermSet(DefinedTermSet),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InDefinedTermSetProp")]
impl TryFrom<SchemaValue> for InDefinedTermSetProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(InDefinedTermSetProp::Url(v)),
SchemaValue::Text(v) => Ok(InDefinedTermSetProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTermSet::try_from(v.clone()) { return Ok(InDefinedTermSetProp::DefinedTermSet(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InDefinedTermSetProp")]
impl TryFrom<&SchemaValue> for InDefinedTermSetProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(InDefinedTermSetProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(InDefinedTermSetProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTermSet::try_from(v.clone()) { return Ok(InDefinedTermSetProp::DefinedTermSet(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates another legislation taken into account in this consolidated legislation (which is usually the product of an editorial process that revises the legislation). This property should be used multiple times to refer to both the original version or the previous consolidated version, and to the legislations making the change.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationConsolidatesProp")]
pub enum LegislationConsolidatesProp {
Text(String),
Legislation(Legislation),
}
#[automatically_derived]
#[cfg(feature = "LegislationConsolidatesProp")]
impl TryFrom<SchemaValue> for LegislationConsolidatesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationConsolidatesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Legislation::try_from(v.clone()) { return Ok(LegislationConsolidatesProp::Legislation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationConsolidatesProp")]
impl TryFrom<&SchemaValue> for LegislationConsolidatesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationConsolidatesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Legislation::try_from(v.clone()) { return Ok(LegislationConsolidatesProp::Legislation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Medical expert advice related to the plan.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExpertConsiderationsProp")]
pub enum ExpertConsiderationsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ExpertConsiderationsProp")]
impl TryFrom<SchemaValue> for ExpertConsiderationsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpertConsiderationsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExpertConsiderationsProp")]
impl TryFrom<&SchemaValue> for ExpertConsiderationsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpertConsiderationsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The place and time the release was issued, expressed as a PublicationEvent.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReleasedEventProp")]
pub enum ReleasedEventProp {
Text(String),
PublicationEvent(PublicationEvent),
}
#[automatically_derived]
#[cfg(feature = "ReleasedEventProp")]
impl TryFrom<SchemaValue> for ReleasedEventProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReleasedEventProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PublicationEvent::try_from(v.clone()) { return Ok(ReleasedEventProp::PublicationEvent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReleasedEventProp")]
impl TryFrom<&SchemaValue> for ReleasedEventProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReleasedEventProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PublicationEvent::try_from(v.clone()) { return Ok(ReleasedEventProp::PublicationEvent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Software application help.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SoftwareHelpProp")]
pub enum SoftwareHelpProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SoftwareHelpProp")]
impl TryFrom<SchemaValue> for SoftwareHelpProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SoftwareHelpProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(SoftwareHelpProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SoftwareHelpProp")]
impl TryFrom<&SchemaValue> for SoftwareHelpProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SoftwareHelpProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(SoftwareHelpProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The serial number or any alphanumeric identifier of a particular product. When attached to an offer, it is a shortcut for the serial number of the product included in the offer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SerialNumberProp")]
pub enum SerialNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SerialNumberProp")]
impl TryFrom<SchemaValue> for SerialNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SerialNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SerialNumberProp")]
impl TryFrom<&SchemaValue> for SerialNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SerialNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the availability type of the game content associated with this action, such as whether it is a full version or a demo.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GameAvailabilityTypeProp")]
pub enum GameAvailabilityTypeProp {
GameAvailabilityEnumeration(GameAvailabilityEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GameAvailabilityTypeProp")]
impl TryFrom<SchemaValue> for GameAvailabilityTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameAvailabilityTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GameAvailabilityEnumeration::try_from(v.clone()) { return Ok(GameAvailabilityTypeProp::GameAvailabilityEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GameAvailabilityTypeProp")]
impl TryFrom<&SchemaValue> for GameAvailabilityTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameAvailabilityTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GameAvailabilityEnumeration::try_from(v.clone()) { return Ok(GameAvailabilityTypeProp::GameAvailabilityEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// In the context of a [MediaReview], indicates specific media item(s) that are grouped using a [MediaReviewItem].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MediaItemAppearanceProp")]
pub enum MediaItemAppearanceProp {
MediaObject(MediaObject),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MediaItemAppearanceProp")]
impl TryFrom<SchemaValue> for MediaItemAppearanceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MediaItemAppearanceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(MediaItemAppearanceProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MediaItemAppearanceProp")]
impl TryFrom<&SchemaValue> for MediaItemAppearanceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MediaItemAppearanceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(MediaItemAppearanceProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Recommended intake of this supplement for a given population as defined by a specific recommending authority.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecommendedIntakeProp")]
pub enum RecommendedIntakeProp {
RecommendedDoseSchedule(RecommendedDoseSchedule),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecommendedIntakeProp")]
impl TryFrom<SchemaValue> for RecommendedIntakeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecommendedIntakeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RecommendedDoseSchedule::try_from(v.clone()) { return Ok(RecommendedIntakeProp::RecommendedDoseSchedule(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecommendedIntakeProp")]
impl TryFrom<&SchemaValue> for RecommendedIntakeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecommendedIntakeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RecommendedDoseSchedule::try_from(v.clone()) { return Ok(RecommendedIntakeProp::RecommendedDoseSchedule(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A credential awarded to the Person or Organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasCredentialProp")]
pub enum HasCredentialProp {
EducationalOccupationalCredential(EducationalOccupationalCredential),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasCredentialProp")]
impl TryFrom<SchemaValue> for HasCredentialProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasCredentialProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(HasCredentialProp::EducationalOccupationalCredential(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasCredentialProp")]
impl TryFrom<&SchemaValue> for HasCredentialProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasCredentialProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(HasCredentialProp::EducationalOccupationalCredential(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A medical test typically performed given this condition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TypicalTestProp")]
pub enum TypicalTestProp {
Text(String),
MedicalTest(MedicalTest),
}
#[automatically_derived]
#[cfg(feature = "TypicalTestProp")]
impl TryFrom<SchemaValue> for TypicalTestProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TypicalTestProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTest::try_from(v.clone()) { return Ok(TypicalTestProp::MedicalTest(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TypicalTestProp")]
impl TryFrom<&SchemaValue> for TypicalTestProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TypicalTestProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTest::try_from(v.clone()) { return Ok(TypicalTestProp::MedicalTest(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A single step item (as HowToStep, text, document, video, etc.) or a HowToSection.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StepProp")]
pub enum StepProp {
CreativeWork(CreativeWork),
HowToSection(HowToSection),
HowToStep(HowToStep),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "StepProp")]
impl TryFrom<SchemaValue> for StepProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StepProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(StepProp::CreativeWork(object)) }
if let Ok(object) = HowToSection::try_from(v.clone()) { return Ok(StepProp::HowToSection(object)) }
if let Ok(object) = HowToStep::try_from(v.clone()) { return Ok(StepProp::HowToStep(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StepProp")]
impl TryFrom<&SchemaValue> for StepProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StepProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(StepProp::CreativeWork(object)) }
if let Ok(object) = HowToSection::try_from(v.clone()) { return Ok(StepProp::HowToSection(object)) }
if let Ok(object) = HowToStep::try_from(v.clone()) { return Ok(StepProp::HowToStep(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The anatomical or organ system drained by this vessel; generally refers to a specific part of an organ.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RegionDrainedProp")]
pub enum RegionDrainedProp {
AnatomicalSystem(AnatomicalSystem),
AnatomicalStructure(AnatomicalStructure),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RegionDrainedProp")]
impl TryFrom<SchemaValue> for RegionDrainedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RegionDrainedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(RegionDrainedProp::AnatomicalSystem(object)) }
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(RegionDrainedProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RegionDrainedProp")]
impl TryFrom<&SchemaValue> for RegionDrainedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RegionDrainedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(RegionDrainedProp::AnatomicalSystem(object)) }
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(RegionDrainedProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Video game which is played on this server.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GameProp")]
pub enum GameProp {
Text(String),
VideoGame(VideoGame),
}
#[automatically_derived]
#[cfg(feature = "GameProp")]
impl TryFrom<SchemaValue> for GameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = VideoGame::try_from(v.clone()) { return Ok(GameProp::VideoGame(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GameProp")]
impl TryFrom<&SchemaValue> for GameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = VideoGame::try_from(v.clone()) { return Ok(GameProp::VideoGame(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The end date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EndDateProp")]
pub enum EndDateProp {
DateTime(String),
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EndDateProp")]
impl TryFrom<SchemaValue> for EndDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(EndDateProp::DateTime(v)),
SchemaValue::Date(v) => Ok(EndDateProp::Date(v)),
SchemaValue::Text(v) => Ok(EndDateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EndDateProp")]
impl TryFrom<&SchemaValue> for EndDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(EndDateProp::DateTime(v.clone())),
SchemaValue::Date(v) => Ok(EndDateProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(EndDateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The subchannel used for the broadcast.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BroadcastSubChannelProp")]
pub enum BroadcastSubChannelProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BroadcastSubChannelProp")]
impl TryFrom<SchemaValue> for BroadcastSubChannelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastSubChannelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BroadcastSubChannelProp")]
impl TryFrom<&SchemaValue> for BroadcastSubChannelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastSubChannelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date/time at which the message was sent.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DateSentProp")]
pub enum DateSentProp {
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DateSentProp")]
impl TryFrom<SchemaValue> for DateSentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(DateSentProp::DateTime(v)),
SchemaValue::Text(v) => Ok(DateSentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DateSentProp")]
impl TryFrom<&SchemaValue> for DateSentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(DateSentProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(DateSentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A medical guideline related to this entity.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GuidelineProp")]
pub enum GuidelineProp {
MedicalGuideline(MedicalGuideline),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GuidelineProp")]
impl TryFrom<SchemaValue> for GuidelineProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GuidelineProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalGuideline::try_from(v.clone()) { return Ok(GuidelineProp::MedicalGuideline(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GuidelineProp")]
impl TryFrom<&SchemaValue> for GuidelineProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GuidelineProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalGuideline::try_from(v.clone()) { return Ok(GuidelineProp::MedicalGuideline(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The torque (turning force) of the vehicle's engine.
///
/// Typical unit code(s): NU for newton metre (N m), F17 for pound-force per foot, or F48 for pound-force per inch
///
/// * Note 1: You can link to information about how the given value has been determined (e.g. reference RPM) using the [valueReference] property.
/// * Note 2: You can use [minValue] and [maxValue] to indicate ranges.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TorqueProp")]
pub enum TorqueProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TorqueProp")]
impl TryFrom<SchemaValue> for TorqueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TorqueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(TorqueProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TorqueProp")]
impl TryFrom<&SchemaValue> for TorqueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TorqueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(TorqueProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Defines the type of a price specified for an offered product, for example a list price, a (temporary) sale price or a manufacturer suggested retail price. If multiple prices are specified for an offer the [priceType] property can be used to identify the type of each such specified price. The value of priceType can be specified as a value from enumeration PriceTypeEnumeration or as a free form text string for price types that are not already predefined in PriceTypeEnumeration.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PriceTypeProp")]
pub enum PriceTypeProp {
Text(String),
PriceTypeEnumeration(PriceTypeEnumeration),
}
#[automatically_derived]
#[cfg(feature = "PriceTypeProp")]
impl TryFrom<SchemaValue> for PriceTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceTypeEnumeration::try_from(v.clone()) { return Ok(PriceTypeProp::PriceTypeEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PriceTypeProp")]
impl TryFrom<&SchemaValue> for PriceTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceTypeEnumeration::try_from(v.clone()) { return Ok(PriceTypeProp::PriceTypeEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DisambiguatingDescriptionProp")]
pub enum DisambiguatingDescriptionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DisambiguatingDescriptionProp")]
impl TryFrom<SchemaValue> for DisambiguatingDescriptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DisambiguatingDescriptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DisambiguatingDescriptionProp")]
impl TryFrom<&SchemaValue> for DisambiguatingDescriptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DisambiguatingDescriptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Information about getting tested (for a [MedicalCondition]), e.g. in the context of a pandemic.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GettingTestedInfoProp")]
pub enum GettingTestedInfoProp {
Text(String),
Url(String),
WebContent(WebContent),
}
#[automatically_derived]
#[cfg(feature = "GettingTestedInfoProp")]
impl TryFrom<SchemaValue> for GettingTestedInfoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GettingTestedInfoProp::Text(v)),
SchemaValue::Url(v) => Ok(GettingTestedInfoProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(GettingTestedInfoProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GettingTestedInfoProp")]
impl TryFrom<&SchemaValue> for GettingTestedInfoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GettingTestedInfoProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(GettingTestedInfoProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(GettingTestedInfoProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Date of birth.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BirthDateProp")]
pub enum BirthDateProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "BirthDateProp")]
impl TryFrom<SchemaValue> for BirthDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BirthDateProp::Text(v)),
SchemaValue::Date(v) => Ok(BirthDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BirthDateProp")]
impl TryFrom<&SchemaValue> for BirthDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BirthDateProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(BirthDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or otherwise life-threatening or requiring immediate medical attention), tag it as a seriousAdverseOutcome instead.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AdverseOutcomeProp")]
pub enum AdverseOutcomeProp {
Text(String),
MedicalEntity(MedicalEntity),
}
#[automatically_derived]
#[cfg(feature = "AdverseOutcomeProp")]
impl TryFrom<SchemaValue> for AdverseOutcomeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdverseOutcomeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(AdverseOutcomeProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AdverseOutcomeProp")]
impl TryFrom<&SchemaValue> for AdverseOutcomeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdverseOutcomeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(AdverseOutcomeProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Whether prescriptions can be delivered by mail.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OffersPrescriptionByMailProp")]
pub enum OffersPrescriptionByMailProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "OffersPrescriptionByMailProp")]
impl TryFrom<SchemaValue> for OffersPrescriptionByMailProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OffersPrescriptionByMailProp::Text(v)),
SchemaValue::Boolean(v) => Ok(OffersPrescriptionByMailProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OffersPrescriptionByMailProp")]
impl TryFrom<&SchemaValue> for OffersPrescriptionByMailProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OffersPrescriptionByMailProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(OffersPrescriptionByMailProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The total integer number of bedrooms in a some [Accommodation], [ApartmentComplex] or [FloorPlan].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfBedroomsProp")]
pub enum NumberOfBedroomsProp {
QuantitativeValue(QuantitativeValue),
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfBedroomsProp")]
impl TryFrom<SchemaValue> for NumberOfBedroomsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfBedroomsProp::Number(v)),
SchemaValue::Text(v) => Ok(NumberOfBedroomsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfBedroomsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfBedroomsProp")]
impl TryFrom<&SchemaValue> for NumberOfBedroomsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfBedroomsProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(NumberOfBedroomsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfBedroomsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A preventative therapy used to prevent reoccurrence of the medical condition after an initial episode of the condition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SecondaryPreventionProp")]
pub enum SecondaryPreventionProp {
MedicalTherapy(MedicalTherapy),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SecondaryPreventionProp")]
impl TryFrom<SchemaValue> for SecondaryPreventionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SecondaryPreventionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(SecondaryPreventionProp::MedicalTherapy(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SecondaryPreventionProp")]
impl TryFrom<&SchemaValue> for SecondaryPreventionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SecondaryPreventionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(SecondaryPreventionProp::MedicalTherapy(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A pointer to another product (or multiple products) for which this product is an accessory or spare part.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsAccessoryOrSparePartForProp")]
pub enum IsAccessoryOrSparePartForProp {
Product(Product),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IsAccessoryOrSparePartForProp")]
impl TryFrom<SchemaValue> for IsAccessoryOrSparePartForProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsAccessoryOrSparePartForProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsAccessoryOrSparePartForProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsAccessoryOrSparePartForProp")]
impl TryFrom<&SchemaValue> for IsAccessoryOrSparePartForProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsAccessoryOrSparePartForProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsAccessoryOrSparePartForProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of screening or video broadcast used (e.g. IMAX, 3D, SD, HD, etc.).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VideoFormatProp")]
pub enum VideoFormatProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VideoFormatProp")]
impl TryFrom<SchemaValue> for VideoFormatProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VideoFormatProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VideoFormatProp")]
impl TryFrom<&SchemaValue> for VideoFormatProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VideoFormatProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// numventuse - MECHANICAL VENTILATORS IN USE: Total number of ventilators in use.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumVentUseProp")]
pub enum CvdNumVentUseProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "CvdNumVentUseProp")]
impl TryFrom<SchemaValue> for CvdNumVentUseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumVentUseProp::Text(v)),
SchemaValue::Number(v) => Ok(CvdNumVentUseProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumVentUseProp")]
impl TryFrom<&SchemaValue> for CvdNumVentUseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumVentUseProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(CvdNumVentUseProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The Organization responsible for authenticating the user's subscription. For example, many media apps require a cable/satellite provider to authenticate your subscription before playing media.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AuthenticatorProp")]
pub enum AuthenticatorProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AuthenticatorProp")]
impl TryFrom<SchemaValue> for AuthenticatorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AuthenticatorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AuthenticatorProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AuthenticatorProp")]
impl TryFrom<&SchemaValue> for AuthenticatorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AuthenticatorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AuthenticatorProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Where a rental car can be dropped off.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DropoffLocationProp")]
pub enum DropoffLocationProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DropoffLocationProp")]
impl TryFrom<SchemaValue> for DropoffLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DropoffLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(DropoffLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DropoffLocationProp")]
impl TryFrom<&SchemaValue> for DropoffLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DropoffLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(DropoffLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A media object that encodes this CreativeWork. This property is a synonym for encoding.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AssociatedMediaProp")]
pub enum AssociatedMediaProp {
MediaObject(MediaObject),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AssociatedMediaProp")]
impl TryFrom<SchemaValue> for AssociatedMediaProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedMediaProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(AssociatedMediaProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AssociatedMediaProp")]
impl TryFrom<&SchemaValue> for AssociatedMediaProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedMediaProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(AssociatedMediaProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The terminal or port from which the boat departs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DepartureBoatTerminalProp")]
pub enum DepartureBoatTerminalProp {
BoatTerminal(BoatTerminal),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DepartureBoatTerminalProp")]
impl TryFrom<SchemaValue> for DepartureBoatTerminalProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureBoatTerminalProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BoatTerminal::try_from(v.clone()) { return Ok(DepartureBoatTerminalProp::BoatTerminal(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DepartureBoatTerminalProp")]
impl TryFrom<&SchemaValue> for DepartureBoatTerminalProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureBoatTerminalProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BoatTerminal::try_from(v.clone()) { return Ok(DepartureBoatTerminalProp::BoatTerminal(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The offer(s) -- e.g., product, quantity and price combinations -- included in the order.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AcceptedOfferProp")]
pub enum AcceptedOfferProp {
Offer(Offer),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AcceptedOfferProp")]
impl TryFrom<SchemaValue> for AcceptedOfferProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcceptedOfferProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Offer::try_from(v.clone()) { return Ok(AcceptedOfferProp::Offer(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AcceptedOfferProp")]
impl TryFrom<&SchemaValue> for AcceptedOfferProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcceptedOfferProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Offer::try_from(v.clone()) { return Ok(AcceptedOfferProp::Offer(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The duration of the loan or credit agreement.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LoanTermProp")]
pub enum LoanTermProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "LoanTermProp")]
impl TryFrom<SchemaValue> for LoanTermProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LoanTermProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(LoanTermProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LoanTermProp")]
impl TryFrom<&SchemaValue> for LoanTermProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LoanTermProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(LoanTermProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The legal requirements such as citizenship, visa and other documentation required for an applicant to this job.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EligibilityToWorkRequirementProp")]
pub enum EligibilityToWorkRequirementProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EligibilityToWorkRequirementProp")]
impl TryFrom<SchemaValue> for EligibilityToWorkRequirementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibilityToWorkRequirementProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EligibilityToWorkRequirementProp")]
impl TryFrom<&SchemaValue> for EligibilityToWorkRequirementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibilityToWorkRequirementProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Statement on diversity policy by an [Organization] e.g. a [NewsMediaOrganization]. For a [NewsMediaOrganization], a statement describing the newsroom’s diversity policy on both staffing and sources, typically providing staffing data.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DiversityPolicyProp")]
pub enum DiversityPolicyProp {
Text(String),
CreativeWork(CreativeWork),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "DiversityPolicyProp")]
impl TryFrom<SchemaValue> for DiversityPolicyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiversityPolicyProp::Text(v)),
SchemaValue::Url(v) => Ok(DiversityPolicyProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(DiversityPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DiversityPolicyProp")]
impl TryFrom<&SchemaValue> for DiversityPolicyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiversityPolicyProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(DiversityPolicyProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(DiversityPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An official rating for a lodging business or food establishment, e.g. from national associations or standards bodies. Use the author property to indicate the rating organization, e.g. as an Organization with name such as (e.g. HOTREC, DEHOGA, WHR, or Hotelstars).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StarRatingProp")]
pub enum StarRatingProp {
Rating(Rating),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "StarRatingProp")]
impl TryFrom<SchemaValue> for StarRatingProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StarRatingProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Rating::try_from(v.clone()) { return Ok(StarRatingProp::Rating(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StarRatingProp")]
impl TryFrom<&SchemaValue> for StarRatingProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StarRatingProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Rating::try_from(v.clone()) { return Ok(StarRatingProp::Rating(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A role played, performed or filled by a person or organization. For example, the team of creators for a comic book might fill the roles named 'inker', 'penciller', and 'letterer'; or an athlete in a SportsTeam might play in the position named 'Quarterback'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RoleNameProp")]
pub enum RoleNameProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "RoleNameProp")]
impl TryFrom<SchemaValue> for RoleNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RoleNameProp::Text(v)),
SchemaValue::Url(v) => Ok(RoleNameProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RoleNameProp")]
impl TryFrom<&SchemaValue> for RoleNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RoleNameProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(RoleNameProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Awards won by or for this item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AwardsProp")]
pub enum AwardsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AwardsProp")]
impl TryFrom<SchemaValue> for AwardsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AwardsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AwardsProp")]
impl TryFrom<&SchemaValue> for AwardsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AwardsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Library file name, e.g., mscorlib.dll, system.web.dll.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExecutableLibraryNameProp")]
pub enum ExecutableLibraryNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ExecutableLibraryNameProp")]
impl TryFrom<SchemaValue> for ExecutableLibraryNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExecutableLibraryNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExecutableLibraryNameProp")]
impl TryFrom<&SchemaValue> for ExecutableLibraryNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExecutableLibraryNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Frequency of payments due, i.e. number of months between payments. This is defined as a frequency, i.e. the reciprocal of a period of time.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LoanPaymentFrequencyProp")]
pub enum LoanPaymentFrequencyProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LoanPaymentFrequencyProp")]
impl TryFrom<SchemaValue> for LoanPaymentFrequencyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(LoanPaymentFrequencyProp::Number(v)),
SchemaValue::Text(v) => Ok(LoanPaymentFrequencyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LoanPaymentFrequencyProp")]
impl TryFrom<&SchemaValue> for LoanPaymentFrequencyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(LoanPaymentFrequencyProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(LoanPaymentFrequencyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether an [url] that is associated with a [JobPosting] enables direct application for the job, via the posting website. A job posting is considered to have directApply of [True] if an application process for the specified job can be directly initiated via the url(s) given (noting that e.g. multiple internet domains might nevertheless be involved at an implementation level). A value of [False] is appropriate if there is no clear path to applying directly online for the specified job, navigating directly from the JobPosting url(s) supplied.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DirectApplyProp")]
pub enum DirectApplyProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "DirectApplyProp")]
impl TryFrom<SchemaValue> for DirectApplyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DirectApplyProp::Text(v)),
SchemaValue::Boolean(v) => Ok(DirectApplyProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DirectApplyProp")]
impl TryFrom<&SchemaValue> for DirectApplyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DirectApplyProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(DirectApplyProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The platform where the train arrives.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArrivalPlatformProp")]
pub enum ArrivalPlatformProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArrivalPlatformProp")]
impl TryFrom<SchemaValue> for ArrivalPlatformProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalPlatformProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArrivalPlatformProp")]
impl TryFrom<&SchemaValue> for ArrivalPlatformProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalPlatformProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A floorplan of some [Accommodation].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccommodationFloorPlanProp")]
pub enum AccommodationFloorPlanProp {
Text(String),
FloorPlan(FloorPlan),
}
#[automatically_derived]
#[cfg(feature = "AccommodationFloorPlanProp")]
impl TryFrom<SchemaValue> for AccommodationFloorPlanProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccommodationFloorPlanProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = FloorPlan::try_from(v.clone()) { return Ok(AccommodationFloorPlanProp::FloorPlan(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccommodationFloorPlanProp")]
impl TryFrom<&SchemaValue> for AccommodationFloorPlanProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccommodationFloorPlanProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = FloorPlan::try_from(v.clone()) { return Ok(AccommodationFloorPlanProp::FloorPlan(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Amount of mortgage mandate that can be converted into a proper mortgage at a later stage.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LoanMortgageMandateAmountProp")]
pub enum LoanMortgageMandateAmountProp {
Text(String),
MonetaryAmount(MonetaryAmount),
}
#[automatically_derived]
#[cfg(feature = "LoanMortgageMandateAmountProp")]
impl TryFrom<SchemaValue> for LoanMortgageMandateAmountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LoanMortgageMandateAmountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(LoanMortgageMandateAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LoanMortgageMandateAmountProp")]
impl TryFrom<&SchemaValue> for LoanMortgageMandateAmountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LoanMortgageMandateAmountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(LoanMortgageMandateAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Current location of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItemLocationProp")]
pub enum ItemLocationProp {
PostalAddress(PostalAddress),
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ItemLocationProp")]
impl TryFrom<SchemaValue> for ItemLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(ItemLocationProp::PostalAddress(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ItemLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItemLocationProp")]
impl TryFrom<&SchemaValue> for ItemLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(ItemLocationProp::PostalAddress(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ItemLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The price range of the business, for example ```$$$```.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PriceRangeTypeProp")]
pub enum PriceRangeTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PriceRangeTypeProp")]
impl TryFrom<SchemaValue> for PriceRangeTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceRangeTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PriceRangeTypeProp")]
impl TryFrom<&SchemaValue> for PriceRangeTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceRangeTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The permitted weight of passengers and cargo, EXCLUDING the weight of the empty vehicle.
///
/// Typical unit code(s): KGM for kilogram, LBR for pound
///
/// * Note 1: Many databases specify the permitted TOTAL weight instead, which is the sum of [weight] and [payload]
/// * Note 2: You can indicate additional information in the [name] of the [QuantitativeValue] node.
/// * Note 3: You may also link to a [QualitativeValue] node that provides additional information using [valueReference].
/// * Note 4: Note that you can use [minValue] and [maxValue] to indicate ranges.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PayloadProp")]
pub enum PayloadProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PayloadProp")]
impl TryFrom<SchemaValue> for PayloadProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PayloadProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(PayloadProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PayloadProp")]
impl TryFrom<&SchemaValue> for PayloadProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PayloadProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(PayloadProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifies browser requirements in human-readable text. For example, 'requires HTML5 support'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BrowserRequirementsProp")]
pub enum BrowserRequirementsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BrowserRequirementsProp")]
impl TryFrom<SchemaValue> for BrowserRequirementsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BrowserRequirementsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BrowserRequirementsProp")]
impl TryFrom<&SchemaValue> for BrowserRequirementsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BrowserRequirementsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of object. The object that replaces.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReplacerProp")]
pub enum ReplacerProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReplacerProp")]
impl TryFrom<SchemaValue> for ReplacerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReplacerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ReplacerProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReplacerProp")]
impl TryFrom<&SchemaValue> for ReplacerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReplacerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ReplacerProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A review of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReviewProp")]
pub enum ReviewProp {
Review(Review),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReviewProp")]
impl TryFrom<SchemaValue> for ReviewProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(ReviewProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReviewProp")]
impl TryFrom<&SchemaValue> for ReviewProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(ReviewProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Any information related to overdose on a drug, including signs or symptoms, treatments, contact information for emergency response.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OverdosageProp")]
pub enum OverdosageProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OverdosageProp")]
impl TryFrom<SchemaValue> for OverdosageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OverdosageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OverdosageProp")]
impl TryFrom<&SchemaValue> for OverdosageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OverdosageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Name or unique ID of network. (Networks are often reused across different insurance plans.)
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanNetworkIdProp")]
pub enum HealthPlanNetworkIdProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanNetworkIdProp")]
impl TryFrom<SchemaValue> for HealthPlanNetworkIdProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanNetworkIdProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanNetworkIdProp")]
impl TryFrom<&SchemaValue> for HealthPlanNetworkIdProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanNetworkIdProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The program providing the membership.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProgramNameProp")]
pub enum ProgramNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProgramNameProp")]
impl TryFrom<SchemaValue> for ProgramNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgramNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProgramNameProp")]
impl TryFrom<&SchemaValue> for ProgramNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgramNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the date on which the current structured data was generated / published. Typically used alongside [sdPublisher]
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SdDatePublishedProp")]
pub enum SdDatePublishedProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "SdDatePublishedProp")]
impl TryFrom<SchemaValue> for SdDatePublishedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SdDatePublishedProp::Text(v)),
SchemaValue::Date(v) => Ok(SdDatePublishedProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SdDatePublishedProp")]
impl TryFrom<&SchemaValue> for SdDatePublishedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SdDatePublishedProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(SdDatePublishedProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of passengers that can be seated in the vehicle, both in terms of the physical space available, and in terms of limitations set by law.
///
/// Typical unit code(s): C62 for persons.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VehicleSeatingCapacityProp")]
pub enum VehicleSeatingCapacityProp {
QuantitativeValue(QuantitativeValue),
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VehicleSeatingCapacityProp")]
impl TryFrom<SchemaValue> for VehicleSeatingCapacityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(VehicleSeatingCapacityProp::Number(v)),
SchemaValue::Text(v) => Ok(VehicleSeatingCapacityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(VehicleSeatingCapacityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VehicleSeatingCapacityProp")]
impl TryFrom<&SchemaValue> for VehicleSeatingCapacityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(VehicleSeatingCapacityProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(VehicleSeatingCapacityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(VehicleSeatingCapacityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The copay amount.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanCopayProp")]
pub enum HealthPlanCopayProp {
PriceSpecification(PriceSpecification),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanCopayProp")]
impl TryFrom<SchemaValue> for HealthPlanCopayProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanCopayProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(HealthPlanCopayProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanCopayProp")]
impl TryFrom<&SchemaValue> for HealthPlanCopayProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanCopayProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(HealthPlanCopayProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// People working for this organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EmployeesProp")]
pub enum EmployeesProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "EmployeesProp")]
impl TryFrom<SchemaValue> for EmployeesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmployeesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(EmployeesProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EmployeesProp")]
impl TryFrom<&SchemaValue> for EmployeesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmployeesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(EmployeesProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The likely outcome in either the short term or long term of the medical condition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExpectedPrognosisProp")]
pub enum ExpectedPrognosisProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ExpectedPrognosisProp")]
impl TryFrom<SchemaValue> for ExpectedPrognosisProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpectedPrognosisProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExpectedPrognosisProp")]
impl TryFrom<&SchemaValue> for ExpectedPrognosisProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpectedPrognosisProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Device required to run the application. Used in cases where a specific make/model is required to run the application.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DeviceProp")]
pub enum DeviceProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DeviceProp")]
impl TryFrom<SchemaValue> for DeviceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeviceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DeviceProp")]
impl TryFrom<&SchemaValue> for DeviceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeviceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Someone working for this organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EmployeeProp")]
pub enum EmployeeProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EmployeeProp")]
impl TryFrom<SchemaValue> for EmployeeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmployeeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(EmployeeProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EmployeeProp")]
impl TryFrom<&SchemaValue> for EmployeeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmployeeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(EmployeeProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The episode to which this clip belongs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PartOfEpisodeProp")]
pub enum PartOfEpisodeProp {
Text(String),
Episode(Episode),
}
#[automatically_derived]
#[cfg(feature = "PartOfEpisodeProp")]
impl TryFrom<SchemaValue> for PartOfEpisodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfEpisodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Episode::try_from(v.clone()) { return Ok(PartOfEpisodeProp::Episode(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PartOfEpisodeProp")]
impl TryFrom<&SchemaValue> for PartOfEpisodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfEpisodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Episode::try_from(v.clone()) { return Ok(PartOfEpisodeProp::Episode(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The only way you get the money back in the event of default is the security. Recourse is where you still have the opportunity to go back to the borrower for the rest of the money.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecourseLoanProp")]
pub enum RecourseLoanProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecourseLoanProp")]
impl TryFrom<SchemaValue> for RecourseLoanProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(RecourseLoanProp::Boolean(v)),
SchemaValue::Text(v) => Ok(RecourseLoanProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecourseLoanProp")]
impl TryFrom<&SchemaValue> for RecourseLoanProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(RecourseLoanProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(RecourseLoanProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// numc19hosppats - HOSPITALIZED: Patients currently hospitalized in an inpatient care location who have suspected or confirmed COVID-19.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumC19HospPatsProp")]
pub enum CvdNumC19HospPatsProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19HospPatsProp")]
impl TryFrom<SchemaValue> for CvdNumC19HospPatsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumC19HospPatsProp::Text(v)),
SchemaValue::Number(v) => Ok(CvdNumC19HospPatsProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19HospPatsProp")]
impl TryFrom<&SchemaValue> for CvdNumC19HospPatsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumC19HospPatsProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(CvdNumC19HospPatsProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The name of the credit card or other method of payment for the order.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PaymentMethodProp")]
pub enum PaymentMethodProp {
Text(String),
PaymentMethod(PaymentMethod),
}
#[automatically_derived]
#[cfg(feature = "PaymentMethodProp")]
impl TryFrom<SchemaValue> for PaymentMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PaymentMethod::try_from(v.clone()) { return Ok(PaymentMethodProp::PaymentMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PaymentMethodProp")]
impl TryFrom<&SchemaValue> for PaymentMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PaymentMethod::try_from(v.clone()) { return Ok(PaymentMethodProp::PaymentMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// This ordering relation for qualitative values indicates that the subject is lesser than the object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LesserProp")]
pub enum LesserProp {
QualitativeValue(QualitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LesserProp")]
impl TryFrom<SchemaValue> for LesserProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LesserProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(LesserProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LesserProp")]
impl TryFrom<&SchemaValue> for LesserProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LesserProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(LesserProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Party placing the order or paying the invoice.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CustomerProp")]
pub enum CustomerProp {
Person(Person),
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "CustomerProp")]
impl TryFrom<SchemaValue> for CustomerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CustomerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CustomerProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CustomerProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CustomerProp")]
impl TryFrom<&SchemaValue> for CustomerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CustomerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CustomerProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CustomerProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Identifier of the flight's departure terminal.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DepartureTerminalProp")]
pub enum DepartureTerminalProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DepartureTerminalProp")]
impl TryFrom<SchemaValue> for DepartureTerminalProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureTerminalProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DepartureTerminalProp")]
impl TryFrom<&SchemaValue> for DepartureTerminalProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureTerminalProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether the vehicle has been used for special purposes, like commercial rental, driving school, or as a taxi. The legislation in many countries requires this information to be revealed when offering a car for sale.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VehicleSpecialUsageProp")]
pub enum VehicleSpecialUsageProp {
CarUsageType(CarUsageType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VehicleSpecialUsageProp")]
impl TryFrom<SchemaValue> for VehicleSpecialUsageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleSpecialUsageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CarUsageType::try_from(v.clone()) { return Ok(VehicleSpecialUsageProp::CarUsageType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VehicleSpecialUsageProp")]
impl TryFrom<&SchemaValue> for VehicleSpecialUsageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleSpecialUsageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CarUsageType::try_from(v.clone()) { return Ok(VehicleSpecialUsageProp::CarUsageType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market, or that translates during some event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TranslatorProp")]
pub enum TranslatorProp {
Organization(Organization),
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "TranslatorProp")]
impl TryFrom<SchemaValue> for TranslatorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TranslatorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(TranslatorProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(TranslatorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TranslatorProp")]
impl TryFrom<&SchemaValue> for TranslatorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TranslatorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(TranslatorProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(TranslatorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// ICAO identifier for an airport.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IcaoCodeProp")]
pub enum IcaoCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IcaoCodeProp")]
impl TryFrom<SchemaValue> for IcaoCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IcaoCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IcaoCodeProp")]
impl TryFrom<&SchemaValue> for IcaoCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IcaoCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The item ordered.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OrderedItemProp")]
pub enum OrderedItemProp {
Service(Service),
OrderItem(OrderItem),
Text(String),
Product(Product),
}
#[automatically_derived]
#[cfg(feature = "OrderedItemProp")]
impl TryFrom<SchemaValue> for OrderedItemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderedItemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Service::try_from(v.clone()) { return Ok(OrderedItemProp::Service(object)) }
if let Ok(object) = OrderItem::try_from(v.clone()) { return Ok(OrderedItemProp::OrderItem(object)) }
if let Ok(object) = Product::try_from(v.clone()) { return Ok(OrderedItemProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OrderedItemProp")]
impl TryFrom<&SchemaValue> for OrderedItemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderedItemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Service::try_from(v.clone()) { return Ok(OrderedItemProp::Service(object)) }
if let Ok(object) = OrderItem::try_from(v.clone()) { return Ok(OrderedItemProp::OrderItem(object)) }
if let Ok(object) = Product::try_from(v.clone()) { return Ok(OrderedItemProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a correction to a [CreativeWork], either via a [CorrectionComment], textually or in another document.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CorrectionProp")]
pub enum CorrectionProp {
Url(String),
Text(String),
CorrectionComment(CorrectionComment),
}
#[automatically_derived]
#[cfg(feature = "CorrectionProp")]
impl TryFrom<SchemaValue> for CorrectionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CorrectionProp::Url(v)),
SchemaValue::Text(v) => Ok(CorrectionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CorrectionComment::try_from(v.clone()) { return Ok(CorrectionProp::CorrectionComment(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CorrectionProp")]
impl TryFrom<&SchemaValue> for CorrectionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CorrectionProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(CorrectionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CorrectionComment::try_from(v.clone()) { return Ok(CorrectionProp::CorrectionComment(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SeriousAdverseOutcomeProp")]
pub enum SeriousAdverseOutcomeProp {
MedicalEntity(MedicalEntity),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SeriousAdverseOutcomeProp")]
impl TryFrom<SchemaValue> for SeriousAdverseOutcomeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeriousAdverseOutcomeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(SeriousAdverseOutcomeProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SeriousAdverseOutcomeProp")]
impl TryFrom<&SchemaValue> for SeriousAdverseOutcomeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeriousAdverseOutcomeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(SeriousAdverseOutcomeProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Closest child taxa of the taxon in question.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ChildTaxonProp")]
pub enum ChildTaxonProp {
Text(String),
Url(String),
Taxon(Taxon),
}
#[automatically_derived]
#[cfg(feature = "ChildTaxonProp")]
impl TryFrom<SchemaValue> for ChildTaxonProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ChildTaxonProp::Text(v)),
SchemaValue::Url(v) => Ok(ChildTaxonProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Taxon::try_from(v.clone()) { return Ok(ChildTaxonProp::Taxon(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ChildTaxonProp")]
impl TryFrom<&SchemaValue> for ChildTaxonProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ChildTaxonProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ChildTaxonProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Taxon::try_from(v.clone()) { return Ok(ChildTaxonProp::Taxon(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The longitude of a location. For example ```-122.08585``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LongitudeProp")]
pub enum LongitudeProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "LongitudeProp")]
impl TryFrom<SchemaValue> for LongitudeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LongitudeProp::Text(v)),
SchemaValue::Number(v) => Ok(LongitudeProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LongitudeProp")]
impl TryFrom<&SchemaValue> for LongitudeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LongitudeProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(LongitudeProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The name of the train (e.g. The Orient Express).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TrainNameProp")]
pub enum TrainNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TrainNameProp")]
impl TryFrom<SchemaValue> for TrainNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrainNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TrainNameProp")]
impl TryFrom<&SchemaValue> for TrainNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrainNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Whether the property must be filled in to complete the action. Default is false.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValueRequiredProp")]
pub enum ValueRequiredProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "ValueRequiredProp")]
impl TryFrom<SchemaValue> for ValueRequiredProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValueRequiredProp::Text(v)),
SchemaValue::Boolean(v) => Ok(ValueRequiredProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValueRequiredProp")]
impl TryFrom<&SchemaValue> for ValueRequiredProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValueRequiredProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(ValueRequiredProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Publication date of an online listing.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DatePostedProp")]
pub enum DatePostedProp {
Text(String),
DateTime(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "DatePostedProp")]
impl TryFrom<SchemaValue> for DatePostedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DatePostedProp::Text(v)),
SchemaValue::DateTime(v) => Ok(DatePostedProp::DateTime(v)),
SchemaValue::Date(v) => Ok(DatePostedProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DatePostedProp")]
impl TryFrom<&SchemaValue> for DatePostedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DatePostedProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(DatePostedProp::DateTime(v.clone())),
SchemaValue::Date(v) => Ok(DatePostedProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a [Product] that is a member of this [ProductGroup] (or [ProductModel]).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasVariantProp")]
pub enum HasVariantProp {
Product(Product),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasVariantProp")]
impl TryFrom<SchemaValue> for HasVariantProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasVariantProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(HasVariantProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasVariantProp")]
impl TryFrom<&SchemaValue> for HasVariantProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasVariantProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(HasVariantProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BrokerProp")]
pub enum BrokerProp {
Text(String),
Person(Person),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "BrokerProp")]
impl TryFrom<SchemaValue> for BrokerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BrokerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(BrokerProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BrokerProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BrokerProp")]
impl TryFrom<&SchemaValue> for BrokerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BrokerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(BrokerProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BrokerProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Destination address.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DeliveryAddressProp")]
pub enum DeliveryAddressProp {
PostalAddress(PostalAddress),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DeliveryAddressProp")]
impl TryFrom<SchemaValue> for DeliveryAddressProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeliveryAddressProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(DeliveryAddressProp::PostalAddress(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DeliveryAddressProp")]
impl TryFrom<&SchemaValue> for DeliveryAddressProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeliveryAddressProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(DeliveryAddressProp::PostalAddress(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The start date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StartDateProp")]
pub enum StartDateProp {
Text(String),
DateTime(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "StartDateProp")]
impl TryFrom<SchemaValue> for StartDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StartDateProp::Text(v)),
SchemaValue::DateTime(v) => Ok(StartDateProp::DateTime(v)),
SchemaValue::Date(v) => Ok(StartDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StartDateProp")]
impl TryFrom<&SchemaValue> for StartDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StartDateProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(StartDateProp::DateTime(v.clone())),
SchemaValue::Date(v) => Ok(StartDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the design and body style of the vehicle (e.g. station wagon, hatchback, etc.).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BodyTypeProp")]
pub enum BodyTypeProp {
Url(String),
Text(String),
QualitativeValue(QualitativeValue),
}
#[automatically_derived]
#[cfg(feature = "BodyTypeProp")]
impl TryFrom<SchemaValue> for BodyTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(BodyTypeProp::Url(v)),
SchemaValue::Text(v) => Ok(BodyTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(BodyTypeProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BodyTypeProp")]
impl TryFrom<&SchemaValue> for BodyTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(BodyTypeProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(BodyTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(BodyTypeProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Further documentation describing the Web API in more detail.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DocumentationProp")]
pub enum DocumentationProp {
CreativeWork(CreativeWork),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DocumentationProp")]
impl TryFrom<SchemaValue> for DocumentationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(DocumentationProp::Url(v)),
SchemaValue::Text(v) => Ok(DocumentationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(DocumentationProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DocumentationProp")]
impl TryFrom<&SchemaValue> for DocumentationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(DocumentationProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(DocumentationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(DocumentationProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The unit of the dose, e.g. 'mg'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DoseUnitProp")]
pub enum DoseUnitProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DoseUnitProp")]
impl TryFrom<SchemaValue> for DoseUnitProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DoseUnitProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DoseUnitProp")]
impl TryFrom<&SchemaValue> for DoseUnitProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DoseUnitProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Link to a page containing [ShippingRateSettings] and [DeliveryTimeSettings] details.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ShippingSettingsLinkProp")]
pub enum ShippingSettingsLinkProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ShippingSettingsLinkProp")]
impl TryFrom<SchemaValue> for ShippingSettingsLinkProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ShippingSettingsLinkProp::Url(v)),
SchemaValue::Text(v) => Ok(ShippingSettingsLinkProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ShippingSettingsLinkProp")]
impl TryFrom<&SchemaValue> for ShippingSettingsLinkProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ShippingSettingsLinkProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(ShippingSettingsLinkProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// People or organizations that endorse the plan.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EndorsersProp")]
pub enum EndorsersProp {
Organization(Organization),
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "EndorsersProp")]
impl TryFrom<SchemaValue> for EndorsersProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EndorsersProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(EndorsersProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(EndorsersProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EndorsersProp")]
impl TryFrom<&SchemaValue> for EndorsersProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EndorsersProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(EndorsersProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(EndorsersProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Days of the week when the merchant typically operates, indicated via opening hours markup.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BusinessDaysProp")]
pub enum BusinessDaysProp {
OpeningHoursSpecification(OpeningHoursSpecification),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BusinessDaysProp")]
impl TryFrom<SchemaValue> for BusinessDaysProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BusinessDaysProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OpeningHoursSpecification::try_from(v.clone()) { return Ok(BusinessDaysProp::OpeningHoursSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BusinessDaysProp")]
impl TryFrom<&SchemaValue> for BusinessDaysProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BusinessDaysProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OpeningHoursSpecification::try_from(v.clone()) { return Ok(BusinessDaysProp::OpeningHoursSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A data catalog which contains this dataset (this property was previously 'catalog', preferred name is now 'includedInDataCatalog').
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncludedDataCatalogProp")]
pub enum IncludedDataCatalogProp {
DataCatalog(DataCatalog),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IncludedDataCatalogProp")]
impl TryFrom<SchemaValue> for IncludedDataCatalogProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludedDataCatalogProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataCatalog::try_from(v.clone()) { return Ok(IncludedDataCatalogProp::DataCatalog(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncludedDataCatalogProp")]
impl TryFrom<&SchemaValue> for IncludedDataCatalogProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludedDataCatalogProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataCatalog::try_from(v.clone()) { return Ok(IncludedDataCatalogProp::DataCatalog(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The geo coordinates of the place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoProp")]
pub enum GeoProp {
GeoCoordinates(GeoCoordinates),
Text(String),
GeoShape(GeoShape),
}
#[automatically_derived]
#[cfg(feature = "GeoProp")]
impl TryFrom<SchemaValue> for GeoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeoCoordinates::try_from(v.clone()) { return Ok(GeoProp::GeoCoordinates(object)) }
if let Ok(object) = GeoShape::try_from(v.clone()) { return Ok(GeoProp::GeoShape(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoProp")]
impl TryFrom<&SchemaValue> for GeoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeoCoordinates::try_from(v.clone()) { return Ok(GeoProp::GeoCoordinates(object)) }
if let Ok(object) = GeoShape::try_from(v.clone()) { return Ok(GeoProp::GeoShape(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates if this web page element is the main subject of the page.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MainContentOfPageProp")]
pub enum MainContentOfPageProp {
WebPageElement(WebPageElement),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MainContentOfPageProp")]
impl TryFrom<SchemaValue> for MainContentOfPageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MainContentOfPageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebPageElement::try_from(v.clone()) { return Ok(MainContentOfPageProp::WebPageElement(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MainContentOfPageProp")]
impl TryFrom<&SchemaValue> for MainContentOfPageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MainContentOfPageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebPageElement::try_from(v.clone()) { return Ok(MainContentOfPageProp::WebPageElement(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date and time of giving up ownership on the product.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OwnedThroughProp")]
pub enum OwnedThroughProp {
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OwnedThroughProp")]
impl TryFrom<SchemaValue> for OwnedThroughProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(OwnedThroughProp::DateTime(v)),
SchemaValue::Text(v) => Ok(OwnedThroughProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OwnedThroughProp")]
impl TryFrom<&SchemaValue> for OwnedThroughProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(OwnedThroughProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(OwnedThroughProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The billing address for the order.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BillingAddressProp")]
pub enum BillingAddressProp {
Text(String),
PostalAddress(PostalAddress),
}
#[automatically_derived]
#[cfg(feature = "BillingAddressProp")]
impl TryFrom<SchemaValue> for BillingAddressProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BillingAddressProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(BillingAddressProp::PostalAddress(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BillingAddressProp")]
impl TryFrom<&SchemaValue> for BillingAddressProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BillingAddressProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(BillingAddressProp::PostalAddress(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A CreativeWork attached to the message.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MessageAttachmentProp")]
pub enum MessageAttachmentProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MessageAttachmentProp")]
impl TryFrom<SchemaValue> for MessageAttachmentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MessageAttachmentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(MessageAttachmentProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MessageAttachmentProp")]
impl TryFrom<&SchemaValue> for MessageAttachmentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MessageAttachmentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(MessageAttachmentProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The color or color combination of the interior of the vehicle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VehicleInteriorColorProp")]
pub enum VehicleInteriorColorProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VehicleInteriorColorProp")]
impl TryFrom<SchemaValue> for VehicleInteriorColorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleInteriorColorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VehicleInteriorColorProp")]
impl TryFrom<&SchemaValue> for VehicleInteriorColorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleInteriorColorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Systematic method of naming chemical compounds as recommended by the International Union of Pure and Applied Chemistry (IUPAC).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IupacNameProp")]
pub enum IupacNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IupacNameProp")]
impl TryFrom<SchemaValue> for IupacNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IupacNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IupacNameProp")]
impl TryFrom<&SchemaValue> for IupacNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IupacNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The highest price of all offers available.
///
/// Usage guidelines:
///
/// * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.
/// * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HighPriceProp")]
pub enum HighPriceProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HighPriceProp")]
impl TryFrom<SchemaValue> for HighPriceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(HighPriceProp::Number(v)),
SchemaValue::Text(v) => Ok(HighPriceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HighPriceProp")]
impl TryFrom<&SchemaValue> for HighPriceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(HighPriceProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(HighPriceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The status of a creative work in terms of its stage in a lifecycle. Example terms include Incomplete, Draft, Published, Obsolete. Some organizations define a set of terms for the stages of their publication lifecycle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CreativeWorkStatusProp")]
pub enum CreativeWorkStatusProp {
Text(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "CreativeWorkStatusProp")]
impl TryFrom<SchemaValue> for CreativeWorkStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CreativeWorkStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(CreativeWorkStatusProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CreativeWorkStatusProp")]
impl TryFrom<&SchemaValue> for CreativeWorkStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CreativeWorkStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(CreativeWorkStatusProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The geographic area where a service or offered item is provided.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AreaServedProp")]
pub enum AreaServedProp {
Text(String),
Place(Place),
GeoShape(GeoShape),
AdministrativeArea(AdministrativeArea),
}
#[automatically_derived]
#[cfg(feature = "AreaServedProp")]
impl TryFrom<SchemaValue> for AreaServedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AreaServedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(AreaServedProp::Place(object)) }
if let Ok(object) = GeoShape::try_from(v.clone()) { return Ok(AreaServedProp::GeoShape(object)) }
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(AreaServedProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AreaServedProp")]
impl TryFrom<&SchemaValue> for AreaServedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AreaServedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(AreaServedProp::Place(object)) }
if let Ok(object) = GeoShape::try_from(v.clone()) { return Ok(AreaServedProp::GeoShape(object)) }
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(AreaServedProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Physical address of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AddressProp")]
pub enum AddressProp {
PostalAddress(PostalAddress),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AddressProp")]
impl TryFrom<SchemaValue> for AddressProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AddressProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(AddressProp::PostalAddress(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AddressProp")]
impl TryFrom<&SchemaValue> for AddressProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AddressProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(AddressProp::PostalAddress(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CommentCountProp")]
pub enum CommentCountProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CommentCountProp")]
impl TryFrom<SchemaValue> for CommentCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(CommentCountProp::Integer(v)),
SchemaValue::Text(v) => Ok(CommentCountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CommentCountProp")]
impl TryFrom<&SchemaValue> for CommentCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(CommentCountProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(CommentCountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The duration of the warranty promise. Common unitCode values are ANN for year, MON for months, or DAY for days.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DurationOfWarrantyProp")]
pub enum DurationOfWarrantyProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "DurationOfWarrantyProp")]
impl TryFrom<SchemaValue> for DurationOfWarrantyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DurationOfWarrantyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(DurationOfWarrantyProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DurationOfWarrantyProp")]
impl TryFrom<&SchemaValue> for DurationOfWarrantyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DurationOfWarrantyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(DurationOfWarrantyProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The name of the application suite to which the application belongs (e.g. Excel belongs to Office).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ApplicationSuiteProp")]
pub enum ApplicationSuiteProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ApplicationSuiteProp")]
impl TryFrom<SchemaValue> for ApplicationSuiteProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationSuiteProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ApplicationSuiteProp")]
impl TryFrom<&SchemaValue> for ApplicationSuiteProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationSuiteProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sign detected by the test.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SignDetectedProp")]
pub enum SignDetectedProp {
Text(String),
MedicalSign(MedicalSign),
}
#[automatically_derived]
#[cfg(feature = "SignDetectedProp")]
impl TryFrom<SchemaValue> for SignDetectedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SignDetectedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalSign::try_from(v.clone()) { return Ok(SignDetectedProp::MedicalSign(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SignDetectedProp")]
impl TryFrom<&SchemaValue> for SignDetectedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SignDetectedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalSign::try_from(v.clone()) { return Ok(SignDetectedProp::MedicalSign(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An individual or organization that has some kind of responsibility for the legislation. Typically the ministry who is/was in charge of elaborating the legislation, or the adressee for potential questions about the legislation once it is published.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationResponsibleProp")]
pub enum LegislationResponsibleProp {
Person(Person),
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LegislationResponsibleProp")]
impl TryFrom<SchemaValue> for LegislationResponsibleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationResponsibleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LegislationResponsibleProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(LegislationResponsibleProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationResponsibleProp")]
impl TryFrom<&SchemaValue> for LegislationResponsibleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationResponsibleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LegislationResponsibleProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(LegislationResponsibleProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The edition of the print product in which the NewsArticle appears.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PrintEditionProp")]
pub enum PrintEditionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PrintEditionProp")]
impl TryFrom<SchemaValue> for PrintEditionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrintEditionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PrintEditionProp")]
impl TryFrom<&SchemaValue> for PrintEditionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrintEditionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The currency of the price, or a price component when attached to [PriceSpecification] and its subtypes.
///
/// Use standard formats: [ISO 4217 currency format](http://en.wikipedia.org/wiki/ISO_4217), e.g. "USD"; [Ticker symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for cryptocurrencies, e.g. "BTC"; well known names for [Local Exchange Trading Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system) (LETS) and other currency types, e.g. "Ithaca HOUR".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PriceCurrencyProp")]
pub enum PriceCurrencyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PriceCurrencyProp")]
impl TryFrom<SchemaValue> for PriceCurrencyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceCurrencyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PriceCurrencyProp")]
impl TryFrom<&SchemaValue> for PriceCurrencyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceCurrencyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A course or class that is one of the learning opportunities that constitute an educational / occupational program. No information is implied about whether the course is mandatory or optional; no guarantee is implied about whether the course will be available to everyone on the program.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasCourseProp")]
pub enum HasCourseProp {
Text(String),
Course(Course),
}
#[automatically_derived]
#[cfg(feature = "HasCourseProp")]
impl TryFrom<SchemaValue> for HasCourseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasCourseProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Course::try_from(v.clone()) { return Ok(HasCourseProp::Course(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasCourseProp")]
impl TryFrom<&SchemaValue> for HasCourseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasCourseProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Course::try_from(v.clone()) { return Ok(HasCourseProp::Course(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The cost per unit of the drug.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CostPerUnitProp")]
pub enum CostPerUnitProp {
Text(String),
Number(f64),
QualitativeValue(QualitativeValue),
}
#[automatically_derived]
#[cfg(feature = "CostPerUnitProp")]
impl TryFrom<SchemaValue> for CostPerUnitProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CostPerUnitProp::Text(v)),
SchemaValue::Number(v) => Ok(CostPerUnitProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(CostPerUnitProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CostPerUnitProp")]
impl TryFrom<&SchemaValue> for CostPerUnitProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CostPerUnitProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(CostPerUnitProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(CostPerUnitProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifying the health condition(s) of a patient, medical study, or other target audience.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthConditionProp")]
pub enum HealthConditionProp {
Text(String),
MedicalCondition(MedicalCondition),
}
#[automatically_derived]
#[cfg(feature = "HealthConditionProp")]
impl TryFrom<SchemaValue> for HealthConditionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthConditionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCondition::try_from(v.clone()) { return Ok(HealthConditionProp::MedicalCondition(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthConditionProp")]
impl TryFrom<&SchemaValue> for HealthConditionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthConditionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCondition::try_from(v.clone()) { return Ok(HealthConditionProp::MedicalCondition(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sibling of the person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SiblingProp")]
pub enum SiblingProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SiblingProp")]
impl TryFrom<SchemaValue> for SiblingProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SiblingProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SiblingProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SiblingProp")]
impl TryFrom<&SchemaValue> for SiblingProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SiblingProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SiblingProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of location. The sports event where this action occurred.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SportsEventProp")]
pub enum SportsEventProp {
Text(String),
SportsEvent(SportsEvent),
}
#[automatically_derived]
#[cfg(feature = "SportsEventProp")]
impl TryFrom<SchemaValue> for SportsEventProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SportsEventProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SportsEvent::try_from(v.clone()) { return Ok(SportsEventProp::SportsEvent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SportsEventProp")]
impl TryFrom<&SchemaValue> for SportsEventProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SportsEventProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SportsEvent::try_from(v.clone()) { return Ok(SportsEventProp::SportsEvent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The unique address by which the BroadcastService can be identified in a provider lineup. In US, this is typically a number.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BroadcastChannelIdProp")]
pub enum BroadcastChannelIdProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BroadcastChannelIdProp")]
impl TryFrom<SchemaValue> for BroadcastChannelIdProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastChannelIdProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BroadcastChannelIdProp")]
impl TryFrom<&SchemaValue> for BroadcastChannelIdProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastChannelIdProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Subcategory of the application, e.g. 'Arcade Game'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ApplicationSubCategoryProp")]
pub enum ApplicationSubCategoryProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "ApplicationSubCategoryProp")]
impl TryFrom<SchemaValue> for ApplicationSubCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationSubCategoryProp::Text(v)),
SchemaValue::Url(v) => Ok(ApplicationSubCategoryProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ApplicationSubCategoryProp")]
impl TryFrom<&SchemaValue> for ApplicationSubCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationSubCategoryProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ApplicationSubCategoryProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The algorithm or rules to follow to compute the score.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlgorithmProp")]
pub enum AlgorithmProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AlgorithmProp")]
impl TryFrom<SchemaValue> for AlgorithmProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlgorithmProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlgorithmProp")]
impl TryFrom<&SchemaValue> for AlgorithmProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlgorithmProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A set of requirements that must be fulfilled in order to perform an Action. If more than one value is specified, fulfilling one set of requirements will allow the Action to be performed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ActionAccessibilityRequirementProp")]
pub enum ActionAccessibilityRequirementProp {
Text(String),
ActionAccessSpecification(ActionAccessSpecification),
}
#[automatically_derived]
#[cfg(feature = "ActionAccessibilityRequirementProp")]
impl TryFrom<SchemaValue> for ActionAccessibilityRequirementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionAccessibilityRequirementProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ActionAccessSpecification::try_from(v.clone()) { return Ok(ActionAccessibilityRequirementProp::ActionAccessSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ActionAccessibilityRequirementProp")]
impl TryFrom<&SchemaValue> for ActionAccessibilityRequirementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionAccessibilityRequirementProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ActionAccessSpecification::try_from(v.clone()) { return Ok(ActionAccessibilityRequirementProp::ActionAccessSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Whether the copay is before or after deductible, etc. TODO: Is this a closed set?
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanCopayOptionProp")]
pub enum HealthPlanCopayOptionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanCopayOptionProp")]
impl TryFrom<SchemaValue> for HealthPlanCopayOptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanCopayOptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanCopayOptionProp")]
impl TryFrom<&SchemaValue> for HealthPlanCopayOptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanCopayOptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// TODO.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanDrugOptionProp")]
pub enum HealthPlanDrugOptionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanDrugOptionProp")]
impl TryFrom<SchemaValue> for HealthPlanDrugOptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanDrugOptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanDrugOptionProp")]
impl TryFrom<&SchemaValue> for HealthPlanDrugOptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanDrugOptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The medium or means of delivery of the course instance or the mode of study, either as a text label (e.g. "online", "onsite" or "blended"; "synchronous" or "asynchronous"; "full-time" or "part-time") or as a URL reference to a term from a controlled vocabulary (e.g. https://ceds.ed.gov/element/001311#Asynchronous).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CourseModeProp")]
pub enum CourseModeProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CourseModeProp")]
impl TryFrom<SchemaValue> for CourseModeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CourseModeProp::Url(v)),
SchemaValue::Text(v) => Ok(CourseModeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CourseModeProp")]
impl TryFrom<&SchemaValue> for CourseModeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CourseModeProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(CourseModeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Prerequisites needed to fulfill steps in article.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DependenciesProp")]
pub enum DependenciesProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DependenciesProp")]
impl TryFrom<SchemaValue> for DependenciesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DependenciesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DependenciesProp")]
impl TryFrom<&SchemaValue> for DependenciesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DependenciesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Maximum recommended age in years for the audience or user.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SuggestedMaxAgeProp")]
pub enum SuggestedMaxAgeProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SuggestedMaxAgeProp")]
impl TryFrom<SchemaValue> for SuggestedMaxAgeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(SuggestedMaxAgeProp::Number(v)),
SchemaValue::Text(v) => Ok(SuggestedMaxAgeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SuggestedMaxAgeProp")]
impl TryFrom<&SchemaValue> for SuggestedMaxAgeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(SuggestedMaxAgeProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(SuggestedMaxAgeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of grams of protein.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProteinContentProp")]
pub enum ProteinContentProp {
Mass(Mass),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProteinContentProp")]
impl TryFrom<SchemaValue> for ProteinContentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProteinContentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(ProteinContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProteinContentProp")]
impl TryFrom<&SchemaValue> for ProteinContentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProteinContentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(ProteinContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Description of skills and experience needed for the position or Occupation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExperienceRequirementsProp")]
pub enum ExperienceRequirementsProp {
Text(String),
OccupationalExperienceRequirements(OccupationalExperienceRequirements),
}
#[automatically_derived]
#[cfg(feature = "ExperienceRequirementsProp")]
impl TryFrom<SchemaValue> for ExperienceRequirementsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExperienceRequirementsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OccupationalExperienceRequirements::try_from(v.clone()) { return Ok(ExperienceRequirementsProp::OccupationalExperienceRequirements(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExperienceRequirementsProp")]
impl TryFrom<&SchemaValue> for ExperienceRequirementsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExperienceRequirementsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OccupationalExperienceRequirements::try_from(v.clone()) { return Ok(ExperienceRequirementsProp::OccupationalExperienceRequirements(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The size system used to identify a product's size. Typically either a standard (for example, "GS1" or "ISO-EN13402"), country code (for example "US" or "JP"), or a measuring system (for example "Metric" or "Imperial").
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SizeSystemProp")]
pub enum SizeSystemProp {
SizeSystemEnumeration(SizeSystemEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SizeSystemProp")]
impl TryFrom<SchemaValue> for SizeSystemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SizeSystemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SizeSystemEnumeration::try_from(v.clone()) { return Ok(SizeSystemProp::SizeSystemEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SizeSystemProp")]
impl TryFrom<&SchemaValue> for SizeSystemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SizeSystemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SizeSystemEnumeration::try_from(v.clone()) { return Ok(SizeSystemProp::SizeSystemEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Supporting data for a SoftwareApplication.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SupportingDataProp")]
pub enum SupportingDataProp {
Text(String),
DataFeed(DataFeed),
}
#[automatically_derived]
#[cfg(feature = "SupportingDataProp")]
impl TryFrom<SchemaValue> for SupportingDataProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SupportingDataProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataFeed::try_from(v.clone()) { return Ok(SupportingDataProp::DataFeed(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SupportingDataProp")]
impl TryFrom<&SchemaValue> for SupportingDataProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SupportingDataProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataFeed::try_from(v.clone()) { return Ok(SupportingDataProp::DataFeed(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An associated [Review].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AssociatedReviewProp")]
pub enum AssociatedReviewProp {
Review(Review),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AssociatedReviewProp")]
impl TryFrom<SchemaValue> for AssociatedReviewProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedReviewProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(AssociatedReviewProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AssociatedReviewProp")]
impl TryFrom<&SchemaValue> for AssociatedReviewProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedReviewProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(AssociatedReviewProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An additional offer that can only be obtained in combination with the first base offer (e.g. supplements and extensions that are available for a surcharge).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AddOnProp")]
pub enum AddOnProp {
Text(String),
Offer(Offer),
}
#[automatically_derived]
#[cfg(feature = "AddOnProp")]
impl TryFrom<SchemaValue> for AddOnProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AddOnProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Offer::try_from(v.clone()) { return Ok(AddOnProp::Offer(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AddOnProp")]
impl TryFrom<&SchemaValue> for AddOnProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AddOnProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Offer::try_from(v.clone()) { return Ok(AddOnProp::Offer(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A BioChemEntity that is known to interact with this item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BioChemInteractionProp")]
pub enum BioChemInteractionProp {
BioChemEntity(BioChemEntity),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BioChemInteractionProp")]
impl TryFrom<SchemaValue> for BioChemInteractionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BioChemInteractionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(BioChemInteractionProp::BioChemEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BioChemInteractionProp")]
impl TryFrom<&SchemaValue> for BioChemInteractionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BioChemInteractionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(BioChemInteractionProp::BioChemEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The product or service this support contact point is related to (such as product support for a particular product line). This can be a specific product or product line (e.g. "iPhone") or a general category of products or services (e.g. "smartphones").
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProductSupportedProp")]
pub enum ProductSupportedProp {
Product(Product),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProductSupportedProp")]
impl TryFrom<SchemaValue> for ProductSupportedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProductSupportedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(ProductSupportedProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProductSupportedProp")]
impl TryFrom<&SchemaValue> for ProductSupportedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProductSupportedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(ProductSupportedProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Conditions that affect the availability of, or method(s) of access to, an item. Typically used for real world items such as an [ArchiveComponent] held by an [ArchiveOrganization]. This property is not suitable for use as a general Web access control mechanism. It is expressed only in natural language.
///
/// For example "Available by appointment from the Reading Room" or "Accessible only from logged-in accounts ".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ConditionsOfAccessProp")]
pub enum ConditionsOfAccessProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ConditionsOfAccessProp")]
impl TryFrom<SchemaValue> for ConditionsOfAccessProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ConditionsOfAccessProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ConditionsOfAccessProp")]
impl TryFrom<&SchemaValue> for ConditionsOfAccessProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ConditionsOfAccessProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// exif data for this object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExifDataProp")]
pub enum ExifDataProp {
PropertyValue(PropertyValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ExifDataProp")]
impl TryFrom<SchemaValue> for ExifDataProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExifDataProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(ExifDataProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExifDataProp")]
impl TryFrom<&SchemaValue> for ExifDataProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExifDataProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(ExifDataProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A posting that is part of this blog.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BlogPostProp")]
pub enum BlogPostProp {
Text(String),
BlogPosting(BlogPosting),
}
#[automatically_derived]
#[cfg(feature = "BlogPostProp")]
impl TryFrom<SchemaValue> for BlogPostProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BlogPostProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BlogPosting::try_from(v.clone()) { return Ok(BlogPostProp::BlogPosting(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BlogPostProp")]
impl TryFrom<&SchemaValue> for BlogPostProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BlogPostProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BlogPosting::try_from(v.clone()) { return Ok(BlogPostProp::BlogPosting(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The maximum number of students who may be enrolled in the program.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MaximumEnrollmentProp")]
pub enum MaximumEnrollmentProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MaximumEnrollmentProp")]
impl TryFrom<SchemaValue> for MaximumEnrollmentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(MaximumEnrollmentProp::Integer(v)),
SchemaValue::Text(v) => Ok(MaximumEnrollmentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MaximumEnrollmentProp")]
impl TryFrom<&SchemaValue> for MaximumEnrollmentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(MaximumEnrollmentProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(MaximumEnrollmentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Defines the frequency at which [Event]s will occur according to a schedule [Schedule]. The intervals between
/// events should be defined as a [Duration] of time.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RepeatFrequencyProp")]
pub enum RepeatFrequencyProp {
Text(String),
Duration(Duration),
}
#[automatically_derived]
#[cfg(feature = "RepeatFrequencyProp")]
impl TryFrom<SchemaValue> for RepeatFrequencyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RepeatFrequencyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(RepeatFrequencyProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RepeatFrequencyProp")]
impl TryFrom<&SchemaValue> for RepeatFrequencyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RepeatFrequencyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(RepeatFrequencyProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of return fees for returns of defect products.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItemDefectReturnFeesProp")]
pub enum ItemDefectReturnFeesProp {
ReturnFeesEnumeration(ReturnFeesEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ItemDefectReturnFeesProp")]
impl TryFrom<SchemaValue> for ItemDefectReturnFeesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemDefectReturnFeesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnFeesEnumeration::try_from(v.clone()) { return Ok(ItemDefectReturnFeesProp::ReturnFeesEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItemDefectReturnFeesProp")]
impl TryFrom<&SchemaValue> for ItemDefectReturnFeesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemDefectReturnFeesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnFeesEnumeration::try_from(v.clone()) { return Ok(ItemDefectReturnFeesProp::ReturnFeesEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The payment method(s) accepted by seller for this offer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AcceptedPaymentMethodProp")]
pub enum AcceptedPaymentMethodProp {
Text(String),
PaymentMethod(PaymentMethod),
LoanOrCredit(LoanOrCredit),
}
#[automatically_derived]
#[cfg(feature = "AcceptedPaymentMethodProp")]
impl TryFrom<SchemaValue> for AcceptedPaymentMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcceptedPaymentMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PaymentMethod::try_from(v.clone()) { return Ok(AcceptedPaymentMethodProp::PaymentMethod(object)) }
if let Ok(object) = LoanOrCredit::try_from(v.clone()) { return Ok(AcceptedPaymentMethodProp::LoanOrCredit(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AcceptedPaymentMethodProp")]
impl TryFrom<&SchemaValue> for AcceptedPaymentMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcceptedPaymentMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PaymentMethod::try_from(v.clone()) { return Ok(AcceptedPaymentMethodProp::PaymentMethod(object)) }
if let Ok(object) = LoanOrCredit::try_from(v.clone()) { return Ok(AcceptedPaymentMethodProp::LoanOrCredit(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The identifier of the transaction.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OrderNumberProp")]
pub enum OrderNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OrderNumberProp")]
impl TryFrom<SchemaValue> for OrderNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OrderNumberProp")]
impl TryFrom<&SchemaValue> for OrderNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValidThroughProp")]
pub enum ValidThroughProp {
Date(String),
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ValidThroughProp")]
impl TryFrom<SchemaValue> for ValidThroughProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ValidThroughProp::Date(v)),
SchemaValue::DateTime(v) => Ok(ValidThroughProp::DateTime(v)),
SchemaValue::Text(v) => Ok(ValidThroughProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValidThroughProp")]
impl TryFrom<&SchemaValue> for ValidThroughProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ValidThroughProp::Date(v.clone())),
SchemaValue::DateTime(v) => Ok(ValidThroughProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(ValidThroughProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The special opening hours of a certain place.
///
/// Use this to explicitly override general opening hours brought in scope by [openingHoursSpecification] or [openingHours].
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SpecialOpeningHoursSpecificationProp")]
pub enum SpecialOpeningHoursSpecificationProp {
OpeningHoursSpecification(OpeningHoursSpecification),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SpecialOpeningHoursSpecificationProp")]
impl TryFrom<SchemaValue> for SpecialOpeningHoursSpecificationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpecialOpeningHoursSpecificationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OpeningHoursSpecification::try_from(v.clone()) { return Ok(SpecialOpeningHoursSpecificationProp::OpeningHoursSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SpecialOpeningHoursSpecificationProp")]
impl TryFrom<&SchemaValue> for SpecialOpeningHoursSpecificationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpecialOpeningHoursSpecificationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OpeningHoursSpecification::try_from(v.clone()) { return Ok(SpecialOpeningHoursSpecificationProp::OpeningHoursSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WorstRatingProp")]
pub enum WorstRatingProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "WorstRatingProp")]
impl TryFrom<SchemaValue> for WorstRatingProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorstRatingProp::Text(v)),
SchemaValue::Number(v) => Ok(WorstRatingProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WorstRatingProp")]
impl TryFrom<&SchemaValue> for WorstRatingProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorstRatingProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(WorstRatingProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// numbeds - HOSPITAL INPATIENT BEDS: Inpatient beds, including all staffed, licensed, and overflow (surge) beds used for inpatients.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumBedsProp")]
pub enum CvdNumBedsProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "CvdNumBedsProp")]
impl TryFrom<SchemaValue> for CvdNumBedsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumBedsProp::Text(v)),
SchemaValue::Number(v) => Ok(CvdNumBedsProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumBedsProp")]
impl TryFrom<&SchemaValue> for CvdNumBedsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumBedsProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(CvdNumBedsProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A material used as a surface in some artwork, e.g. Canvas, Paper, Wood, Board, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SurfaceProp")]
pub enum SurfaceProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "SurfaceProp")]
impl TryFrom<SchemaValue> for SurfaceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SurfaceProp::Text(v)),
SchemaValue::Url(v) => Ok(SurfaceProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SurfaceProp")]
impl TryFrom<&SchemaValue> for SurfaceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SurfaceProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(SurfaceProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// For an [Organization] (typically a [NewsMediaOrganization]), a statement about policy on use of unnamed sources and the decision process required.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UnnamedSourcesPolicyProp")]
pub enum UnnamedSourcesPolicyProp {
CreativeWork(CreativeWork),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "UnnamedSourcesPolicyProp")]
impl TryFrom<SchemaValue> for UnnamedSourcesPolicyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(UnnamedSourcesPolicyProp::Url(v)),
SchemaValue::Text(v) => Ok(UnnamedSourcesPolicyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(UnnamedSourcesPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UnnamedSourcesPolicyProp")]
impl TryFrom<&SchemaValue> for UnnamedSourcesPolicyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(UnnamedSourcesPolicyProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(UnnamedSourcesPolicyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(UnnamedSourcesPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An educationalRole of an EducationalAudience.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EducationalRoleProp")]
pub enum EducationalRoleProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EducationalRoleProp")]
impl TryFrom<SchemaValue> for EducationalRoleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalRoleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EducationalRoleProp")]
impl TryFrom<&SchemaValue> for EducationalRoleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalRoleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Audiences defined by a person's gender.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RequiredGenderProp")]
pub enum RequiredGenderProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RequiredGenderProp")]
impl TryFrom<SchemaValue> for RequiredGenderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RequiredGenderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RequiredGenderProp")]
impl TryFrom<&SchemaValue> for RequiredGenderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RequiredGenderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Related anatomical structure(s) that are not part of the system but relate or connect to it, such as vascular bundles associated with an organ system.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RelatedStructureProp")]
pub enum RelatedStructureProp {
AnatomicalStructure(AnatomicalStructure),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RelatedStructureProp")]
impl TryFrom<SchemaValue> for RelatedStructureProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedStructureProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(RelatedStructureProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RelatedStructureProp")]
impl TryFrom<&SchemaValue> for RelatedStructureProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedStructureProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(RelatedStructureProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A media object that encodes this CreativeWork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EncodingsProp")]
pub enum EncodingsProp {
Text(String),
MediaObject(MediaObject),
}
#[automatically_derived]
#[cfg(feature = "EncodingsProp")]
impl TryFrom<SchemaValue> for EncodingsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EncodingsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(EncodingsProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EncodingsProp")]
impl TryFrom<&SchemaValue> for EncodingsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EncodingsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(EncodingsProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The period of time after any due date that the borrower has to fulfil its obligations before a default (failure to pay) is deemed to have occurred.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GracePeriodProp")]
pub enum GracePeriodProp {
Duration(Duration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GracePeriodProp")]
impl TryFrom<SchemaValue> for GracePeriodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GracePeriodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(GracePeriodProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GracePeriodProp")]
impl TryFrom<&SchemaValue> for GracePeriodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GracePeriodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(GracePeriodProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The frequency in MHz for a particular broadcast.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BroadcastFrequencyValueProp")]
pub enum BroadcastFrequencyValueProp {
QuantitativeValue(QuantitativeValue),
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BroadcastFrequencyValueProp")]
impl TryFrom<SchemaValue> for BroadcastFrequencyValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(BroadcastFrequencyValueProp::Number(v)),
SchemaValue::Text(v) => Ok(BroadcastFrequencyValueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(BroadcastFrequencyValueProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BroadcastFrequencyValueProp")]
impl TryFrom<&SchemaValue> for BroadcastFrequencyValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(BroadcastFrequencyValueProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(BroadcastFrequencyValueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(BroadcastFrequencyValueProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A thumbnail image relevant to the Thing.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ThumbnailUrlProp")]
pub enum ThumbnailUrlProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ThumbnailUrlProp")]
impl TryFrom<SchemaValue> for ThumbnailUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ThumbnailUrlProp::Url(v)),
SchemaValue::Text(v) => Ok(ThumbnailUrlProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ThumbnailUrlProp")]
impl TryFrom<&SchemaValue> for ThumbnailUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ThumbnailUrlProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(ThumbnailUrlProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The measuredProperty of an [Observation], typically via its [StatisticalVariable]. There are various kinds of applicable [Property]: a schema.org property, a property from other RDF-compatible systems, e.g. W3C RDF Data Cube, Data Commons, Wikidata, or schema.org extensions such as [GS1's](https://www.gs1.org/voc/?show=properties).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MeasuredPropertyProp")]
pub enum MeasuredPropertyProp {
Property(Property),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MeasuredPropertyProp")]
impl TryFrom<SchemaValue> for MeasuredPropertyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MeasuredPropertyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Property::try_from(v.clone()) { return Ok(MeasuredPropertyProp::Property(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MeasuredPropertyProp")]
impl TryFrom<&SchemaValue> for MeasuredPropertyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MeasuredPropertyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Property::try_from(v.clone()) { return Ok(MeasuredPropertyProp::Property(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The time the object is scheduled to.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ScheduledTimeProp")]
pub enum ScheduledTimeProp {
Text(String),
Date(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "ScheduledTimeProp")]
impl TryFrom<SchemaValue> for ScheduledTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ScheduledTimeProp::Text(v)),
SchemaValue::Date(v) => Ok(ScheduledTimeProp::Date(v)),
SchemaValue::DateTime(v) => Ok(ScheduledTimeProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ScheduledTimeProp")]
impl TryFrom<&SchemaValue> for ScheduledTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ScheduledTimeProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(ScheduledTimeProp::Date(v.clone())),
SchemaValue::DateTime(v) => Ok(ScheduledTimeProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Whether the 3DModel allows resizing. For example, room layout applications often do not allow 3DModel elements to be resized to reflect reality.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsResizableProp")]
pub enum IsResizableProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "IsResizableProp")]
impl TryFrom<SchemaValue> for IsResizableProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsResizableProp::Text(v)),
SchemaValue::Boolean(v) => Ok(IsResizableProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsResizableProp")]
impl TryFrom<&SchemaValue> for IsResizableProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsResizableProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(IsResizableProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The area within which users can expect to reach the broadcast service.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AreaProp")]
pub enum AreaProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AreaProp")]
impl TryFrom<SchemaValue> for AreaProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AreaProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(AreaProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AreaProp")]
impl TryFrom<&SchemaValue> for AreaProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AreaProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(AreaProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Shipper's address.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OriginAddressProp")]
pub enum OriginAddressProp {
PostalAddress(PostalAddress),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OriginAddressProp")]
impl TryFrom<SchemaValue> for OriginAddressProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OriginAddressProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(OriginAddressProp::PostalAddress(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OriginAddressProp")]
impl TryFrom<&SchemaValue> for OriginAddressProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OriginAddressProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(OriginAddressProp::PostalAddress(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An episode of a TV, radio or game media within a series or season.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EpisodeProp")]
pub enum EpisodeProp {
Episode(Episode),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EpisodeProp")]
impl TryFrom<SchemaValue> for EpisodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EpisodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Episode::try_from(v.clone()) { return Ok(EpisodeProp::Episode(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EpisodeProp")]
impl TryFrom<&SchemaValue> for EpisodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EpisodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Episode::try_from(v.clone()) { return Ok(EpisodeProp::Episode(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Text value being annotated.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TextValueProp")]
pub enum TextValueProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TextValueProp")]
impl TryFrom<SchemaValue> for TextValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TextValueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TextValueProp")]
impl TryFrom<&SchemaValue> for TextValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TextValueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// For an [Article], typically a [NewsArticle], the backstory property provides a textual summary giving a brief explanation of why and how an article was created. In a journalistic setting this could include information about reporting process, methods, interviews, data sources, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BackstoryProp")]
pub enum BackstoryProp {
Text(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "BackstoryProp")]
impl TryFrom<SchemaValue> for BackstoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BackstoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(BackstoryProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BackstoryProp")]
impl TryFrom<&SchemaValue> for BackstoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BackstoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(BackstoryProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MpnProp")]
pub enum MpnProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MpnProp")]
impl TryFrom<SchemaValue> for MpnProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MpnProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MpnProp")]
impl TryFrom<&SchemaValue> for MpnProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MpnProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The location depicted or described in the content. For example, the location in a photograph or painting.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContentLocationProp")]
pub enum ContentLocationProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ContentLocationProp")]
impl TryFrom<SchemaValue> for ContentLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContentLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ContentLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContentLocationProp")]
impl TryFrom<&SchemaValue> for ContentLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContentLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ContentLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Minimum memory requirements.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MemoryRequirementsProp")]
pub enum MemoryRequirementsProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "MemoryRequirementsProp")]
impl TryFrom<SchemaValue> for MemoryRequirementsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MemoryRequirementsProp::Text(v)),
SchemaValue::Url(v) => Ok(MemoryRequirementsProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MemoryRequirementsProp")]
impl TryFrom<&SchemaValue> for MemoryRequirementsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MemoryRequirementsProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(MemoryRequirementsProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The person/organization being supported.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EndorseeProp")]
pub enum EndorseeProp {
Person(Person),
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EndorseeProp")]
impl TryFrom<SchemaValue> for EndorseeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EndorseeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(EndorseeProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(EndorseeProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EndorseeProp")]
impl TryFrom<&SchemaValue> for EndorseeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EndorseeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(EndorseeProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(EndorseeProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of the legislation. Examples of values are "law", "act", "directive", "decree", "regulation", "statutory instrument", "loi organique", "règlement grand-ducal", etc., depending on the country.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationTypeProp")]
pub enum LegislationTypeProp {
CategoryCode(CategoryCode),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LegislationTypeProp")]
impl TryFrom<SchemaValue> for LegislationTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CategoryCode::try_from(v.clone()) { return Ok(LegislationTypeProp::CategoryCode(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationTypeProp")]
impl TryFrom<&SchemaValue> for LegislationTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CategoryCode::try_from(v.clone()) { return Ok(LegislationTypeProp::CategoryCode(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the origin of a shipment, i.e. where it should be coming from.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ShippingOriginProp")]
pub enum ShippingOriginProp {
DefinedRegion(DefinedRegion),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ShippingOriginProp")]
impl TryFrom<SchemaValue> for ShippingOriginProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ShippingOriginProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedRegion::try_from(v.clone()) { return Ok(ShippingOriginProp::DefinedRegion(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ShippingOriginProp")]
impl TryFrom<&SchemaValue> for ShippingOriginProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ShippingOriginProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedRegion::try_from(v.clone()) { return Ok(ShippingOriginProp::DefinedRegion(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The amount of shipping costs if a product is returned due to customer remorse. Applicable when property [customerRemorseReturnFees] equals [ReturnShippingFees].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CustomerRemorseReturnShippingFeesAmountProp")]
pub enum CustomerRemorseReturnShippingFeesAmountProp {
Text(String),
MonetaryAmount(MonetaryAmount),
}
#[automatically_derived]
#[cfg(feature = "CustomerRemorseReturnShippingFeesAmountProp")]
impl TryFrom<SchemaValue> for CustomerRemorseReturnShippingFeesAmountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CustomerRemorseReturnShippingFeesAmountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(CustomerRemorseReturnShippingFeesAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CustomerRemorseReturnShippingFeesAmountProp")]
impl TryFrom<&SchemaValue> for CustomerRemorseReturnShippingFeesAmountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CustomerRemorseReturnShippingFeesAmountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(CustomerRemorseReturnShippingFeesAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A parents of the person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ParentsProp")]
pub enum ParentsProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ParentsProp")]
impl TryFrom<SchemaValue> for ParentsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ParentsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ParentsProp")]
impl TryFrom<&SchemaValue> for ParentsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ParentsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// numc19died - DEATHS: Patients with suspected or confirmed COVID-19 who died in the hospital, ED, or any overflow location.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumC19DiedProp")]
pub enum CvdNumC19DiedProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19DiedProp")]
impl TryFrom<SchemaValue> for CvdNumC19DiedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumC19DiedProp::Number(v)),
SchemaValue::Text(v) => Ok(CvdNumC19DiedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19DiedProp")]
impl TryFrom<&SchemaValue> for CvdNumC19DiedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumC19DiedProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(CvdNumC19DiedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Link to the page containing an original version of the content, or directly to an online copy of the original [MediaObject] content, e.g. video file.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OriginalMediaLinkProp")]
pub enum OriginalMediaLinkProp {
MediaObject(MediaObject),
Text(String),
Url(String),
WebPage(WebPage),
}
#[automatically_derived]
#[cfg(feature = "OriginalMediaLinkProp")]
impl TryFrom<SchemaValue> for OriginalMediaLinkProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OriginalMediaLinkProp::Text(v)),
SchemaValue::Url(v) => Ok(OriginalMediaLinkProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(OriginalMediaLinkProp::MediaObject(object)) }
if let Ok(object) = WebPage::try_from(v.clone()) { return Ok(OriginalMediaLinkProp::WebPage(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OriginalMediaLinkProp")]
impl TryFrom<&SchemaValue> for OriginalMediaLinkProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OriginalMediaLinkProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(OriginalMediaLinkProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(OriginalMediaLinkProp::MediaObject(object)) }
if let Ok(object) = WebPage::try_from(v.clone()) { return Ok(OriginalMediaLinkProp::WebPage(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A modifiable or non-modifiable factor that increases the risk of a patient contracting this condition, e.g. age, coexisting condition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RiskFactorProp")]
pub enum RiskFactorProp {
MedicalRiskFactor(MedicalRiskFactor),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RiskFactorProp")]
impl TryFrom<SchemaValue> for RiskFactorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RiskFactorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalRiskFactor::try_from(v.clone()) { return Ok(RiskFactorProp::MedicalRiskFactor(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RiskFactorProp")]
impl TryFrom<&SchemaValue> for RiskFactorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RiskFactorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalRiskFactor::try_from(v.clone()) { return Ok(RiskFactorProp::MedicalRiskFactor(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InteractivityTypeProp")]
pub enum InteractivityTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InteractivityTypeProp")]
impl TryFrom<SchemaValue> for InteractivityTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractivityTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InteractivityTypeProp")]
impl TryFrom<&SchemaValue> for InteractivityTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractivityTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The organization or person from which the product was acquired.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AcquiredFromProp")]
pub enum AcquiredFromProp {
Person(Person),
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AcquiredFromProp")]
impl TryFrom<SchemaValue> for AcquiredFromProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcquiredFromProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AcquiredFromProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AcquiredFromProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AcquiredFromProp")]
impl TryFrom<&SchemaValue> for AcquiredFromProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcquiredFromProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AcquiredFromProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AcquiredFromProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Additional menu item(s) such as a side dish of salad or side order of fries that can be added to this menu item. Additionally it can be a menu section containing allowed add-on menu items for this menu item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MenuAddOnProp")]
pub enum MenuAddOnProp {
Text(String),
MenuSection(MenuSection),
MenuItem(MenuItem),
}
#[automatically_derived]
#[cfg(feature = "MenuAddOnProp")]
impl TryFrom<SchemaValue> for MenuAddOnProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MenuAddOnProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MenuSection::try_from(v.clone()) { return Ok(MenuAddOnProp::MenuSection(object)) }
if let Ok(object) = MenuItem::try_from(v.clone()) { return Ok(MenuAddOnProp::MenuItem(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MenuAddOnProp")]
impl TryFrom<&SchemaValue> for MenuAddOnProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MenuAddOnProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MenuSection::try_from(v.clone()) { return Ok(MenuAddOnProp::MenuSection(object)) }
if let Ok(object) = MenuItem::try_from(v.clone()) { return Ok(MenuAddOnProp::MenuItem(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The lowest price of all offers available.
///
/// Usage guidelines:
///
/// * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.
/// * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LowPriceProp")]
pub enum LowPriceProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LowPriceProp")]
impl TryFrom<SchemaValue> for LowPriceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(LowPriceProp::Number(v)),
SchemaValue::Text(v) => Ok(LowPriceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LowPriceProp")]
impl TryFrom<&SchemaValue> for LowPriceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(LowPriceProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(LowPriceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A downloadable form of this dataset, at a specific location, in a specific format. This property can be repeated if different variations are available. There is no expectation that different downloadable distributions must contain exactly equivalent information (see also [DCAT](https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution) on this point). Different distributions might include or exclude different subsets of the entire dataset, for example.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DistributionProp")]
pub enum DistributionProp {
Text(String),
DataDownload(DataDownload),
}
#[automatically_derived]
#[cfg(feature = "DistributionProp")]
impl TryFrom<SchemaValue> for DistributionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DistributionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataDownload::try_from(v.clone()) { return Ok(DistributionProp::DataDownload(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DistributionProp")]
impl TryFrom<&SchemaValue> for DistributionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DistributionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataDownload::try_from(v.clone()) { return Ok(DistributionProp::DataDownload(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The person, organization, contact point, or audience that has been granted this permission.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GranteeProp")]
pub enum GranteeProp {
Text(String),
Audience(Audience),
Person(Person),
Organization(Organization),
ContactPoint(ContactPoint),
}
#[automatically_derived]
#[cfg(feature = "GranteeProp")]
impl TryFrom<SchemaValue> for GranteeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GranteeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(GranteeProp::Audience(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(GranteeProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(GranteeProp::Organization(object)) }
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(GranteeProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GranteeProp")]
impl TryFrom<&SchemaValue> for GranteeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GranteeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(GranteeProp::Audience(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(GranteeProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(GranteeProp::Organization(object)) }
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(GranteeProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// numbedsocc - HOSPITAL INPATIENT BED OCCUPANCY: Total number of staffed inpatient beds that are occupied.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumBedsOccProp")]
pub enum CvdNumBedsOccProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "CvdNumBedsOccProp")]
impl TryFrom<SchemaValue> for CvdNumBedsOccProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumBedsOccProp::Text(v)),
SchemaValue::Number(v) => Ok(CvdNumBedsOccProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumBedsOccProp")]
impl TryFrom<&SchemaValue> for CvdNumBedsOccProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumBedsOccProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(CvdNumBedsOccProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The quality of the video.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VideoQualityProp")]
pub enum VideoQualityProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VideoQualityProp")]
impl TryFrom<SchemaValue> for VideoQualityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VideoQualityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VideoQualityProp")]
impl TryFrom<&SchemaValue> for VideoQualityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VideoQualityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The vasculature the lymphatic structure originates, or afferents, from.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OriginatesFromProp")]
pub enum OriginatesFromProp {
Vessel(Vessel),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OriginatesFromProp")]
impl TryFrom<SchemaValue> for OriginatesFromProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OriginatesFromProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Vessel::try_from(v.clone()) { return Ok(OriginatesFromProp::Vessel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OriginatesFromProp")]
impl TryFrom<&SchemaValue> for OriginatesFromProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OriginatesFromProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Vessel::try_from(v.clone()) { return Ok(OriginatesFromProp::Vessel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The location in which the strength is available.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailableInProp")]
pub enum AvailableInProp {
Text(String),
AdministrativeArea(AdministrativeArea),
}
#[automatically_derived]
#[cfg(feature = "AvailableInProp")]
impl TryFrom<SchemaValue> for AvailableInProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableInProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(AvailableInProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailableInProp")]
impl TryFrom<&SchemaValue> for AvailableInProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableInProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(AvailableInProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. E.g. John wrote a book from *January* to December. For media, including audio and video, it's the time offset of the start of a clip within a larger file.
///
/// Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StartTimeProp")]
pub enum StartTimeProp {
DateTime(String),
Time(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "StartTimeProp")]
impl TryFrom<SchemaValue> for StartTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(StartTimeProp::DateTime(v)),
SchemaValue::Time(v) => Ok(StartTimeProp::Time(v)),
SchemaValue::Text(v) => Ok(StartTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StartTimeProp")]
impl TryFrom<&SchemaValue> for StartTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(StartTimeProp::DateTime(v.clone())),
SchemaValue::Time(v) => Ok(StartTimeProp::Time(v.clone())),
SchemaValue::Text(v) => Ok(StartTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The service through which the permit was granted.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IssuedThroughProp")]
pub enum IssuedThroughProp {
Text(String),
Service(Service),
}
#[automatically_derived]
#[cfg(feature = "IssuedThroughProp")]
impl TryFrom<SchemaValue> for IssuedThroughProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IssuedThroughProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Service::try_from(v.clone()) { return Ok(IssuedThroughProp::Service(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IssuedThroughProp")]
impl TryFrom<&SchemaValue> for IssuedThroughProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IssuedThroughProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Service::try_from(v.clone()) { return Ok(IssuedThroughProp::Service(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A category describing the job, preferably using a term from a taxonomy such as [BLS O*NET-SOC](http://www.onetcenter.org/taxonomy.html), [ISCO-08](https://www.ilo.org/public/english/bureau/stat/isco/isco08/) or similar, with the property repeated for each applicable value. Ideally the taxonomy should be identified, and both the textual label and formal code for the category should be provided.
///
/// Note: for historical reasons, any textual label and formal code provided as a literal may be assumed to be from O*NET-SOC.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OccupationalCategoryProp")]
pub enum OccupationalCategoryProp {
CategoryCode(CategoryCode),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OccupationalCategoryProp")]
impl TryFrom<SchemaValue> for OccupationalCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OccupationalCategoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CategoryCode::try_from(v.clone()) { return Ok(OccupationalCategoryProp::CategoryCode(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OccupationalCategoryProp")]
impl TryFrom<&SchemaValue> for OccupationalCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OccupationalCategoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CategoryCode::try_from(v.clone()) { return Ok(OccupationalCategoryProp::CategoryCode(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Number of full bathrooms - The total number of full and ¾ bathrooms in an [Accommodation]. This corresponds to the [BathroomsFull field in RESO](https://ddwiki.reso.org/display/DDW17/BathroomsFull+Field).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfFullBathroomsProp")]
pub enum NumberOfFullBathroomsProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfFullBathroomsProp")]
impl TryFrom<SchemaValue> for NumberOfFullBathroomsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfFullBathroomsProp::Number(v)),
SchemaValue::Text(v) => Ok(NumberOfFullBathroomsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfFullBathroomsProp")]
impl TryFrom<&SchemaValue> for NumberOfFullBathroomsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfFullBathroomsProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(NumberOfFullBathroomsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The Vehicle Identification Number (VIN) is a unique serial number used by the automotive industry to identify individual motor vehicles.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VehicleIdentificationNumberProp")]
pub enum VehicleIdentificationNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VehicleIdentificationNumberProp")]
impl TryFrom<SchemaValue> for VehicleIdentificationNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleIdentificationNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VehicleIdentificationNumberProp")]
impl TryFrom<&SchemaValue> for VehicleIdentificationNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VehicleIdentificationNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Provides positive considerations regarding something, for example product highlights or (alongside [negativeNotes]) pro/con lists for reviews.
///
/// In the case of a [Review], the property describes the [itemReviewed] from the perspective of the review; in the case of a [Product], the product itself is being described.
///
/// The property values can be expressed either as unstructured text (repeated as necessary), or if ordered, as a list (in which case the most positive is at the beginning of the list).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PositiveNotesProp")]
pub enum PositiveNotesProp {
Text(String),
ListItem(ListItem),
ItemList(ItemList),
WebContent(WebContent),
}
#[automatically_derived]
#[cfg(feature = "PositiveNotesProp")]
impl TryFrom<SchemaValue> for PositiveNotesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PositiveNotesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ListItem::try_from(v.clone()) { return Ok(PositiveNotesProp::ListItem(object)) }
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(PositiveNotesProp::ItemList(object)) }
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(PositiveNotesProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PositiveNotesProp")]
impl TryFrom<&SchemaValue> for PositiveNotesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PositiveNotesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ListItem::try_from(v.clone()) { return Ok(PositiveNotesProp::ListItem(object)) }
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(PositiveNotesProp::ItemList(object)) }
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(PositiveNotesProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifies an applicable return policy (from an enumeration).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReturnPolicyCategoryProp")]
pub enum ReturnPolicyCategoryProp {
Text(String),
MerchantReturnEnumeration(MerchantReturnEnumeration),
}
#[automatically_derived]
#[cfg(feature = "ReturnPolicyCategoryProp")]
impl TryFrom<SchemaValue> for ReturnPolicyCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnPolicyCategoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MerchantReturnEnumeration::try_from(v.clone()) { return Ok(ReturnPolicyCategoryProp::MerchantReturnEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReturnPolicyCategoryProp")]
impl TryFrom<&SchemaValue> for ReturnPolicyCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnPolicyCategoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MerchantReturnEnumeration::try_from(v.clone()) { return Ok(ReturnPolicyCategoryProp::MerchantReturnEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Strength of evidence of the data used to formulate the guideline (enumerated).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EvidenceLevelProp")]
pub enum EvidenceLevelProp {
MedicalEvidenceLevel(MedicalEvidenceLevel),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EvidenceLevelProp")]
impl TryFrom<SchemaValue> for EvidenceLevelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EvidenceLevelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEvidenceLevel::try_from(v.clone()) { return Ok(EvidenceLevelProp::MedicalEvidenceLevel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EvidenceLevelProp")]
impl TryFrom<&SchemaValue> for EvidenceLevelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EvidenceLevelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEvidenceLevel::try_from(v.clone()) { return Ok(EvidenceLevelProp::MedicalEvidenceLevel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A bank or bank’s branch, financial institution or international financial institution operating the beneficiary’s bank account or releasing funds for the beneficiary.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BeneficiaryBankProp")]
pub enum BeneficiaryBankProp {
BankOrCreditUnion(BankOrCreditUnion),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BeneficiaryBankProp")]
impl TryFrom<SchemaValue> for BeneficiaryBankProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BeneficiaryBankProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BankOrCreditUnion::try_from(v.clone()) { return Ok(BeneficiaryBankProp::BankOrCreditUnion(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BeneficiaryBankProp")]
impl TryFrom<&SchemaValue> for BeneficiaryBankProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BeneficiaryBankProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BankOrCreditUnion::try_from(v.clone()) { return Ok(BeneficiaryBankProp::BankOrCreditUnion(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An arrangement derived from the composition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MusicArrangementProp")]
pub enum MusicArrangementProp {
Text(String),
MusicComposition(MusicComposition),
}
#[automatically_derived]
#[cfg(feature = "MusicArrangementProp")]
impl TryFrom<SchemaValue> for MusicArrangementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicArrangementProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicComposition::try_from(v.clone()) { return Ok(MusicArrangementProp::MusicComposition(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MusicArrangementProp")]
impl TryFrom<&SchemaValue> for MusicArrangementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicArrangementProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicComposition::try_from(v.clone()) { return Ok(MusicArrangementProp::MusicComposition(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of seasons in this series.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfSeasonsProp")]
pub enum NumberOfSeasonsProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "NumberOfSeasonsProp")]
impl TryFrom<SchemaValue> for NumberOfSeasonsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfSeasonsProp::Text(v)),
SchemaValue::Integer(v) => Ok(NumberOfSeasonsProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfSeasonsProp")]
impl TryFrom<&SchemaValue> for NumberOfSeasonsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfSeasonsProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(NumberOfSeasonsProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Text that can be used to credit person(s) and/or organization(s) associated with a published Creative Work.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CreditTextProp")]
pub enum CreditTextProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CreditTextProp")]
impl TryFrom<SchemaValue> for CreditTextProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CreditTextProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CreditTextProp")]
impl TryFrom<&SchemaValue> for CreditTextProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CreditTextProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The time when the live blog will begin covering the Event. Note that coverage may begin before the Event's start time. The LiveBlogPosting may also be created before coverage begins.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CoverageStartTimeProp")]
pub enum CoverageStartTimeProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "CoverageStartTimeProp")]
impl TryFrom<SchemaValue> for CoverageStartTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CoverageStartTimeProp::Text(v)),
SchemaValue::DateTime(v) => Ok(CoverageStartTimeProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CoverageStartTimeProp")]
impl TryFrom<&SchemaValue> for CoverageStartTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CoverageStartTimeProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(CoverageStartTimeProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The format of the book.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BookFormatProp")]
pub enum BookFormatProp {
BookFormatType(BookFormatType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BookFormatProp")]
impl TryFrom<SchemaValue> for BookFormatProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BookFormatProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BookFormatType::try_from(v.clone()) { return Ok(BookFormatProp::BookFormatType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BookFormatProp")]
impl TryFrom<&SchemaValue> for BookFormatProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BookFormatProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BookFormatType::try_from(v.clone()) { return Ok(BookFormatProp::BookFormatType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The manufacturer of the product.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ManufacturerProp")]
pub enum ManufacturerProp {
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "ManufacturerProp")]
impl TryFrom<SchemaValue> for ManufacturerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ManufacturerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ManufacturerProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ManufacturerProp")]
impl TryFrom<&SchemaValue> for ManufacturerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ManufacturerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ManufacturerProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An actor, e.g. in TV, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ActorProp")]
pub enum ActorProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "ActorProp")]
impl TryFrom<SchemaValue> for ActorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ActorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ActorProp")]
impl TryFrom<&SchemaValue> for ActorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ActorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A country where a particular merchant return policy applies to, for example the two-letter ISO 3166-1 alpha-2 country code.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ApplicableCountryProp")]
pub enum ApplicableCountryProp {
Country(Country),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ApplicableCountryProp")]
impl TryFrom<SchemaValue> for ApplicableCountryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicableCountryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Country::try_from(v.clone()) { return Ok(ApplicableCountryProp::Country(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ApplicableCountryProp")]
impl TryFrom<&SchemaValue> for ApplicableCountryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicableCountryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Country::try_from(v.clone()) { return Ok(ApplicableCountryProp::Country(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifics about the observational study design (enumerated).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StudyDesignProp")]
pub enum StudyDesignProp {
MedicalObservationalStudyDesign(MedicalObservationalStudyDesign),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "StudyDesignProp")]
impl TryFrom<SchemaValue> for StudyDesignProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StudyDesignProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalObservationalStudyDesign::try_from(v.clone()) { return Ok(StudyDesignProp::MedicalObservationalStudyDesign(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StudyDesignProp")]
impl TryFrom<&SchemaValue> for StudyDesignProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StudyDesignProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalObservationalStudyDesign::try_from(v.clone()) { return Ok(StudyDesignProp::MedicalObservationalStudyDesign(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A permission related to the access to this document (e.g. permission to read or write an electronic document). For a public document, specify a grantee with an Audience with audienceType equal to "public".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasDigitalDocumentPermissionProp")]
pub enum HasDigitalDocumentPermissionProp {
Text(String),
DigitalDocumentPermission(DigitalDocumentPermission),
}
#[automatically_derived]
#[cfg(feature = "HasDigitalDocumentPermissionProp")]
impl TryFrom<SchemaValue> for HasDigitalDocumentPermissionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasDigitalDocumentPermissionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DigitalDocumentPermission::try_from(v.clone()) { return Ok(HasDigitalDocumentPermissionProp::DigitalDocumentPermission(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasDigitalDocumentPermissionProp")]
impl TryFrom<&SchemaValue> for HasDigitalDocumentPermissionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasDigitalDocumentPermissionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DigitalDocumentPermission::try_from(v.clone()) { return Ok(HasDigitalDocumentPermissionProp::DigitalDocumentPermission(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether this game is multi-player, co-op or single-player. The game can be marked as multi-player, co-op and single-player at the same time.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PlayModeProp")]
pub enum PlayModeProp {
GamePlayMode(GamePlayMode),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PlayModeProp")]
impl TryFrom<SchemaValue> for PlayModeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PlayModeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GamePlayMode::try_from(v.clone()) { return Ok(PlayModeProp::GamePlayMode(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PlayModeProp")]
impl TryFrom<&SchemaValue> for PlayModeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PlayModeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GamePlayMode::try_from(v.clone()) { return Ok(PlayModeProp::GamePlayMode(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Any precaution, guidance, contraindication, etc. related to this drug's use during pregnancy.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PregnancyWarningProp")]
pub enum PregnancyWarningProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PregnancyWarningProp")]
impl TryFrom<SchemaValue> for PregnancyWarningProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PregnancyWarningProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PregnancyWarningProp")]
impl TryFrom<&SchemaValue> for PregnancyWarningProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PregnancyWarningProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A (typically single) geographic location associated with the job position.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "JobLocationProp")]
pub enum JobLocationProp {
Text(String),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "JobLocationProp")]
impl TryFrom<SchemaValue> for JobLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(JobLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "JobLocationProp")]
impl TryFrom<&SchemaValue> for JobLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(JobLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A position played, performed or filled by a person or organization, as part of an organization. For example, an athlete in a SportsTeam might play in the position named 'Quarterback'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NamedPositionProp")]
pub enum NamedPositionProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "NamedPositionProp")]
impl TryFrom<SchemaValue> for NamedPositionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NamedPositionProp::Text(v)),
SchemaValue::Url(v) => Ok(NamedPositionProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NamedPositionProp")]
impl TryFrom<&SchemaValue> for NamedPositionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NamedPositionProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(NamedPositionProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The release date of a vehicle model (often used to differentiate versions of the same make and model).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VehicleModelDateProp")]
pub enum VehicleModelDateProp {
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VehicleModelDateProp")]
impl TryFrom<SchemaValue> for VehicleModelDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(VehicleModelDateProp::Date(v)),
SchemaValue::Text(v) => Ok(VehicleModelDateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VehicleModelDateProp")]
impl TryFrom<&SchemaValue> for VehicleModelDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(VehicleModelDateProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(VehicleModelDateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A pointer to products or services offered by the organization or person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MakesOfferProp")]
pub enum MakesOfferProp {
Offer(Offer),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MakesOfferProp")]
impl TryFrom<SchemaValue> for MakesOfferProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MakesOfferProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Offer::try_from(v.clone()) { return Ok(MakesOfferProp::Offer(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MakesOfferProp")]
impl TryFrom<&SchemaValue> for MakesOfferProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MakesOfferProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Offer::try_from(v.clone()) { return Ok(MakesOfferProp::Offer(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// For a [Claim] interpreted from [MediaObject] content
/// sed to indicate a claim contained, implied or refined from the content of a [MediaObject].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ClaimInterpreterProp")]
pub enum ClaimInterpreterProp {
Person(Person),
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ClaimInterpreterProp")]
impl TryFrom<SchemaValue> for ClaimInterpreterProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ClaimInterpreterProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ClaimInterpreterProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ClaimInterpreterProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ClaimInterpreterProp")]
impl TryFrom<&SchemaValue> for ClaimInterpreterProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ClaimInterpreterProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ClaimInterpreterProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ClaimInterpreterProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The count of total number of ratings.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RatingCountProp")]
pub enum RatingCountProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "RatingCountProp")]
impl TryFrom<SchemaValue> for RatingCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RatingCountProp::Text(v)),
SchemaValue::Integer(v) => Ok(RatingCountProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RatingCountProp")]
impl TryFrom<&SchemaValue> for RatingCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RatingCountProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(RatingCountProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the total (available plus unavailable) number of accommodation units in an [ApartmentComplex], or the number of accommodation units for a specific [FloorPlan] (within its specific [ApartmentComplex]). See also [numberOfAvailableAccommodationUnits].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfAccommodationUnitsProp")]
pub enum NumberOfAccommodationUnitsProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfAccommodationUnitsProp")]
impl TryFrom<SchemaValue> for NumberOfAccommodationUnitsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfAccommodationUnitsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfAccommodationUnitsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfAccommodationUnitsProp")]
impl TryFrom<&SchemaValue> for NumberOfAccommodationUnitsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfAccommodationUnitsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfAccommodationUnitsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The answer(s) that has been accepted as best, typically on a Question/Answer site. Sites vary in their selection mechanisms, e.g. drawing on community opinion and/or the view of the Question author.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AcceptedAnswerProp")]
pub enum AcceptedAnswerProp {
ItemList(ItemList),
Answer(Answer),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AcceptedAnswerProp")]
impl TryFrom<SchemaValue> for AcceptedAnswerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcceptedAnswerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(AcceptedAnswerProp::ItemList(object)) }
if let Ok(object) = Answer::try_from(v.clone()) { return Ok(AcceptedAnswerProp::Answer(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AcceptedAnswerProp")]
impl TryFrom<&SchemaValue> for AcceptedAnswerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcceptedAnswerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(AcceptedAnswerProp::ItemList(object)) }
if let Ok(object) = Answer::try_from(v.clone()) { return Ok(AcceptedAnswerProp::Answer(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The location in which the study is taking/took place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StudyLocationProp")]
pub enum StudyLocationProp {
AdministrativeArea(AdministrativeArea),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "StudyLocationProp")]
impl TryFrom<SchemaValue> for StudyLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StudyLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(StudyLocationProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StudyLocationProp")]
impl TryFrom<&SchemaValue> for StudyLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StudyLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(StudyLocationProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The expected progression of the condition if it is not treated and allowed to progress naturally.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NaturalProgressionProp")]
pub enum NaturalProgressionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NaturalProgressionProp")]
impl TryFrom<SchemaValue> for NaturalProgressionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NaturalProgressionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NaturalProgressionProp")]
impl TryFrom<&SchemaValue> for NaturalProgressionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NaturalProgressionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Specifies the Person who edited the CreativeWork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EditorProp")]
pub enum EditorProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "EditorProp")]
impl TryFrom<SchemaValue> for EditorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EditorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(EditorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EditorProp")]
impl TryFrom<&SchemaValue> for EditorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EditorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(EditorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid.
///
/// See also [ineligibleRegion].
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EligibleRegionProp")]
pub enum EligibleRegionProp {
Place(Place),
GeoShape(GeoShape),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EligibleRegionProp")]
impl TryFrom<SchemaValue> for EligibleRegionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibleRegionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(EligibleRegionProp::Place(object)) }
if let Ok(object) = GeoShape::try_from(v.clone()) { return Ok(EligibleRegionProp::GeoShape(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EligibleRegionProp")]
impl TryFrom<&SchemaValue> for EligibleRegionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibleRegionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(EligibleRegionProp::Place(object)) }
if let Ok(object) = GeoShape::try_from(v.clone()) { return Ok(EligibleRegionProp::GeoShape(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The group the release is credited to if different than the byArtist. For example, Red and Blue is credited to "Stefani Germanotta Band", but by Lady Gaga.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CreditedToProp")]
pub enum CreditedToProp {
Text(String),
Person(Person),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "CreditedToProp")]
impl TryFrom<SchemaValue> for CreditedToProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CreditedToProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CreditedToProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CreditedToProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CreditedToProp")]
impl TryFrom<&SchemaValue> for CreditedToProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CreditedToProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CreditedToProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CreditedToProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The person or organization that originally passed or made the law: typically parliament (for primary legislation) or government (for secondary legislation). This indicates the "legal author" of the law, as opposed to its physical author.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationPassedByProp")]
pub enum LegislationPassedByProp {
Text(String),
Organization(Organization),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "LegislationPassedByProp")]
impl TryFrom<SchemaValue> for LegislationPassedByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationPassedByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(LegislationPassedByProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LegislationPassedByProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationPassedByProp")]
impl TryFrom<&SchemaValue> for LegislationPassedByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationPassedByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(LegislationPassedByProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LegislationPassedByProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsicV4Prop")]
pub enum IsicV4Prop {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IsicV4Prop")]
impl TryFrom<SchemaValue> for IsicV4Prop {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsicV4Prop::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsicV4Prop")]
impl TryFrom<&SchemaValue> for IsicV4Prop {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsicV4Prop::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An associated [MediaReview], related by specific common content, topic or claim. The expectation is that this property would be most typically used in cases where a single activity is conducting both claim reviews and media reviews, in which case [relatedMediaReview] would commonly be used on a [ClaimReview], while [relatedClaimReview] would be used on [MediaReview].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AssociatedMediaReviewProp")]
pub enum AssociatedMediaReviewProp {
Review(Review),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AssociatedMediaReviewProp")]
impl TryFrom<SchemaValue> for AssociatedMediaReviewProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedMediaReviewProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(AssociatedMediaReviewProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AssociatedMediaReviewProp")]
impl TryFrom<&SchemaValue> for AssociatedMediaReviewProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedMediaReviewProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(AssociatedMediaReviewProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A broadcast channel of a broadcast service.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasBroadcastChannelProp")]
pub enum HasBroadcastChannelProp {
BroadcastChannel(BroadcastChannel),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasBroadcastChannelProp")]
impl TryFrom<SchemaValue> for HasBroadcastChannelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasBroadcastChannelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BroadcastChannel::try_from(v.clone()) { return Ok(HasBroadcastChannelProp::BroadcastChannel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasBroadcastChannelProp")]
impl TryFrom<&SchemaValue> for HasBroadcastChannelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasBroadcastChannelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BroadcastChannel::try_from(v.clone()) { return Ok(HasBroadcastChannelProp::BroadcastChannel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The neurological pathway extension that involves muscle control.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NerveMotorProp")]
pub enum NerveMotorProp {
Text(String),
Muscle(Muscle),
}
#[automatically_derived]
#[cfg(feature = "NerveMotorProp")]
impl TryFrom<SchemaValue> for NerveMotorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NerveMotorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Muscle::try_from(v.clone()) { return Ok(NerveMotorProp::Muscle(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NerveMotorProp")]
impl TryFrom<&SchemaValue> for NerveMotorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NerveMotorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Muscle::try_from(v.clone()) { return Ok(NerveMotorProp::Muscle(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// numc19ofmechventpats - ED/OVERFLOW and VENTILATED: Patients with suspected or confirmed COVID-19 who are in the ED or any overflow location awaiting an inpatient bed and on a mechanical ventilator.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumC19OFMechVentPatsProp")]
pub enum CvdNumC19OFMechVentPatsProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19OFMechVentPatsProp")]
impl TryFrom<SchemaValue> for CvdNumC19OFMechVentPatsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumC19OFMechVentPatsProp::Text(v)),
SchemaValue::Number(v) => Ok(CvdNumC19OFMechVentPatsProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19OFMechVentPatsProp")]
impl TryFrom<&SchemaValue> for CvdNumC19OFMechVentPatsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumC19OFMechVentPatsProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(CvdNumC19OFMechVentPatsProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An amenity feature (e.g. a characteristic or service) of the Accommodation. This generic property does not make a statement about whether the feature is included in an offer for the main accommodation or available at extra costs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AmenityFeatureProp")]
pub enum AmenityFeatureProp {
LocationFeatureSpecification(LocationFeatureSpecification),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AmenityFeatureProp")]
impl TryFrom<SchemaValue> for AmenityFeatureProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AmenityFeatureProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = LocationFeatureSpecification::try_from(v.clone()) { return Ok(AmenityFeatureProp::LocationFeatureSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AmenityFeatureProp")]
impl TryFrom<&SchemaValue> for AmenityFeatureProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AmenityFeatureProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = LocationFeatureSpecification::try_from(v.clone()) { return Ok(AmenityFeatureProp::LocationFeatureSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A pattern that something has, for example 'polka dot', 'striped', 'Canadian flag'. Values are typically expressed as text, although links to controlled value schemes are also supported.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PatternProp")]
pub enum PatternProp {
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PatternProp")]
impl TryFrom<SchemaValue> for PatternProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PatternProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(PatternProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PatternProp")]
impl TryFrom<&SchemaValue> for PatternProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PatternProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(PatternProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The name given to how bone physically connects to each other.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StructuralClassProp")]
pub enum StructuralClassProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "StructuralClassProp")]
impl TryFrom<SchemaValue> for StructuralClassProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StructuralClassProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StructuralClassProp")]
impl TryFrom<&SchemaValue> for StructuralClassProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StructuralClassProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A season that is part of the media series.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContainsSeasonProp")]
pub enum ContainsSeasonProp {
Text(String),
CreativeWorkSeason(CreativeWorkSeason),
}
#[automatically_derived]
#[cfg(feature = "ContainsSeasonProp")]
impl TryFrom<SchemaValue> for ContainsSeasonProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContainsSeasonProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWorkSeason::try_from(v.clone()) { return Ok(ContainsSeasonProp::CreativeWorkSeason(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContainsSeasonProp")]
impl TryFrom<&SchemaValue> for ContainsSeasonProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContainsSeasonProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWorkSeason::try_from(v.clone()) { return Ok(ContainsSeasonProp::CreativeWorkSeason(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Audiences defined by a person's minimum age.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RequiredMinAgeProp")]
pub enum RequiredMinAgeProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RequiredMinAgeProp")]
impl TryFrom<SchemaValue> for RequiredMinAgeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(RequiredMinAgeProp::Integer(v)),
SchemaValue::Text(v) => Ok(RequiredMinAgeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RequiredMinAgeProp")]
impl TryFrom<&SchemaValue> for RequiredMinAgeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(RequiredMinAgeProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(RequiredMinAgeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Information about school closures.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SchoolClosuresInfoProp")]
pub enum SchoolClosuresInfoProp {
Url(String),
Text(String),
WebContent(WebContent),
}
#[automatically_derived]
#[cfg(feature = "SchoolClosuresInfoProp")]
impl TryFrom<SchemaValue> for SchoolClosuresInfoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SchoolClosuresInfoProp::Url(v)),
SchemaValue::Text(v) => Ok(SchoolClosuresInfoProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(SchoolClosuresInfoProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SchoolClosuresInfoProp")]
impl TryFrom<&SchemaValue> for SchoolClosuresInfoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SchoolClosuresInfoProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(SchoolClosuresInfoProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(SchoolClosuresInfoProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The spatialCoverage of a CreativeWork indicates the place(s) which are the focus of the content. It is a subproperty of
/// contentLocation intended primarily for more technical and detailed materials. For example with a Dataset, it indicates
/// areas that the dataset describes: a dataset of New York weather would have spatialCoverage which was the place: the state of New York.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SpatialCoverageProp")]
pub enum SpatialCoverageProp {
Text(String),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "SpatialCoverageProp")]
impl TryFrom<SchemaValue> for SpatialCoverageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpatialCoverageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(SpatialCoverageProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SpatialCoverageProp")]
impl TryFrom<&SchemaValue> for SpatialCoverageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpatialCoverageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(SpatialCoverageProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of bed or beds included in the accommodation. For the single case of just one bed of a certain type, you use bed directly with a text.
/// If you want to indicate the quantity of a certain kind of bed, use an instance of BedDetails. For more detailed information, use the amenityFeature property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BedProp")]
pub enum BedProp {
BedType(BedType),
BedDetails(BedDetails),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BedProp")]
impl TryFrom<SchemaValue> for BedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BedType::try_from(v.clone()) { return Ok(BedProp::BedType(object)) }
if let Ok(object) = BedDetails::try_from(v.clone()) { return Ok(BedProp::BedDetails(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BedProp")]
impl TryFrom<&SchemaValue> for BedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BedType::try_from(v.clone()) { return Ok(BedProp::BedType(object)) }
if let Ok(object) = BedDetails::try_from(v.clone()) { return Ok(BedProp::BedDetails(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The delivery method(s) available for this offer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailableDeliveryMethodProp")]
pub enum AvailableDeliveryMethodProp {
DeliveryMethod(DeliveryMethod),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AvailableDeliveryMethodProp")]
impl TryFrom<SchemaValue> for AvailableDeliveryMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableDeliveryMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryMethod::try_from(v.clone()) { return Ok(AvailableDeliveryMethodProp::DeliveryMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailableDeliveryMethodProp")]
impl TryFrom<&SchemaValue> for AvailableDeliveryMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableDeliveryMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryMethod::try_from(v.clone()) { return Ok(AvailableDeliveryMethodProp::DeliveryMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the aspect or aspects specifically addressed in some [HealthTopicContent]. For example, that the content is an overview, or that it talks about treatment, self-care, treatments or their side-effects.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasHealthAspectProp")]
pub enum HasHealthAspectProp {
HealthAspectEnumeration(HealthAspectEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasHealthAspectProp")]
impl TryFrom<SchemaValue> for HasHealthAspectProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasHealthAspectProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HealthAspectEnumeration::try_from(v.clone()) { return Ok(HasHealthAspectProp::HealthAspectEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasHealthAspectProp")]
impl TryFrom<&SchemaValue> for HasHealthAspectProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasHealthAspectProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HealthAspectEnumeration::try_from(v.clone()) { return Ok(HasHealthAspectProp::HealthAspectEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Additional details to capture the origin of the cost data. For example, 'Medicare Part B'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CostOriginProp")]
pub enum CostOriginProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CostOriginProp")]
impl TryFrom<SchemaValue> for CostOriginProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CostOriginProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CostOriginProp")]
impl TryFrom<&SchemaValue> for CostOriginProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CostOriginProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Last postal code in the range (included). Needs to be after [postalCodeBegin].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PostalCodeEndProp")]
pub enum PostalCodeEndProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PostalCodeEndProp")]
impl TryFrom<SchemaValue> for PostalCodeEndProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostalCodeEndProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PostalCodeEndProp")]
impl TryFrom<&SchemaValue> for PostalCodeEndProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostalCodeEndProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The insurance plans that cover this drug.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncludedInHealthInsurancePlanProp")]
pub enum IncludedInHealthInsurancePlanProp {
Text(String),
HealthInsurancePlan(HealthInsurancePlan),
}
#[automatically_derived]
#[cfg(feature = "IncludedInHealthInsurancePlanProp")]
impl TryFrom<SchemaValue> for IncludedInHealthInsurancePlanProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludedInHealthInsurancePlanProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HealthInsurancePlan::try_from(v.clone()) { return Ok(IncludedInHealthInsurancePlanProp::HealthInsurancePlan(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncludedInHealthInsurancePlanProp")]
impl TryFrom<&SchemaValue> for IncludedInHealthInsurancePlanProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludedInHealthInsurancePlanProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HealthInsurancePlan::try_from(v.clone()) { return Ok(IncludedInHealthInsurancePlanProp::HealthInsurancePlan(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Represents a relationship between two geometries (or the places they represent), relating a geometry to another that geospatially overlaps it, i.e. they have some but not all points in common. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoOverlapsProp")]
pub enum GeoOverlapsProp {
Text(String),
Place(Place),
GeospatialGeometry(GeospatialGeometry),
}
#[automatically_derived]
#[cfg(feature = "GeoOverlapsProp")]
impl TryFrom<SchemaValue> for GeoOverlapsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoOverlapsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoOverlapsProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoOverlapsProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoOverlapsProp")]
impl TryFrom<&SchemaValue> for GeoOverlapsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoOverlapsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoOverlapsProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoOverlapsProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The duration of validity of a permit or similar thing.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValidForProp")]
pub enum ValidForProp {
Duration(Duration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ValidForProp")]
impl TryFrom<SchemaValue> for ValidForProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValidForProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(ValidForProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValidForProp")]
impl TryFrom<&SchemaValue> for ValidForProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValidForProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(ValidForProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The human sensory perceptual system or cognitive faculty through which a person may process or perceive information. Values should be drawn from the [approved vocabulary](https://www.w3.org/2021/a11y-discov-vocab/latest/#accessMode-vocabulary).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccessModeProp")]
pub enum AccessModeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AccessModeProp")]
impl TryFrom<SchemaValue> for AccessModeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessModeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccessModeProp")]
impl TryFrom<&SchemaValue> for AccessModeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessModeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A subject of the study, i.e. one of the medical conditions, therapies, devices, drugs, etc. investigated by the study.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StudySubjectProp")]
pub enum StudySubjectProp {
Text(String),
MedicalEntity(MedicalEntity),
}
#[automatically_derived]
#[cfg(feature = "StudySubjectProp")]
impl TryFrom<SchemaValue> for StudySubjectProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StudySubjectProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(StudySubjectProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StudySubjectProp")]
impl TryFrom<&SchemaValue> for StudySubjectProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StudySubjectProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(StudySubjectProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A child of the person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ChildrenProp")]
pub enum ChildrenProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ChildrenProp")]
impl TryFrom<SchemaValue> for ChildrenProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ChildrenProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ChildrenProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ChildrenProp")]
impl TryFrom<&SchemaValue> for ChildrenProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ChildrenProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ChildrenProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Represents a relationship between two geometries (or the places they represent), relating a geometry to another that crosses it: "a crosses b: they have some but not all interior points in common, and the dimension of the intersection is less than that of at least one of them". As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoCrossesProp")]
pub enum GeoCrossesProp {
Text(String),
Place(Place),
GeospatialGeometry(GeospatialGeometry),
}
#[automatically_derived]
#[cfg(feature = "GeoCrossesProp")]
impl TryFrom<SchemaValue> for GeoCrossesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoCrossesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoCrossesProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoCrossesProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoCrossesProp")]
impl TryFrom<&SchemaValue> for GeoCrossesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoCrossesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoCrossesProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoCrossesProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An award won by or for this item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AwardProp")]
pub enum AwardProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AwardProp")]
impl TryFrom<SchemaValue> for AwardProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AwardProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AwardProp")]
impl TryFrom<&SchemaValue> for AwardProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AwardProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The opening hours of a certain place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OpeningHoursSpecificationProp")]
pub enum OpeningHoursSpecificationProp {
Text(String),
OpeningHoursSpecification(OpeningHoursSpecification),
}
#[automatically_derived]
#[cfg(feature = "OpeningHoursSpecificationProp")]
impl TryFrom<SchemaValue> for OpeningHoursSpecificationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OpeningHoursSpecificationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OpeningHoursSpecification::try_from(v.clone()) { return Ok(OpeningHoursSpecificationProp::OpeningHoursSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OpeningHoursSpecificationProp")]
impl TryFrom<&SchemaValue> for OpeningHoursSpecificationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OpeningHoursSpecificationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OpeningHoursSpecification::try_from(v.clone()) { return Ok(OpeningHoursSpecificationProp::OpeningHoursSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The vasculature the lymphatic structure runs, or efferents, to.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RunsToProp")]
pub enum RunsToProp {
Vessel(Vessel),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RunsToProp")]
impl TryFrom<SchemaValue> for RunsToProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RunsToProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Vessel::try_from(v.clone()) { return Ok(RunsToProp::Vessel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RunsToProp")]
impl TryFrom<&SchemaValue> for RunsToProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RunsToProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Vessel::try_from(v.clone()) { return Ok(RunsToProp::Vessel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The jurisdiction from which the legislation originates.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationJurisdictionProp")]
pub enum LegislationJurisdictionProp {
Text(String),
AdministrativeArea(AdministrativeArea),
}
#[automatically_derived]
#[cfg(feature = "LegislationJurisdictionProp")]
impl TryFrom<SchemaValue> for LegislationJurisdictionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationJurisdictionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(LegislationJurisdictionProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationJurisdictionProp")]
impl TryFrom<&SchemaValue> for LegislationJurisdictionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationJurisdictionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(LegislationJurisdictionProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SignificantLinkProp")]
pub enum SignificantLinkProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SignificantLinkProp")]
impl TryFrom<SchemaValue> for SignificantLinkProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SignificantLinkProp::Url(v)),
SchemaValue::Text(v) => Ok(SignificantLinkProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SignificantLinkProp")]
impl TryFrom<&SchemaValue> for SignificantLinkProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SignificantLinkProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(SignificantLinkProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A [HyperTocEntry] can have a [tocContinuation] indicated, which is another [HyperTocEntry] that would be the default next item to play or render.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TocContinuationProp")]
pub enum TocContinuationProp {
Text(String),
HyperTocEntry(HyperTocEntry),
}
#[automatically_derived]
#[cfg(feature = "TocContinuationProp")]
impl TryFrom<SchemaValue> for TocContinuationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TocContinuationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HyperTocEntry::try_from(v.clone()) { return Ok(TocContinuationProp::HyperTocEntry(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TocContinuationProp")]
impl TryFrom<&SchemaValue> for TocContinuationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TocContinuationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HyperTocEntry::try_from(v.clone()) { return Ok(TocContinuationProp::HyperTocEntry(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The release date of a vehicle model (often used to differentiate versions of the same make and model).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ModelDateProp")]
pub enum ModelDateProp {
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ModelDateProp")]
impl TryFrom<SchemaValue> for ModelDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ModelDateProp::Date(v)),
SchemaValue::Text(v) => Ok(ModelDateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ModelDateProp")]
impl TryFrom<&SchemaValue> for ModelDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ModelDateProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(ModelDateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// How often one should break from the activity.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RestPeriodsProp")]
pub enum RestPeriodsProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RestPeriodsProp")]
impl TryFrom<SchemaValue> for RestPeriodsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RestPeriodsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(RestPeriodsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RestPeriodsProp")]
impl TryFrom<&SchemaValue> for RestPeriodsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RestPeriodsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(RestPeriodsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Amount of shipping costs for product returns (for any reason). Applicable when property [returnFees] equals [ReturnShippingFees].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReturnShippingFeesAmountProp")]
pub enum ReturnShippingFeesAmountProp {
Text(String),
MonetaryAmount(MonetaryAmount),
}
#[automatically_derived]
#[cfg(feature = "ReturnShippingFeesAmountProp")]
impl TryFrom<SchemaValue> for ReturnShippingFeesAmountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnShippingFeesAmountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(ReturnShippingFeesAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReturnShippingFeesAmountProp")]
impl TryFrom<&SchemaValue> for ReturnShippingFeesAmountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnShippingFeesAmountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(ReturnShippingFeesAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The main performer or performers of the event—for example, a presenter, musician, or actor.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PerformersProp")]
pub enum PerformersProp {
Organization(Organization),
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PerformersProp")]
impl TryFrom<SchemaValue> for PerformersProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PerformersProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(PerformersProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(PerformersProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PerformersProp")]
impl TryFrom<&SchemaValue> for PerformersProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PerformersProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(PerformersProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(PerformersProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BestRatingProp")]
pub enum BestRatingProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "BestRatingProp")]
impl TryFrom<SchemaValue> for BestRatingProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BestRatingProp::Text(v)),
SchemaValue::Number(v) => Ok(BestRatingProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BestRatingProp")]
impl TryFrom<&SchemaValue> for BestRatingProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BestRatingProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(BestRatingProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The anatomical or organ system that this structure is part of.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PartOfSystemProp")]
pub enum PartOfSystemProp {
AnatomicalSystem(AnatomicalSystem),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PartOfSystemProp")]
impl TryFrom<SchemaValue> for PartOfSystemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfSystemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(PartOfSystemProp::AnatomicalSystem(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PartOfSystemProp")]
impl TryFrom<&SchemaValue> for PartOfSystemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfSystemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(PartOfSystemProp::AnatomicalSystem(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed.
///
/// See also [eligibleRegion].
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IneligibleRegionProp")]
pub enum IneligibleRegionProp {
GeoShape(GeoShape),
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IneligibleRegionProp")]
impl TryFrom<SchemaValue> for IneligibleRegionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IneligibleRegionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeoShape::try_from(v.clone()) { return Ok(IneligibleRegionProp::GeoShape(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(IneligibleRegionProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IneligibleRegionProp")]
impl TryFrom<&SchemaValue> for IneligibleRegionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IneligibleRegionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeoShape::try_from(v.clone()) { return Ok(IneligibleRegionProp::GeoShape(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(IneligibleRegionProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The datetime the item was removed from the DataFeed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DateDeletedProp")]
pub enum DateDeletedProp {
Date(String),
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DateDeletedProp")]
impl TryFrom<SchemaValue> for DateDeletedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(DateDeletedProp::Date(v)),
SchemaValue::DateTime(v) => Ok(DateDeletedProp::DateTime(v)),
SchemaValue::Text(v) => Ok(DateDeletedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DateDeletedProp")]
impl TryFrom<&SchemaValue> for DateDeletedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(DateDeletedProp::Date(v.clone())),
SchemaValue::DateTime(v) => Ok(DateDeletedProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(DateDeletedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date at which the program begins collecting applications for the next enrollment cycle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ApplicationStartDateProp")]
pub enum ApplicationStartDateProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "ApplicationStartDateProp")]
impl TryFrom<SchemaValue> for ApplicationStartDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationStartDateProp::Text(v)),
SchemaValue::Date(v) => Ok(ApplicationStartDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ApplicationStartDateProp")]
impl TryFrom<&SchemaValue> for ApplicationStartDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationStartDateProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(ApplicationStartDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the status of drug prescription, e.g. local catalogs classifications or whether the drug is available by prescription or over-the-counter, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PrescriptionStatusProp")]
pub enum PrescriptionStatusProp {
DrugPrescriptionStatus(DrugPrescriptionStatus),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PrescriptionStatusProp")]
impl TryFrom<SchemaValue> for PrescriptionStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrescriptionStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugPrescriptionStatus::try_from(v.clone()) { return Ok(PrescriptionStatusProp::DrugPrescriptionStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PrescriptionStatusProp")]
impl TryFrom<&SchemaValue> for PrescriptionStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrescriptionStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugPrescriptionStatus::try_from(v.clone()) { return Ok(PrescriptionStatusProp::DrugPrescriptionStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifies the CreativeWork associated with the UserComment.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DiscussesProp")]
pub enum DiscussesProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DiscussesProp")]
impl TryFrom<SchemaValue> for DiscussesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiscussesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(DiscussesProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DiscussesProp")]
impl TryFrom<&SchemaValue> for DiscussesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiscussesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(DiscussesProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date at which the program stops collecting applications for the next enrollment cycle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ApplicationDeadlineProp")]
pub enum ApplicationDeadlineProp {
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ApplicationDeadlineProp")]
impl TryFrom<SchemaValue> for ApplicationDeadlineProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ApplicationDeadlineProp::Date(v)),
SchemaValue::Text(v) => Ok(ApplicationDeadlineProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ApplicationDeadlineProp")]
impl TryFrom<&SchemaValue> for ApplicationDeadlineProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ApplicationDeadlineProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(ApplicationDeadlineProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// numtotbeds - ALL HOSPITAL BEDS: Total number of all inpatient and outpatient beds, including all staffed, ICU, licensed, and overflow (surge) beds used for inpatients or outpatients.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumTotBedsProp")]
pub enum CvdNumTotBedsProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CvdNumTotBedsProp")]
impl TryFrom<SchemaValue> for CvdNumTotBedsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumTotBedsProp::Number(v)),
SchemaValue::Text(v) => Ok(CvdNumTotBedsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumTotBedsProp")]
impl TryFrom<&SchemaValue> for CvdNumTotBedsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumTotBedsProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(CvdNumTotBedsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SubEventProp")]
pub enum SubEventProp {
Event(Event),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SubEventProp")]
impl TryFrom<SchemaValue> for SubEventProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubEventProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(SubEventProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SubEventProp")]
impl TryFrom<&SchemaValue> for SubEventProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubEventProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(SubEventProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The street address. For example, 1600 Amphitheatre Pkwy.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StreetAddressProp")]
pub enum StreetAddressProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "StreetAddressProp")]
impl TryFrom<SchemaValue> for StreetAddressProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StreetAddressProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StreetAddressProp")]
impl TryFrom<&SchemaValue> for StreetAddressProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StreetAddressProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// 'bookingAgent' is an out-dated term indicating a 'broker' that serves as a booking agent.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BookingAgentProp")]
pub enum BookingAgentProp {
Text(String),
Organization(Organization),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "BookingAgentProp")]
impl TryFrom<SchemaValue> for BookingAgentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BookingAgentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BookingAgentProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(BookingAgentProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BookingAgentProp")]
impl TryFrom<&SchemaValue> for BookingAgentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BookingAgentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BookingAgentProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(BookingAgentProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A ticket associated with the reservation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReservedTicketProp")]
pub enum ReservedTicketProp {
Text(String),
Ticket(Ticket),
}
#[automatically_derived]
#[cfg(feature = "ReservedTicketProp")]
impl TryFrom<SchemaValue> for ReservedTicketProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReservedTicketProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Ticket::try_from(v.clone()) { return Ok(ReservedTicketProp::Ticket(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReservedTicketProp")]
impl TryFrom<&SchemaValue> for ReservedTicketProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReservedTicketProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Ticket::try_from(v.clone()) { return Ok(ReservedTicketProp::Ticket(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date of production of the item, e.g. vehicle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProductionDateProp")]
pub enum ProductionDateProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "ProductionDateProp")]
impl TryFrom<SchemaValue> for ProductionDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProductionDateProp::Text(v)),
SchemaValue::Date(v) => Ok(ProductionDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProductionDateProp")]
impl TryFrom<&SchemaValue> for ProductionDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProductionDateProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(ProductionDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// If this NewsArticle appears in print, this field indicates the print section in which the article appeared.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PrintSectionProp")]
pub enum PrintSectionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PrintSectionProp")]
impl TryFrom<SchemaValue> for PrintSectionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrintSectionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PrintSectionProp")]
impl TryFrom<&SchemaValue> for PrintSectionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrintSectionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A means of accessing the service (e.g. a phone bank, a web site, a location, etc.).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailableChannelProp")]
pub enum AvailableChannelProp {
Text(String),
ServiceChannel(ServiceChannel),
}
#[automatically_derived]
#[cfg(feature = "AvailableChannelProp")]
impl TryFrom<SchemaValue> for AvailableChannelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableChannelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ServiceChannel::try_from(v.clone()) { return Ok(AvailableChannelProp::ServiceChannel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailableChannelProp")]
impl TryFrom<&SchemaValue> for AvailableChannelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableChannelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ServiceChannel::try_from(v.clone()) { return Ok(AvailableChannelProp::ServiceChannel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The page on which the work starts; for example "135" or "xiii".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PageStartProp")]
pub enum PageStartProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "PageStartProp")]
impl TryFrom<SchemaValue> for PageStartProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PageStartProp::Text(v)),
SchemaValue::Integer(v) => Ok(PageStartProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PageStartProp")]
impl TryFrom<&SchemaValue> for PageStartProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PageStartProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(PageStartProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A unique identifier for the membership.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MembershipNumberProp")]
pub enum MembershipNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MembershipNumberProp")]
impl TryFrom<SchemaValue> for MembershipNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MembershipNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MembershipNumberProp")]
impl TryFrom<&SchemaValue> for MembershipNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MembershipNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A link to a screenshot image of the app.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ScreenshotProp")]
pub enum ScreenshotProp {
ImageObject(ImageObject),
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "ScreenshotProp")]
impl TryFrom<SchemaValue> for ScreenshotProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ScreenshotProp::Text(v)),
SchemaValue::Url(v) => Ok(ScreenshotProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(ScreenshotProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ScreenshotProp")]
impl TryFrom<&SchemaValue> for ScreenshotProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ScreenshotProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ScreenshotProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(ScreenshotProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Identifier of the flight's departure gate.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DepartureGateProp")]
pub enum DepartureGateProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DepartureGateProp")]
impl TryFrom<SchemaValue> for DepartureGateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureGateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DepartureGateProp")]
impl TryFrom<&SchemaValue> for DepartureGateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureGateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The quantity of the materials being described or an expression of the physical space they occupy.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MaterialExtentProp")]
pub enum MaterialExtentProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "MaterialExtentProp")]
impl TryFrom<SchemaValue> for MaterialExtentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MaterialExtentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MaterialExtentProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MaterialExtentProp")]
impl TryFrom<&SchemaValue> for MaterialExtentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MaterialExtentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MaterialExtentProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The overall order the items in this delivery were included in.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PartOfOrderProp")]
pub enum PartOfOrderProp {
Order(Order),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PartOfOrderProp")]
impl TryFrom<SchemaValue> for PartOfOrderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfOrderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Order::try_from(v.clone()) { return Ok(PartOfOrderProp::Order(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PartOfOrderProp")]
impl TryFrom<&SchemaValue> for PartOfOrderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfOrderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Order::try_from(v.clone()) { return Ok(PartOfOrderProp::Order(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The monoisotopic mass is the sum of the masses of the atoms in a molecule using the unbound, ground-state, rest mass of the principal (most abundant) isotope for each element instead of the isotopic average mass. Please include the units in the form '<Number> <unit>', for example '770.230488 g/mol' or as '<QuantitativeValue>.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MonoisotopicMolecularWeightProp")]
pub enum MonoisotopicMolecularWeightProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "MonoisotopicMolecularWeightProp")]
impl TryFrom<SchemaValue> for MonoisotopicMolecularWeightProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MonoisotopicMolecularWeightProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MonoisotopicMolecularWeightProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MonoisotopicMolecularWeightProp")]
impl TryFrom<&SchemaValue> for MonoisotopicMolecularWeightProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MonoisotopicMolecularWeightProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MonoisotopicMolecularWeightProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date that payment is due.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PaymentDueProp")]
pub enum PaymentDueProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "PaymentDueProp")]
impl TryFrom<SchemaValue> for PaymentDueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentDueProp::Text(v)),
SchemaValue::DateTime(v) => Ok(PaymentDueProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PaymentDueProp")]
impl TryFrom<&SchemaValue> for PaymentDueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentDueProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(PaymentDueProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The class of drug this belongs to (e.g., statins).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DrugClassProp")]
pub enum DrugClassProp {
DrugClass(DrugClass),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DrugClassProp")]
impl TryFrom<SchemaValue> for DrugClassProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DrugClassProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugClass::try_from(v.clone()) { return Ok(DrugClassProp::DrugClass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DrugClassProp")]
impl TryFrom<&SchemaValue> for DrugClassProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DrugClassProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugClass::try_from(v.clone()) { return Ok(DrugClassProp::DrugClass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Textual description of the unit type (including suite vs. room, size of bed, etc.).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LodgingUnitTypeProp")]
pub enum LodgingUnitTypeProp {
QualitativeValue(QualitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LodgingUnitTypeProp")]
impl TryFrom<SchemaValue> for LodgingUnitTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LodgingUnitTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(LodgingUnitTypeProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LodgingUnitTypeProp")]
impl TryFrom<&SchemaValue> for LodgingUnitTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LodgingUnitTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(LodgingUnitTypeProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A common representation such as a protein sequence or chemical structure for this entity. For images use schema.org/image.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasRepresentationProp")]
pub enum HasRepresentationProp {
Text(String),
Url(String),
PropertyValue(PropertyValue),
}
#[automatically_derived]
#[cfg(feature = "HasRepresentationProp")]
impl TryFrom<SchemaValue> for HasRepresentationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasRepresentationProp::Text(v)),
SchemaValue::Url(v) => Ok(HasRepresentationProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(HasRepresentationProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasRepresentationProp")]
impl TryFrom<&SchemaValue> for HasRepresentationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasRepresentationProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(HasRepresentationProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(HasRepresentationProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An intended audience, i.e. a group for whom something was created.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AudienceProp")]
pub enum AudienceProp {
Audience(Audience),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AudienceProp")]
impl TryFrom<SchemaValue> for AudienceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AudienceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(AudienceProp::Audience(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AudienceProp")]
impl TryFrom<&SchemaValue> for AudienceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AudienceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(AudienceProp::Audience(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// numc19hopats - HOSPITAL ONSET: Patients hospitalized in an NHSN inpatient care location with onset of suspected or confirmed COVID-19 14 or more days after hospitalization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumC19HOPatsProp")]
pub enum CvdNumC19HOPatsProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19HOPatsProp")]
impl TryFrom<SchemaValue> for CvdNumC19HOPatsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumC19HOPatsProp::Text(v)),
SchemaValue::Number(v) => Ok(CvdNumC19HOPatsProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19HOPatsProp")]
impl TryFrom<&SchemaValue> for CvdNumC19HOPatsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdNumC19HOPatsProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(CvdNumC19HOPatsProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// For itemListElement values, you can use simple strings (e.g. "Peter", "Paul", "Mary"), existing entities, or use ListItem.
///
/// Text values are best if the elements in the list are plain strings. Existing entities are best for a simple, unordered list of existing things in your data. ListItem is used with ordered lists when you want to provide additional context about the element in that list or when the same item might be in different places in different lists.
///
/// Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItemListElementProp")]
pub enum ItemListElementProp {
Text(String),
Thing(Thing),
ListItem(ListItem),
}
#[automatically_derived]
#[cfg(feature = "ItemListElementProp")]
impl TryFrom<SchemaValue> for ItemListElementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemListElementProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ItemListElementProp::Thing(object)) }
if let Ok(object) = ListItem::try_from(v.clone()) { return Ok(ItemListElementProp::ListItem(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItemListElementProp")]
impl TryFrom<&SchemaValue> for ItemListElementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemListElementProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ItemListElementProp::Thing(object)) }
if let Ok(object) = ListItem::try_from(v.clone()) { return Ok(ItemListElementProp::ListItem(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A preventative therapy used to prevent an initial occurrence of the medical condition, such as vaccination.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PrimaryPreventionProp")]
pub enum PrimaryPreventionProp {
MedicalTherapy(MedicalTherapy),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PrimaryPreventionProp")]
impl TryFrom<SchemaValue> for PrimaryPreventionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrimaryPreventionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(PrimaryPreventionProp::MedicalTherapy(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PrimaryPreventionProp")]
impl TryFrom<&SchemaValue> for PrimaryPreventionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrimaryPreventionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(PrimaryPreventionProp::MedicalTherapy(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of tracks in this album or playlist.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumTracksProp")]
pub enum NumTracksProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "NumTracksProp")]
impl TryFrom<SchemaValue> for NumTracksProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumTracksProp::Text(v)),
SchemaValue::Integer(v) => Ok(NumTracksProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumTracksProp")]
impl TryFrom<&SchemaValue> for NumTracksProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumTracksProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(NumTracksProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The place of attachment of a muscle, or what the muscle moves.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InsertionProp")]
pub enum InsertionProp {
Text(String),
AnatomicalStructure(AnatomicalStructure),
}
#[automatically_derived]
#[cfg(feature = "InsertionProp")]
impl TryFrom<SchemaValue> for InsertionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InsertionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(InsertionProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InsertionProp")]
impl TryFrom<&SchemaValue> for InsertionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InsertionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(InsertionProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The tangible thing generated by the service, e.g. a passport, permit, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProducesProp")]
pub enum ProducesProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProducesProp")]
impl TryFrom<SchemaValue> for ProducesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProducesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ProducesProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProducesProp")]
impl TryFrom<&SchemaValue> for ProducesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProducesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ProducesProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A possible treatment to address this condition, sign or symptom.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PossibleTreatmentProp")]
pub enum PossibleTreatmentProp {
Text(String),
MedicalTherapy(MedicalTherapy),
}
#[automatically_derived]
#[cfg(feature = "PossibleTreatmentProp")]
impl TryFrom<SchemaValue> for PossibleTreatmentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PossibleTreatmentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(PossibleTreatmentProp::MedicalTherapy(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PossibleTreatmentProp")]
impl TryFrom<&SchemaValue> for PossibleTreatmentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PossibleTreatmentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(PossibleTreatmentProp::MedicalTherapy(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The work that this work has been translated from. E.g. 物种起源 is a translationOf “On the Origin of Species”.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TranslationOfWorkProp")]
pub enum TranslationOfWorkProp {
Text(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "TranslationOfWorkProp")]
impl TryFrom<SchemaValue> for TranslationOfWorkProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TranslationOfWorkProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(TranslationOfWorkProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TranslationOfWorkProp")]
impl TryFrom<&SchemaValue> for TranslationOfWorkProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TranslationOfWorkProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(TranslationOfWorkProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// For a [NewsMediaOrganization] or other news-related [Organization], a statement explaining when authors of articles are not named in bylines.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NoBylinesPolicyProp")]
pub enum NoBylinesPolicyProp {
CreativeWork(CreativeWork),
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "NoBylinesPolicyProp")]
impl TryFrom<SchemaValue> for NoBylinesPolicyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NoBylinesPolicyProp::Text(v)),
SchemaValue::Url(v) => Ok(NoBylinesPolicyProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(NoBylinesPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NoBylinesPolicyProp")]
impl TryFrom<&SchemaValue> for NoBylinesPolicyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NoBylinesPolicyProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(NoBylinesPolicyProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(NoBylinesPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The currency (in 3-letter) of the drug cost. See: http://en.wikipedia.org/wiki/ISO_4217.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CostCurrencyProp")]
pub enum CostCurrencyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CostCurrencyProp")]
impl TryFrom<SchemaValue> for CostCurrencyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CostCurrencyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CostCurrencyProp")]
impl TryFrom<&SchemaValue> for CostCurrencyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CostCurrencyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A dosage form in which this drug/supplement is available, e.g. 'tablet', 'suspension', 'injection'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DosageFormProp")]
pub enum DosageFormProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DosageFormProp")]
impl TryFrom<SchemaValue> for DosageFormProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DosageFormProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DosageFormProp")]
impl TryFrom<&SchemaValue> for DosageFormProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DosageFormProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A role played by the BioChemEntity within a biological context.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BiologicalRoleProp")]
pub enum BiologicalRoleProp {
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BiologicalRoleProp")]
impl TryFrom<SchemaValue> for BiologicalRoleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BiologicalRoleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(BiologicalRoleProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BiologicalRoleProp")]
impl TryFrom<&SchemaValue> for BiologicalRoleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BiologicalRoleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(BiologicalRoleProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// If applicable, a medical specialty in which this entity is relevant.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RelevantSpecialtyProp")]
pub enum RelevantSpecialtyProp {
MedicalSpecialty(MedicalSpecialty),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RelevantSpecialtyProp")]
impl TryFrom<SchemaValue> for RelevantSpecialtyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelevantSpecialtyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalSpecialty::try_from(v.clone()) { return Ok(RelevantSpecialtyProp::MedicalSpecialty(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RelevantSpecialtyProp")]
impl TryFrom<&SchemaValue> for RelevantSpecialtyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelevantSpecialtyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalSpecialty::try_from(v.clone()) { return Ok(RelevantSpecialtyProp::MedicalSpecialty(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number or type of airbags in the vehicle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfAirbagsProp")]
pub enum NumberOfAirbagsProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfAirbagsProp")]
impl TryFrom<SchemaValue> for NumberOfAirbagsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfAirbagsProp::Number(v)),
SchemaValue::Text(v) => Ok(NumberOfAirbagsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfAirbagsProp")]
impl TryFrom<&SchemaValue> for NumberOfAirbagsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfAirbagsProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(NumberOfAirbagsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The stop or station from which the bus departs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DepartureBusStopProp")]
pub enum DepartureBusStopProp {
BusStation(BusStation),
BusStop(BusStop),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DepartureBusStopProp")]
impl TryFrom<SchemaValue> for DepartureBusStopProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureBusStopProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BusStation::try_from(v.clone()) { return Ok(DepartureBusStopProp::BusStation(object)) }
if let Ok(object) = BusStop::try_from(v.clone()) { return Ok(DepartureBusStopProp::BusStop(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DepartureBusStopProp")]
impl TryFrom<&SchemaValue> for DepartureBusStopProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureBusStopProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BusStation::try_from(v.clone()) { return Ok(DepartureBusStopProp::BusStation(object)) }
if let Ok(object) = BusStop::try_from(v.clone()) { return Ok(DepartureBusStopProp::BusStop(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The 90th percentile value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "Percentile90Prop")]
pub enum Percentile90Prop {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "Percentile90Prop")]
impl TryFrom<SchemaValue> for Percentile90Prop {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(Percentile90Prop::Number(v)),
SchemaValue::Text(v) => Ok(Percentile90Prop::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "Percentile90Prop")]
impl TryFrom<&SchemaValue> for Percentile90Prop {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(Percentile90Prop::Number(v.clone())),
SchemaValue::Text(v) => Ok(Percentile90Prop::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A textual description of known damages, both repaired and unrepaired.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "KnownVehicleDamagesProp")]
pub enum KnownVehicleDamagesProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "KnownVehicleDamagesProp")]
impl TryFrom<SchemaValue> for KnownVehicleDamagesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(KnownVehicleDamagesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "KnownVehicleDamagesProp")]
impl TryFrom<&SchemaValue> for KnownVehicleDamagesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(KnownVehicleDamagesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The geographic area where the service is provided.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServiceAreaProp")]
pub enum ServiceAreaProp {
GeoShape(GeoShape),
AdministrativeArea(AdministrativeArea),
Text(String),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "ServiceAreaProp")]
impl TryFrom<SchemaValue> for ServiceAreaProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceAreaProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeoShape::try_from(v.clone()) { return Ok(ServiceAreaProp::GeoShape(object)) }
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(ServiceAreaProp::AdministrativeArea(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ServiceAreaProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServiceAreaProp")]
impl TryFrom<&SchemaValue> for ServiceAreaProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceAreaProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeoShape::try_from(v.clone()) { return Ok(ServiceAreaProp::GeoShape(object)) }
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(ServiceAreaProp::AdministrativeArea(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ServiceAreaProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A unique identifier for the reservation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReservationIdProp")]
pub enum ReservationIdProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReservationIdProp")]
impl TryFrom<SchemaValue> for ReservationIdProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReservationIdProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReservationIdProp")]
impl TryFrom<&SchemaValue> for ReservationIdProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReservationIdProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The RxCUI drug identifier from RXNORM.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RxcuiProp")]
pub enum RxcuiProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RxcuiProp")]
impl TryFrom<SchemaValue> for RxcuiProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RxcuiProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RxcuiProp")]
impl TryFrom<&SchemaValue> for RxcuiProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RxcuiProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the [productGroupID] for a [ProductGroup] that this product [isVariantOf].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InProductGroupWithIDProp")]
pub enum InProductGroupWithIDProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InProductGroupWithIDProp")]
impl TryFrom<SchemaValue> for InProductGroupWithIDProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InProductGroupWithIDProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InProductGroupWithIDProp")]
impl TryFrom<&SchemaValue> for InProductGroupWithIDProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InProductGroupWithIDProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A person that acts as performing member of a sports team; a player as opposed to a coach.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AthleteProp")]
pub enum AthleteProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "AthleteProp")]
impl TryFrom<SchemaValue> for AthleteProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AthleteProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AthleteProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AthleteProp")]
impl TryFrom<&SchemaValue> for AthleteProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AthleteProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AthleteProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Type of app development: phone, Metro style, desktop, XBox, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TargetPlatformProp")]
pub enum TargetPlatformProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TargetPlatformProp")]
impl TryFrom<SchemaValue> for TargetPlatformProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetPlatformProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TargetPlatformProp")]
impl TryFrom<&SchemaValue> for TargetPlatformProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetPlatformProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A standardized size of a product or creative work, specified either through a simple textual string (for example 'XL', '32Wx34L'), a QuantitativeValue with a unitCode, or a comprehensive and structured [SizeSpecification]; in other cases, the [width], [height], [depth] and [weight] properties may be more applicable.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SizeProp")]
pub enum SizeProp {
QuantitativeValue(QuantitativeValue),
SizeSpecification(SizeSpecification),
Text(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "SizeProp")]
impl TryFrom<SchemaValue> for SizeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SizeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(SizeProp::QuantitativeValue(object)) }
if let Ok(object) = SizeSpecification::try_from(v.clone()) { return Ok(SizeProp::SizeSpecification(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(SizeProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SizeProp")]
impl TryFrom<&SchemaValue> for SizeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SizeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(SizeProp::QuantitativeValue(object)) }
if let Ok(object) = SizeSpecification::try_from(v.clone()) { return Ok(SizeProp::SizeSpecification(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(SizeProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The upper value of some characteristic or property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MaxValueProp")]
pub enum MaxValueProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "MaxValueProp")]
impl TryFrom<SchemaValue> for MaxValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MaxValueProp::Text(v)),
SchemaValue::Number(v) => Ok(MaxValueProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MaxValueProp")]
impl TryFrom<&SchemaValue> for MaxValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MaxValueProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(MaxValueProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The length of time it takes to prepare the items to be used in instructions or a direction, in [ISO 8601 duration format](http://en.wikipedia.org/wiki/ISO_8601).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PrepTimeProp")]
pub enum PrepTimeProp {
Text(String),
Duration(Duration),
}
#[automatically_derived]
#[cfg(feature = "PrepTimeProp")]
impl TryFrom<SchemaValue> for PrepTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrepTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(PrepTimeProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PrepTimeProp")]
impl TryFrom<&SchemaValue> for PrepTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrepTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(PrepTimeProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Either the actual menu as a structured representation, as text, or a URL of the menu.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasMenuProp")]
pub enum HasMenuProp {
Text(String),
Url(String),
Menu(Menu),
}
#[automatically_derived]
#[cfg(feature = "HasMenuProp")]
impl TryFrom<SchemaValue> for HasMenuProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMenuProp::Text(v)),
SchemaValue::Url(v) => Ok(HasMenuProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Menu::try_from(v.clone()) { return Ok(HasMenuProp::Menu(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasMenuProp")]
impl TryFrom<&SchemaValue> for HasMenuProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMenuProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(HasMenuProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Menu::try_from(v.clone()) { return Ok(HasMenuProp::Menu(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Photographs of this place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PhotosProp")]
pub enum PhotosProp {
Text(String),
ImageObject(ImageObject),
Photograph(Photograph),
}
#[automatically_derived]
#[cfg(feature = "PhotosProp")]
impl TryFrom<SchemaValue> for PhotosProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PhotosProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(PhotosProp::ImageObject(object)) }
if let Ok(object) = Photograph::try_from(v.clone()) { return Ok(PhotosProp::Photograph(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PhotosProp")]
impl TryFrom<&SchemaValue> for PhotosProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PhotosProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(PhotosProp::ImageObject(object)) }
if let Ok(object) = Photograph::try_from(v.clone()) { return Ok(PhotosProp::Photograph(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of copies when multiple copies of a piece of artwork are produced - e.g. for a limited edition of 20 prints, 'artEdition' refers to the total number of copies (in this example "20").
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArtEditionProp")]
pub enum ArtEditionProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArtEditionProp")]
impl TryFrom<SchemaValue> for ArtEditionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(ArtEditionProp::Integer(v)),
SchemaValue::Text(v) => Ok(ArtEditionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArtEditionProp")]
impl TryFrom<&SchemaValue> for ArtEditionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(ArtEditionProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(ArtEditionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A CreativeWork or Event about this Thing.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SubjectOfProp")]
pub enum SubjectOfProp {
Event(Event),
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SubjectOfProp")]
impl TryFrom<SchemaValue> for SubjectOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubjectOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(SubjectOfProp::Event(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(SubjectOfProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SubjectOfProp")]
impl TryFrom<&SchemaValue> for SubjectOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubjectOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(SubjectOfProp::Event(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(SubjectOfProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The permitted vertical load (TWR) of a trailer attached to the vehicle. Also referred to as Tongue Load Rating (TLR) or Vertical Load Rating (VLR).
///
/// Typical unit code(s): KGM for kilogram, LBR for pound
///
/// * Note 1: You can indicate additional information in the [name] of the [QuantitativeValue] node.
/// * Note 2: You may also link to a [QualitativeValue] node that provides additional information using [valueReference].
/// * Note 3: Note that you can use [minValue] and [maxValue] to indicate ranges.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TongueWeightProp")]
pub enum TongueWeightProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TongueWeightProp")]
impl TryFrom<SchemaValue> for TongueWeightProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TongueWeightProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(TongueWeightProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TongueWeightProp")]
impl TryFrom<&SchemaValue> for TongueWeightProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TongueWeightProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(TongueWeightProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The length of time it takes to perform instructions or a direction (not including time to prepare the supplies), in [ISO 8601 duration format](http://en.wikipedia.org/wiki/ISO_8601).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PerformTimeProp")]
pub enum PerformTimeProp {
Text(String),
Duration(Duration),
}
#[automatically_derived]
#[cfg(feature = "PerformTimeProp")]
impl TryFrom<SchemaValue> for PerformTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PerformTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(PerformTimeProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PerformTimeProp")]
impl TryFrom<&SchemaValue> for PerformTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PerformTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(PerformTimeProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A work performed in some event, for example a play performed in a TheaterEvent.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WorkPerformedProp")]
pub enum WorkPerformedProp {
Text(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "WorkPerformedProp")]
impl TryFrom<SchemaValue> for WorkPerformedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkPerformedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(WorkPerformedProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WorkPerformedProp")]
impl TryFrom<&SchemaValue> for WorkPerformedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkPerformedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(WorkPerformedProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The warranty promise(s) included in the offer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WarrantyPromiseProp")]
pub enum WarrantyPromiseProp {
Text(String),
WarrantyPromise(WarrantyPromise),
}
#[automatically_derived]
#[cfg(feature = "WarrantyPromiseProp")]
impl TryFrom<SchemaValue> for WarrantyPromiseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WarrantyPromiseProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WarrantyPromise::try_from(v.clone()) { return Ok(WarrantyPromiseProp::WarrantyPromise(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WarrantyPromiseProp")]
impl TryFrom<&SchemaValue> for WarrantyPromiseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WarrantyPromiseProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WarrantyPromise::try_from(v.clone()) { return Ok(WarrantyPromiseProp::WarrantyPromise(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The amount of money to pay in a single payment.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LoanPaymentAmountProp")]
pub enum LoanPaymentAmountProp {
MonetaryAmount(MonetaryAmount),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LoanPaymentAmountProp")]
impl TryFrom<SchemaValue> for LoanPaymentAmountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LoanPaymentAmountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(LoanPaymentAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LoanPaymentAmountProp")]
impl TryFrom<&SchemaValue> for LoanPaymentAmountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LoanPaymentAmountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(LoanPaymentAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A description of the workup, testing, and other preparations required before implanting this device.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PreOpProp")]
pub enum PreOpProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PreOpProp")]
impl TryFrom<SchemaValue> for PreOpProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PreOpProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PreOpProp")]
impl TryFrom<&SchemaValue> for PreOpProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PreOpProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date of the first registration of the vehicle with the respective public authorities.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DateVehicleFirstRegisteredProp")]
pub enum DateVehicleFirstRegisteredProp {
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DateVehicleFirstRegisteredProp")]
impl TryFrom<SchemaValue> for DateVehicleFirstRegisteredProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(DateVehicleFirstRegisteredProp::Date(v)),
SchemaValue::Text(v) => Ok(DateVehicleFirstRegisteredProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DateVehicleFirstRegisteredProp")]
impl TryFrom<&SchemaValue> for DateVehicleFirstRegisteredProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(DateVehicleFirstRegisteredProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(DateVehicleFirstRegisteredProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the department, unit and/or facility where the employee reports and/or in which the job is to be performed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EmploymentUnitProp")]
pub enum EmploymentUnitProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EmploymentUnitProp")]
impl TryFrom<SchemaValue> for EmploymentUnitProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmploymentUnitProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(EmploymentUnitProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EmploymentUnitProp")]
impl TryFrom<&SchemaValue> for EmploymentUnitProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmploymentUnitProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(EmploymentUnitProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The quantity of the goods included in the offer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AmountOfThisGoodProp")]
pub enum AmountOfThisGoodProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AmountOfThisGoodProp")]
impl TryFrom<SchemaValue> for AmountOfThisGoodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(AmountOfThisGoodProp::Number(v)),
SchemaValue::Text(v) => Ok(AmountOfThisGoodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AmountOfThisGoodProp")]
impl TryFrom<&SchemaValue> for AmountOfThisGoodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(AmountOfThisGoodProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(AmountOfThisGoodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// URL at which the app may be installed, if different from the URL of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InstallUrlProp")]
pub enum InstallUrlProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "InstallUrlProp")]
impl TryFrom<SchemaValue> for InstallUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InstallUrlProp::Text(v)),
SchemaValue::Url(v) => Ok(InstallUrlProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InstallUrlProp")]
impl TryFrom<&SchemaValue> for InstallUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InstallUrlProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(InstallUrlProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The purpose of a work in the context of education; for example, 'assignment', 'group work'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EducationalUseProp")]
pub enum EducationalUseProp {
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EducationalUseProp")]
impl TryFrom<SchemaValue> for EducationalUseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalUseProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(EducationalUseProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EducationalUseProp")]
impl TryFrom<&SchemaValue> for EducationalUseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalUseProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(EducationalUseProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The start time of the clip expressed as the number of seconds from the beginning of the work.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StartOffsetProp")]
pub enum StartOffsetProp {
HyperTocEntry(HyperTocEntry),
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "StartOffsetProp")]
impl TryFrom<SchemaValue> for StartOffsetProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(StartOffsetProp::Number(v)),
SchemaValue::Text(v) => Ok(StartOffsetProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HyperTocEntry::try_from(v.clone()) { return Ok(StartOffsetProp::HyperTocEntry(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StartOffsetProp")]
impl TryFrom<&SchemaValue> for StartOffsetProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(StartOffsetProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(StartOffsetProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HyperTocEntry::try_from(v.clone()) { return Ok(StartOffsetProp::HyperTocEntry(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// How the disease spreads, either as a route or vector, for example 'direct contact', 'Aedes aegypti', etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TransmissionMethodProp")]
pub enum TransmissionMethodProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TransmissionMethodProp")]
impl TryFrom<SchemaValue> for TransmissionMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TransmissionMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TransmissionMethodProp")]
impl TryFrom<&SchemaValue> for TransmissionMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TransmissionMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A human-readable summary of specific accessibility features or deficiencies, consistent with the other accessibility metadata but expressing subtleties such as "short descriptions are present but long descriptions will be needed for non-visual users" or "short descriptions are present and no long descriptions are needed."
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccessibilitySummaryProp")]
pub enum AccessibilitySummaryProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AccessibilitySummaryProp")]
impl TryFrom<SchemaValue> for AccessibilitySummaryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessibilitySummaryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccessibilitySummaryProp")]
impl TryFrom<&SchemaValue> for AccessibilitySummaryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessibilitySummaryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The duration of the item (movie, audio recording, event, etc.) in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DurationProp")]
pub enum DurationProp {
Duration(Duration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DurationProp")]
impl TryFrom<SchemaValue> for DurationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DurationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(DurationProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DurationProp")]
impl TryFrom<&SchemaValue> for DurationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DurationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(DurationProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A number associated with a role in an organization, for example, the number on an athlete's jersey.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberedPositionProp")]
pub enum NumberedPositionProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "NumberedPositionProp")]
impl TryFrom<SchemaValue> for NumberedPositionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberedPositionProp::Text(v)),
SchemaValue::Number(v) => Ok(NumberedPositionProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberedPositionProp")]
impl TryFrom<&SchemaValue> for NumberedPositionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberedPositionProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(NumberedPositionProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A description of any security clearance requirements of the job.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SecurityClearanceRequirementProp")]
pub enum SecurityClearanceRequirementProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SecurityClearanceRequirementProp")]
impl TryFrom<SchemaValue> for SecurityClearanceRequirementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SecurityClearanceRequirementProp::Url(v)),
SchemaValue::Text(v) => Ok(SecurityClearanceRequirementProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SecurityClearanceRequirementProp")]
impl TryFrom<&SchemaValue> for SecurityClearanceRequirementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(SecurityClearanceRequirementProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(SecurityClearanceRequirementProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Represents spatial relations in which two geometries (or the places they represent) touch: "they have at least one boundary point in common, but no interior points." (A symmetric relationship, as defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).)
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoTouchesProp")]
pub enum GeoTouchesProp {
GeospatialGeometry(GeospatialGeometry),
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GeoTouchesProp")]
impl TryFrom<SchemaValue> for GeoTouchesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoTouchesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoTouchesProp::GeospatialGeometry(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoTouchesProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoTouchesProp")]
impl TryFrom<&SchemaValue> for GeoTouchesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoTouchesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoTouchesProp::GeospatialGeometry(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoTouchesProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Qualification, candidature, degree, application that Thesis supports.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InSupportOfProp")]
pub enum InSupportOfProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InSupportOfProp")]
impl TryFrom<SchemaValue> for InSupportOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InSupportOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InSupportOfProp")]
impl TryFrom<&SchemaValue> for InSupportOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InSupportOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Another drug that is known to interact with this drug in a way that impacts the effect of this drug or causes a risk to the patient. Note: disease interactions are typically captured as contraindications.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InteractingDrugProp")]
pub enum InteractingDrugProp {
Drug(Drug),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InteractingDrugProp")]
impl TryFrom<SchemaValue> for InteractingDrugProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractingDrugProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Drug::try_from(v.clone()) { return Ok(InteractingDrugProp::Drug(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InteractingDrugProp")]
impl TryFrom<&SchemaValue> for InteractingDrugProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractingDrugProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Drug::try_from(v.clone()) { return Ok(InteractingDrugProp::Drug(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a specific [CivicStructure] or [LocalBusiness] associated with the SpecialAnnouncement. For example, a specific testing facility or business with special opening hours. For a larger geographic region like a quarantine of an entire region, use [spatialCoverage].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AnnouncementLocationProp")]
pub enum AnnouncementLocationProp {
LocalBusiness(LocalBusiness),
CivicStructure(CivicStructure),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AnnouncementLocationProp")]
impl TryFrom<SchemaValue> for AnnouncementLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AnnouncementLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = LocalBusiness::try_from(v.clone()) { return Ok(AnnouncementLocationProp::LocalBusiness(object)) }
if let Ok(object) = CivicStructure::try_from(v.clone()) { return Ok(AnnouncementLocationProp::CivicStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AnnouncementLocationProp")]
impl TryFrom<&SchemaValue> for AnnouncementLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AnnouncementLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = LocalBusiness::try_from(v.clone()) { return Ok(AnnouncementLocationProp::LocalBusiness(object)) }
if let Ok(object) = CivicStructure::try_from(v.clone()) { return Ok(AnnouncementLocationProp::CivicStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Label to match an [OfferShippingDetails] with a [ShippingRateSettings] (within the context of a [shippingSettingsLink] cross-reference).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ShippingLabelProp")]
pub enum ShippingLabelProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ShippingLabelProp")]
impl TryFrom<SchemaValue> for ShippingLabelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ShippingLabelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ShippingLabelProp")]
impl TryFrom<&SchemaValue> for ShippingLabelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ShippingLabelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecordedAtProp")]
pub enum RecordedAtProp {
Event(Event),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecordedAtProp")]
impl TryFrom<SchemaValue> for RecordedAtProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecordedAtProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(RecordedAtProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecordedAtProp")]
impl TryFrom<&SchemaValue> for RecordedAtProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecordedAtProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(RecordedAtProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The end of the availability of the product or service included in the offer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailabilityEndsProp")]
pub enum AvailabilityEndsProp {
Date(String),
Time(String),
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AvailabilityEndsProp")]
impl TryFrom<SchemaValue> for AvailabilityEndsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(AvailabilityEndsProp::Date(v)),
SchemaValue::Time(v) => Ok(AvailabilityEndsProp::Time(v)),
SchemaValue::DateTime(v) => Ok(AvailabilityEndsProp::DateTime(v)),
SchemaValue::Text(v) => Ok(AvailabilityEndsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailabilityEndsProp")]
impl TryFrom<&SchemaValue> for AvailabilityEndsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(AvailabilityEndsProp::Date(v.clone())),
SchemaValue::Time(v) => Ok(AvailabilityEndsProp::Time(v.clone())),
SchemaValue::DateTime(v) => Ok(AvailabilityEndsProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(AvailabilityEndsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The general opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
///
/// * Days are specified using the following two-letter combinations: ```Mo```, ```Tu```, ```We```, ```Th```, ```Fr```, ```Sa```, ```Su```.
/// * Times are specified using 24:00 format. For example, 3pm is specified as ```15:00```, 10am as ```10:00```.
/// * Here is an example: <code><time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time></code>.
/// * If a business is open 7 days a week, then it can be specified as <code><time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time></code>.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OpeningHoursProp")]
pub enum OpeningHoursProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OpeningHoursProp")]
impl TryFrom<SchemaValue> for OpeningHoursProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OpeningHoursProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OpeningHoursProp")]
impl TryFrom<&SchemaValue> for OpeningHoursProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OpeningHoursProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The expected length of time to complete the program if attending full-time.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TimeToCompleteProp")]
pub enum TimeToCompleteProp {
Duration(Duration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TimeToCompleteProp")]
impl TryFrom<SchemaValue> for TimeToCompleteProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TimeToCompleteProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(TimeToCompleteProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TimeToCompleteProp")]
impl TryFrom<&SchemaValue> for TimeToCompleteProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TimeToCompleteProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(TimeToCompleteProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Statistical information about the spread of a disease, either as [WebContent], or
/// described directly as a [Dataset], or the specific [Observation]s in the dataset. When a [WebContent] URL is
/// provided, the page indicated might also contain more such markup.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DiseaseSpreadStatisticsProp")]
pub enum DiseaseSpreadStatisticsProp {
Observation(Observation),
WebContent(WebContent),
Text(String),
Dataset(Dataset),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "DiseaseSpreadStatisticsProp")]
impl TryFrom<SchemaValue> for DiseaseSpreadStatisticsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiseaseSpreadStatisticsProp::Text(v)),
SchemaValue::Url(v) => Ok(DiseaseSpreadStatisticsProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Observation::try_from(v.clone()) { return Ok(DiseaseSpreadStatisticsProp::Observation(object)) }
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(DiseaseSpreadStatisticsProp::WebContent(object)) }
if let Ok(object) = Dataset::try_from(v.clone()) { return Ok(DiseaseSpreadStatisticsProp::Dataset(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DiseaseSpreadStatisticsProp")]
impl TryFrom<&SchemaValue> for DiseaseSpreadStatisticsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiseaseSpreadStatisticsProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(DiseaseSpreadStatisticsProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Observation::try_from(v.clone()) { return Ok(DiseaseSpreadStatisticsProp::Observation(object)) }
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(DiseaseSpreadStatisticsProp::WebContent(object)) }
if let Ok(object) = Dataset::try_from(v.clone()) { return Ok(DiseaseSpreadStatisticsProp::Dataset(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The [observationAbout] property identifies an entity, often a [Place], associated with an [Observation].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ObservationAboutProp")]
pub enum ObservationAboutProp {
Text(String),
Thing(Thing),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "ObservationAboutProp")]
impl TryFrom<SchemaValue> for ObservationAboutProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ObservationAboutProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ObservationAboutProp::Thing(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ObservationAboutProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ObservationAboutProp")]
impl TryFrom<&SchemaValue> for ObservationAboutProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ObservationAboutProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ObservationAboutProp::Thing(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ObservationAboutProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Description of the absorption and elimination of drugs, including their concentration (pharmacokinetics, pK) and biological effects (pharmacodynamics, pD).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ClincalPharmacologyProp")]
pub enum ClincalPharmacologyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ClincalPharmacologyProp")]
impl TryFrom<SchemaValue> for ClincalPharmacologyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ClincalPharmacologyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ClincalPharmacologyProp")]
impl TryFrom<&SchemaValue> for ClincalPharmacologyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ClincalPharmacologyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a BioChemEntity that is (in some sense) a part of this BioChemEntity.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsPartOfBioChemEntityProp")]
pub enum IsPartOfBioChemEntityProp {
BioChemEntity(BioChemEntity),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IsPartOfBioChemEntityProp")]
impl TryFrom<SchemaValue> for IsPartOfBioChemEntityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsPartOfBioChemEntityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(IsPartOfBioChemEntityProp::BioChemEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsPartOfBioChemEntityProp")]
impl TryFrom<&SchemaValue> for IsPartOfBioChemEntityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsPartOfBioChemEntityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(IsPartOfBioChemEntityProp::BioChemEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The job title of the person (for example, Financial Manager).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "JobTitleProp")]
pub enum JobTitleProp {
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "JobTitleProp")]
impl TryFrom<SchemaValue> for JobTitleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobTitleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(JobTitleProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "JobTitleProp")]
impl TryFrom<&SchemaValue> for JobTitleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobTitleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(JobTitleProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Form of markup used. eg. [SSML](https://www.w3.org/TR/speech-synthesis11) or [IPA](https://www.wikidata.org/wiki/Property:P898).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SpeechToTextMarkupProp")]
pub enum SpeechToTextMarkupProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SpeechToTextMarkupProp")]
impl TryFrom<SchemaValue> for SpeechToTextMarkupProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpeechToTextMarkupProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SpeechToTextMarkupProp")]
impl TryFrom<&SchemaValue> for SpeechToTextMarkupProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpeechToTextMarkupProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Educational background needed for the position or Occupation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EducationRequirementsProp")]
pub enum EducationRequirementsProp {
Text(String),
EducationalOccupationalCredential(EducationalOccupationalCredential),
}
#[automatically_derived]
#[cfg(feature = "EducationRequirementsProp")]
impl TryFrom<SchemaValue> for EducationRequirementsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationRequirementsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(EducationRequirementsProp::EducationalOccupationalCredential(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EducationRequirementsProp")]
impl TryFrom<&SchemaValue> for EducationRequirementsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationRequirementsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(EducationRequirementsProp::EducationalOccupationalCredential(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// How often the dose is taken, e.g. 'daily'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FrequencyProp")]
pub enum FrequencyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FrequencyProp")]
impl TryFrom<SchemaValue> for FrequencyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FrequencyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FrequencyProp")]
impl TryFrom<&SchemaValue> for FrequencyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FrequencyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The person's spouse.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SpouseProp")]
pub enum SpouseProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "SpouseProp")]
impl TryFrom<SchemaValue> for SpouseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpouseProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SpouseProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SpouseProp")]
impl TryFrom<&SchemaValue> for SpouseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpouseProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SpouseProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Tracking url for the parcel delivery.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TrackingUrlProp")]
pub enum TrackingUrlProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "TrackingUrlProp")]
impl TryFrom<SchemaValue> for TrackingUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrackingUrlProp::Text(v)),
SchemaValue::Url(v) => Ok(TrackingUrlProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TrackingUrlProp")]
impl TryFrom<&SchemaValue> for TrackingUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrackingUrlProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(TrackingUrlProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A description of the employer, career opportunities and work environment for this position.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EmployerOverviewProp")]
pub enum EmployerOverviewProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EmployerOverviewProp")]
impl TryFrom<SchemaValue> for EmployerOverviewProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmployerOverviewProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EmployerOverviewProp")]
impl TryFrom<&SchemaValue> for EmployerOverviewProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmployerOverviewProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// One of the domain specialities to which this web page's content applies.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SpecialtyProp")]
pub enum SpecialtyProp {
Text(String),
Specialty(Specialty),
}
#[automatically_derived]
#[cfg(feature = "SpecialtyProp")]
impl TryFrom<SchemaValue> for SpecialtyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpecialtyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Specialty::try_from(v.clone()) { return Ok(SpecialtyProp::Specialty(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SpecialtyProp")]
impl TryFrom<&SchemaValue> for SpecialtyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpecialtyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Specialty::try_from(v.clone()) { return Ok(SpecialtyProp::Specialty(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The width of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WidthProp")]
pub enum WidthProp {
Distance(Distance),
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WidthProp")]
impl TryFrom<SchemaValue> for WidthProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WidthProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(WidthProp::Distance(object)) }
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(WidthProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WidthProp")]
impl TryFrom<&SchemaValue> for WidthProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WidthProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(WidthProp::Distance(object)) }
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(WidthProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the timezone for which the time(s) indicated in the [Schedule] are given. The value provided should be among those listed in the IANA Time Zone Database.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ScheduleTimezoneProp")]
pub enum ScheduleTimezoneProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ScheduleTimezoneProp")]
impl TryFrom<SchemaValue> for ScheduleTimezoneProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ScheduleTimezoneProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ScheduleTimezoneProp")]
impl TryFrom<&SchemaValue> for ScheduleTimezoneProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ScheduleTimezoneProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Identifier of the flight's arrival terminal.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArrivalTerminalProp")]
pub enum ArrivalTerminalProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArrivalTerminalProp")]
impl TryFrom<SchemaValue> for ArrivalTerminalProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalTerminalProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArrivalTerminalProp")]
impl TryFrom<&SchemaValue> for ArrivalTerminalProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalTerminalProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The hours during which this service or contact is available.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HoursAvailableProp")]
pub enum HoursAvailableProp {
Text(String),
OpeningHoursSpecification(OpeningHoursSpecification),
}
#[automatically_derived]
#[cfg(feature = "HoursAvailableProp")]
impl TryFrom<SchemaValue> for HoursAvailableProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HoursAvailableProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OpeningHoursSpecification::try_from(v.clone()) { return Ok(HoursAvailableProp::OpeningHoursSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HoursAvailableProp")]
impl TryFrom<&SchemaValue> for HoursAvailableProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HoursAvailableProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OpeningHoursSpecification::try_from(v.clone()) { return Ok(HoursAvailableProp::OpeningHoursSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The position of the steering wheel or similar device (mostly for cars).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SteeringPositionProp")]
pub enum SteeringPositionProp {
SteeringPositionValue(SteeringPositionValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SteeringPositionProp")]
impl TryFrom<SchemaValue> for SteeringPositionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SteeringPositionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SteeringPositionValue::try_from(v.clone()) { return Ok(SteeringPositionProp::SteeringPositionValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SteeringPositionProp")]
impl TryFrom<&SchemaValue> for SteeringPositionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SteeringPositionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SteeringPositionValue::try_from(v.clone()) { return Ok(SteeringPositionProp::SteeringPositionValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of composition (e.g. overture, sonata, symphony, etc.).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MusicCompositionFormProp")]
pub enum MusicCompositionFormProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MusicCompositionFormProp")]
impl TryFrom<SchemaValue> for MusicCompositionFormProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicCompositionFormProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MusicCompositionFormProp")]
impl TryFrom<&SchemaValue> for MusicCompositionFormProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicCompositionFormProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The locality in which the street address is, and which is in the region. For example, Mountain View.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AddressLocalityProp")]
pub enum AddressLocalityProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AddressLocalityProp")]
impl TryFrom<SchemaValue> for AddressLocalityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AddressLocalityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AddressLocalityProp")]
impl TryFrom<&SchemaValue> for AddressLocalityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AddressLocalityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An item within a data feed. Data feeds may have many elements.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DataFeedElementProp")]
pub enum DataFeedElementProp {
DataFeedItem(DataFeedItem),
Text(String),
Thing(Thing),
}
#[automatically_derived]
#[cfg(feature = "DataFeedElementProp")]
impl TryFrom<SchemaValue> for DataFeedElementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DataFeedElementProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataFeedItem::try_from(v.clone()) { return Ok(DataFeedElementProp::DataFeedItem(object)) }
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(DataFeedElementProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DataFeedElementProp")]
impl TryFrom<&SchemaValue> for DataFeedElementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DataFeedElementProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataFeedItem::try_from(v.clone()) { return Ok(DataFeedElementProp::DataFeedItem(object)) }
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(DataFeedElementProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A contact location for a person's place of work.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WorkLocationProp")]
pub enum WorkLocationProp {
Text(String),
ContactPoint(ContactPoint),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "WorkLocationProp")]
impl TryFrom<SchemaValue> for WorkLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(WorkLocationProp::ContactPoint(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(WorkLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WorkLocationProp")]
impl TryFrom<&SchemaValue> for WorkLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(WorkLocationProp::ContactPoint(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(WorkLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates when shipping to a particular [shippingDestination] is not available.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DoesNotShipProp")]
pub enum DoesNotShipProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "DoesNotShipProp")]
impl TryFrom<SchemaValue> for DoesNotShipProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DoesNotShipProp::Text(v)),
SchemaValue::Boolean(v) => Ok(DoesNotShipProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DoesNotShipProp")]
impl TryFrom<&SchemaValue> for DoesNotShipProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DoesNotShipProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(DoesNotShipProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Location in the body of the anatomical structure.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BodyLocationProp")]
pub enum BodyLocationProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BodyLocationProp")]
impl TryFrom<SchemaValue> for BodyLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BodyLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BodyLocationProp")]
impl TryFrom<&SchemaValue> for BodyLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BodyLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Permission(s) required to run the app (for example, a mobile app may require full internet access or may run only on wifi).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PermissionsProp")]
pub enum PermissionsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PermissionsProp")]
impl TryFrom<SchemaValue> for PermissionsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PermissionsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PermissionsProp")]
impl TryFrom<&SchemaValue> for PermissionsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PermissionsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// How the procedure is performed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HowPerformedProp")]
pub enum HowPerformedProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HowPerformedProp")]
impl TryFrom<SchemaValue> for HowPerformedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HowPerformedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HowPerformedProp")]
impl TryFrom<&SchemaValue> for HowPerformedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HowPerformedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the minimal number of months of experience required for a position.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MonthsOfExperienceProp")]
pub enum MonthsOfExperienceProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "MonthsOfExperienceProp")]
impl TryFrom<SchemaValue> for MonthsOfExperienceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MonthsOfExperienceProp::Text(v)),
SchemaValue::Number(v) => Ok(MonthsOfExperienceProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MonthsOfExperienceProp")]
impl TryFrom<&SchemaValue> for MonthsOfExperienceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MonthsOfExperienceProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(MonthsOfExperienceProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An image of the item. This can be a [URL] or a fully described [ImageObject].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ImageProp")]
pub enum ImageProp {
Url(String),
ImageObject(ImageObject),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ImageProp")]
impl TryFrom<SchemaValue> for ImageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ImageProp::Url(v)),
SchemaValue::Text(v) => Ok(ImageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(ImageProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ImageProp")]
impl TryFrom<&SchemaValue> for ImageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ImageProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(ImageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(ImageProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A circle is the circular region of a specified radius centered at a specified latitude and longitude. A circle is expressed as a pair followed by a radius in meters.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CircleProp")]
pub enum CircleProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CircleProp")]
impl TryFrom<SchemaValue> for CircleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CircleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CircleProp")]
impl TryFrom<&SchemaValue> for CircleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CircleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// This ordering relation for qualitative values indicates that the subject is not equal to the object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NonEqualProp")]
pub enum NonEqualProp {
Text(String),
QualitativeValue(QualitativeValue),
}
#[automatically_derived]
#[cfg(feature = "NonEqualProp")]
impl TryFrom<SchemaValue> for NonEqualProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NonEqualProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(NonEqualProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NonEqualProp")]
impl TryFrom<&SchemaValue> for NonEqualProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NonEqualProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(NonEqualProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A short summary of the specific claims reviewed in a ClaimReview.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ClaimReviewedProp")]
pub enum ClaimReviewedProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ClaimReviewedProp")]
impl TryFrom<SchemaValue> for ClaimReviewedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ClaimReviewedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ClaimReviewedProp")]
impl TryFrom<&SchemaValue> for ClaimReviewedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ClaimReviewedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The unique identifier for a flight including the airline IATA code. For example, if describing United flight 110, where the IATA code for United is 'UA', the flightNumber is 'UA110'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FlightNumberProp")]
pub enum FlightNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FlightNumberProp")]
impl TryFrom<SchemaValue> for FlightNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FlightNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FlightNumberProp")]
impl TryFrom<&SchemaValue> for FlightNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FlightNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sign or symptom of this condition. Signs are objective or physically observable manifestations of the medical condition while symptoms are the subjective experience of the medical condition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SignOrSymptomProp")]
pub enum SignOrSymptomProp {
Text(String),
MedicalSignOrSymptom(MedicalSignOrSymptom),
}
#[automatically_derived]
#[cfg(feature = "SignOrSymptomProp")]
impl TryFrom<SchemaValue> for SignOrSymptomProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SignOrSymptomProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalSignOrSymptom::try_from(v.clone()) { return Ok(SignOrSymptomProp::MedicalSignOrSymptom(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SignOrSymptomProp")]
impl TryFrom<&SchemaValue> for SignOrSymptomProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SignOrSymptomProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalSignOrSymptom::try_from(v.clone()) { return Ok(SignOrSymptomProp::MedicalSignOrSymptom(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The individual who adds color to inked drawings.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ColoristProp")]
pub enum ColoristProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ColoristProp")]
impl TryFrom<SchemaValue> for ColoristProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ColoristProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ColoristProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ColoristProp")]
impl TryFrom<&SchemaValue> for ColoristProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ColoristProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ColoristProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifies the minimum allowed range for number of characters in a literal value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValueMinLengthProp")]
pub enum ValueMinLengthProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "ValueMinLengthProp")]
impl TryFrom<SchemaValue> for ValueMinLengthProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValueMinLengthProp::Text(v)),
SchemaValue::Number(v) => Ok(ValueMinLengthProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValueMinLengthProp")]
impl TryFrom<&SchemaValue> for ValueMinLengthProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValueMinLengthProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(ValueMinLengthProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Date of first broadcast/publication.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DatePublishedProp")]
pub enum DatePublishedProp {
DateTime(String),
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "DatePublishedProp")]
impl TryFrom<SchemaValue> for DatePublishedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(DatePublishedProp::DateTime(v)),
SchemaValue::Text(v) => Ok(DatePublishedProp::Text(v)),
SchemaValue::Date(v) => Ok(DatePublishedProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DatePublishedProp")]
impl TryFrom<&SchemaValue> for DatePublishedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(DatePublishedProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(DatePublishedProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(DatePublishedProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of result. The review that resulted in the performing of the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ResultReviewProp")]
pub enum ResultReviewProp {
Text(String),
Review(Review),
}
#[automatically_derived]
#[cfg(feature = "ResultReviewProp")]
impl TryFrom<SchemaValue> for ResultReviewProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ResultReviewProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(ResultReviewProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ResultReviewProp")]
impl TryFrom<&SchemaValue> for ResultReviewProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ResultReviewProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(ResultReviewProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The capacity of the fuel tank or in the case of electric cars, the battery. If there are multiple components for storage, this should indicate the total of all storage of the same type.
///
/// Typical unit code(s): LTR for liters, GLL of US gallons, GLI for UK / imperial gallons, AMH for ampere-hours (for electrical vehicles).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FuelCapacityProp")]
pub enum FuelCapacityProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FuelCapacityProp")]
impl TryFrom<SchemaValue> for FuelCapacityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FuelCapacityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(FuelCapacityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FuelCapacityProp")]
impl TryFrom<&SchemaValue> for FuelCapacityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FuelCapacityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(FuelCapacityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An answer (possibly one of several, possibly incorrect) to a Question, e.g. on a Question/Answer site.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SuggestedAnswerProp")]
pub enum SuggestedAnswerProp {
Answer(Answer),
ItemList(ItemList),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SuggestedAnswerProp")]
impl TryFrom<SchemaValue> for SuggestedAnswerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuggestedAnswerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Answer::try_from(v.clone()) { return Ok(SuggestedAnswerProp::Answer(object)) }
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(SuggestedAnswerProp::ItemList(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SuggestedAnswerProp")]
impl TryFrom<&SchemaValue> for SuggestedAnswerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuggestedAnswerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Answer::try_from(v.clone()) { return Ok(SuggestedAnswerProp::Answer(object)) }
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(SuggestedAnswerProp::ItemList(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A medical therapy related to this anatomy.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RelatedTherapyProp")]
pub enum RelatedTherapyProp {
Text(String),
MedicalTherapy(MedicalTherapy),
}
#[automatically_derived]
#[cfg(feature = "RelatedTherapyProp")]
impl TryFrom<SchemaValue> for RelatedTherapyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedTherapyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(RelatedTherapyProp::MedicalTherapy(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RelatedTherapyProp")]
impl TryFrom<&SchemaValue> for RelatedTherapyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedTherapyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(RelatedTherapyProp::MedicalTherapy(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The place where the person was born.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BirthPlaceProp")]
pub enum BirthPlaceProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BirthPlaceProp")]
impl TryFrom<SchemaValue> for BirthPlaceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BirthPlaceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(BirthPlaceProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BirthPlaceProp")]
impl TryFrom<&SchemaValue> for BirthPlaceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BirthPlaceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(BirthPlaceProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The expected departure time.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DepartureTimeProp")]
pub enum DepartureTimeProp {
Time(String),
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DepartureTimeProp")]
impl TryFrom<SchemaValue> for DepartureTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Time(v) => Ok(DepartureTimeProp::Time(v)),
SchemaValue::DateTime(v) => Ok(DepartureTimeProp::DateTime(v)),
SchemaValue::Text(v) => Ok(DepartureTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DepartureTimeProp")]
impl TryFrom<&SchemaValue> for DepartureTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Time(v) => Ok(DepartureTimeProp::Time(v.clone())),
SchemaValue::DateTime(v) => Ok(DepartureTimeProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(DepartureTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Formularies covered by this plan.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncludesHealthPlanFormularyProp")]
pub enum IncludesHealthPlanFormularyProp {
HealthPlanFormulary(HealthPlanFormulary),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IncludesHealthPlanFormularyProp")]
impl TryFrom<SchemaValue> for IncludesHealthPlanFormularyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludesHealthPlanFormularyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HealthPlanFormulary::try_from(v.clone()) { return Ok(IncludesHealthPlanFormularyProp::HealthPlanFormulary(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncludesHealthPlanFormularyProp")]
impl TryFrom<&SchemaValue> for IncludesHealthPlanFormularyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludesHealthPlanFormularyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HealthPlanFormulary::try_from(v.clone()) { return Ok(IncludesHealthPlanFormularyProp::HealthPlanFormulary(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The stop or station from which the bus arrives.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArrivalBusStopProp")]
pub enum ArrivalBusStopProp {
BusStation(BusStation),
BusStop(BusStop),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArrivalBusStopProp")]
impl TryFrom<SchemaValue> for ArrivalBusStopProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalBusStopProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BusStation::try_from(v.clone()) { return Ok(ArrivalBusStopProp::BusStation(object)) }
if let Ok(object) = BusStop::try_from(v.clone()) { return Ok(ArrivalBusStopProp::BusStop(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArrivalBusStopProp")]
impl TryFrom<&SchemaValue> for ArrivalBusStopProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalBusStopProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BusStation::try_from(v.clone()) { return Ok(ArrivalBusStopProp::BusStation(object)) }
if let Ok(object) = BusStop::try_from(v.clone()) { return Ok(ArrivalBusStopProp::BusStop(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// numc19mechventpats - HOSPITALIZED and VENTILATED: Patients hospitalized in an NHSN inpatient care location who have suspected or confirmed COVID-19 and are on a mechanical ventilator.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumC19MechVentPatsProp")]
pub enum CvdNumC19MechVentPatsProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19MechVentPatsProp")]
impl TryFrom<SchemaValue> for CvdNumC19MechVentPatsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumC19MechVentPatsProp::Number(v)),
SchemaValue::Text(v) => Ok(CvdNumC19MechVentPatsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19MechVentPatsProp")]
impl TryFrom<&SchemaValue> for CvdNumC19MechVentPatsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumC19MechVentPatsProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(CvdNumC19MechVentPatsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An aspect of medical practice that is considered on the page, such as 'diagnosis', 'treatment', 'causes', 'prognosis', 'etiology', 'epidemiology', etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AspectProp")]
pub enum AspectProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AspectProp")]
impl TryFrom<SchemaValue> for AspectProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AspectProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AspectProp")]
impl TryFrom<&SchemaValue> for AspectProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AspectProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// One or more alternative conditions considered in the differential diagnosis process as output of a diagnosis process.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DiagnosisProp")]
pub enum DiagnosisProp {
MedicalCondition(MedicalCondition),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DiagnosisProp")]
impl TryFrom<SchemaValue> for DiagnosisProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiagnosisProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCondition::try_from(v.clone()) { return Ok(DiagnosisProp::MedicalCondition(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DiagnosisProp")]
impl TryFrom<&SchemaValue> for DiagnosisProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiagnosisProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCondition::try_from(v.clone()) { return Ok(DiagnosisProp::MedicalCondition(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of return fees for purchased products (for any return reason).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReturnFeesProp")]
pub enum ReturnFeesProp {
Text(String),
ReturnFeesEnumeration(ReturnFeesEnumeration),
}
#[automatically_derived]
#[cfg(feature = "ReturnFeesProp")]
impl TryFrom<SchemaValue> for ReturnFeesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnFeesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnFeesEnumeration::try_from(v.clone()) { return Ok(ReturnFeesProp::ReturnFeesEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReturnFeesProp")]
impl TryFrom<&SchemaValue> for ReturnFeesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnFeesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnFeesEnumeration::try_from(v.clone()) { return Ok(ReturnFeesProp::ReturnFeesEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Family name. In the U.S., the last name of a Person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FamilyNameProp")]
pub enum FamilyNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FamilyNameProp")]
impl TryFrom<SchemaValue> for FamilyNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FamilyNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FamilyNameProp")]
impl TryFrom<&SchemaValue> for FamilyNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FamilyNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Destination(s) ( [Place] ) that make up a trip. For a trip where destination order is important use [ItemList] to specify that order (see examples).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItineraryProp")]
pub enum ItineraryProp {
Text(String),
ItemList(ItemList),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "ItineraryProp")]
impl TryFrom<SchemaValue> for ItineraryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItineraryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(ItineraryProp::ItemList(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ItineraryProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItineraryProp")]
impl TryFrom<&SchemaValue> for ItineraryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItineraryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(ItineraryProp::ItemList(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ItineraryProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of location. The entertainment business where the action occurred.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EntertainmentBusinessProp")]
pub enum EntertainmentBusinessProp {
EntertainmentBusiness(EntertainmentBusiness),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EntertainmentBusinessProp")]
impl TryFrom<SchemaValue> for EntertainmentBusinessProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EntertainmentBusinessProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EntertainmentBusiness::try_from(v.clone()) { return Ok(EntertainmentBusinessProp::EntertainmentBusiness(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EntertainmentBusinessProp")]
impl TryFrom<&SchemaValue> for EntertainmentBusinessProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EntertainmentBusinessProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EntertainmentBusiness::try_from(v.clone()) { return Ok(EntertainmentBusinessProp::EntertainmentBusiness(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event. Use [businessFunction] to indicate the kind of transaction offered, i.e. sell, lease, etc. This property can also be used to describe a [Demand]. While this property is listed as expected on a number of common types, it can be used in others. In that case, using a second type, such as Product or a subtype of Product, can clarify the nature of the offer.
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OffersProp")]
pub enum OffersProp {
Offer(Offer),
Text(String),
Demand(Demand),
}
#[automatically_derived]
#[cfg(feature = "OffersProp")]
impl TryFrom<SchemaValue> for OffersProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OffersProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Offer::try_from(v.clone()) { return Ok(OffersProp::Offer(object)) }
if let Ok(object) = Demand::try_from(v.clone()) { return Ok(OffersProp::Demand(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OffersProp")]
impl TryFrom<&SchemaValue> for OffersProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OffersProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Offer::try_from(v.clone()) { return Ok(OffersProp::Offer(object)) }
if let Ok(object) = Demand::try_from(v.clone()) { return Ok(OffersProp::Demand(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A defined range of postal codes indicated by a common textual prefix. Used for non-numeric systems such as UK.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PostalCodePrefixProp")]
pub enum PostalCodePrefixProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PostalCodePrefixProp")]
impl TryFrom<SchemaValue> for PostalCodePrefixProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostalCodePrefixProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PostalCodePrefixProp")]
impl TryFrom<&SchemaValue> for PostalCodePrefixProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostalCodePrefixProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The quantity that results by performing instructions. For example, a paper airplane, 10 personalized candles.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "YieldTypeProp")]
pub enum YieldTypeProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "YieldTypeProp")]
impl TryFrom<SchemaValue> for YieldTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(YieldTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(YieldTypeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "YieldTypeProp")]
impl TryFrom<&SchemaValue> for YieldTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(YieldTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(YieldTypeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Review of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReviewsProp")]
pub enum ReviewsProp {
Text(String),
Review(Review),
}
#[automatically_derived]
#[cfg(feature = "ReviewsProp")]
impl TryFrom<SchemaValue> for ReviewsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(ReviewsProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReviewsProp")]
impl TryFrom<&SchemaValue> for ReviewsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(ReviewsProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Actual bytes of the media object, for example the image file or video file.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContentUrlProp")]
pub enum ContentUrlProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ContentUrlProp")]
impl TryFrom<SchemaValue> for ContentUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ContentUrlProp::Url(v)),
SchemaValue::Text(v) => Ok(ContentUrlProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContentUrlProp")]
impl TryFrom<&SchemaValue> for ContentUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ContentUrlProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(ContentUrlProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The location (e.g. civic structure, local business, etc.) where a person can go to access the service.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServiceLocationProp")]
pub enum ServiceLocationProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ServiceLocationProp")]
impl TryFrom<SchemaValue> for ServiceLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ServiceLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServiceLocationProp")]
impl TryFrom<&SchemaValue> for ServiceLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ServiceLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The blood vessel that carries blood from the heart to the muscle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BloodSupplyProp")]
pub enum BloodSupplyProp {
Vessel(Vessel),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BloodSupplyProp")]
impl TryFrom<SchemaValue> for BloodSupplyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BloodSupplyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Vessel::try_from(v.clone()) { return Ok(BloodSupplyProp::Vessel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BloodSupplyProp")]
impl TryFrom<&SchemaValue> for BloodSupplyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BloodSupplyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Vessel::try_from(v.clone()) { return Ok(BloodSupplyProp::Vessel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of object. The person or organization being followed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FolloweeProp")]
pub enum FolloweeProp {
Text(String),
Person(Person),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "FolloweeProp")]
impl TryFrom<SchemaValue> for FolloweeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FolloweeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FolloweeProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(FolloweeProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FolloweeProp")]
impl TryFrom<&SchemaValue> for FolloweeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FolloweeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FolloweeProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(FolloweeProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Type of employment (e.g. full-time, part-time, contract, temporary, seasonal, internship).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EmploymentTypeProp")]
pub enum EmploymentTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EmploymentTypeProp")]
impl TryFrom<SchemaValue> for EmploymentTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmploymentTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EmploymentTypeProp")]
impl TryFrom<&SchemaValue> for EmploymentTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmploymentTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether a [JobPosting] will accept experience (as indicated by [OccupationalExperienceRequirements]) in place of its formal educational qualifications (as indicated by [educationRequirements]). If true, indicates that satisfying one of these requirements is sufficient.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExperienceInPlaceOfEducationProp")]
pub enum ExperienceInPlaceOfEducationProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "ExperienceInPlaceOfEducationProp")]
impl TryFrom<SchemaValue> for ExperienceInPlaceOfEducationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExperienceInPlaceOfEducationProp::Text(v)),
SchemaValue::Boolean(v) => Ok(ExperienceInPlaceOfEducationProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExperienceInPlaceOfEducationProp")]
impl TryFrom<&SchemaValue> for ExperienceInPlaceOfEducationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExperienceInPlaceOfEducationProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(ExperienceInPlaceOfEducationProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The airport where the flight originates.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DepartureAirportProp")]
pub enum DepartureAirportProp {
Text(String),
Airport(Airport),
}
#[automatically_derived]
#[cfg(feature = "DepartureAirportProp")]
impl TryFrom<SchemaValue> for DepartureAirportProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureAirportProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Airport::try_from(v.clone()) { return Ok(DepartureAirportProp::Airport(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DepartureAirportProp")]
impl TryFrom<&SchemaValue> for DepartureAirportProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureAirportProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Airport::try_from(v.clone()) { return Ok(DepartureAirportProp::Airport(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Target Operating System / Product to which the code applies. If applies to several versions, just the product name can be used.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TargetProductProp")]
pub enum TargetProductProp {
SoftwareApplication(SoftwareApplication),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TargetProductProp")]
impl TryFrom<SchemaValue> for TargetProductProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetProductProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SoftwareApplication::try_from(v.clone()) { return Ok(TargetProductProp::SoftwareApplication(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TargetProductProp")]
impl TryFrom<&SchemaValue> for TargetProductProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetProductProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SoftwareApplication::try_from(v.clone()) { return Ok(TargetProductProp::SoftwareApplication(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Changes in the normal mechanical, physical, and biochemical functions that are associated with this activity or condition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PathophysiologyProp")]
pub enum PathophysiologyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PathophysiologyProp")]
impl TryFrom<SchemaValue> for PathophysiologyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PathophysiologyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PathophysiologyProp")]
impl TryFrom<&SchemaValue> for PathophysiologyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PathophysiologyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of object. The object that is being replaced.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReplaceeProp")]
pub enum ReplaceeProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReplaceeProp")]
impl TryFrom<SchemaValue> for ReplaceeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReplaceeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ReplaceeProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReplaceeProp")]
impl TryFrom<&SchemaValue> for ReplaceeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReplaceeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ReplaceeProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of object. The collection target of the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TargetCollectionProp")]
pub enum TargetCollectionProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TargetCollectionProp")]
impl TryFrom<SchemaValue> for TargetCollectionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetCollectionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(TargetCollectionProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TargetCollectionProp")]
impl TryFrom<&SchemaValue> for TargetCollectionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetCollectionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(TargetCollectionProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date and time of obtaining the product.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OwnedFromProp")]
pub enum OwnedFromProp {
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OwnedFromProp")]
impl TryFrom<SchemaValue> for OwnedFromProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(OwnedFromProp::DateTime(v)),
SchemaValue::Text(v) => Ok(OwnedFromProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OwnedFromProp")]
impl TryFrom<&SchemaValue> for OwnedFromProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(OwnedFromProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(OwnedFromProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A URL template (RFC 6570) for a checkout page for an offer. This approach allows merchants to specify a URL for online checkout of the offered product, by interpolating parameters such as the logged in user ID, product ID, quantity, discount code etc. Parameter naming and standardization are not specified here.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CheckoutPageURLTemplateProp")]
pub enum CheckoutPageURLTemplateProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CheckoutPageURLTemplateProp")]
impl TryFrom<SchemaValue> for CheckoutPageURLTemplateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CheckoutPageURLTemplateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CheckoutPageURLTemplateProp")]
impl TryFrom<&SchemaValue> for CheckoutPageURLTemplateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CheckoutPageURLTemplateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A parent of this person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ParentProp")]
pub enum ParentProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "ParentProp")]
impl TryFrom<SchemaValue> for ParentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ParentProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ParentProp")]
impl TryFrom<&SchemaValue> for ParentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ParentProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EventStatusProp")]
pub enum EventStatusProp {
Text(String),
EventStatusType(EventStatusType),
}
#[automatically_derived]
#[cfg(feature = "EventStatusProp")]
impl TryFrom<SchemaValue> for EventStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EventStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EventStatusType::try_from(v.clone()) { return Ok(EventStatusProp::EventStatusType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EventStatusProp")]
impl TryFrom<&SchemaValue> for EventStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EventStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EventStatusType::try_from(v.clone()) { return Ok(EventStatusProp::EventStatusType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The elevation of a location ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)). Values may be of the form 'NUMBER UNIT\_OF\_MEASUREMENT' (e.g., '1,000 m', '3,200 ft') while numbers alone should be assumed to be a value in meters.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ElevationProp")]
pub enum ElevationProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ElevationProp")]
impl TryFrom<SchemaValue> for ElevationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(ElevationProp::Number(v)),
SchemaValue::Text(v) => Ok(ElevationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ElevationProp")]
impl TryFrom<&SchemaValue> for ElevationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(ElevationProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(ElevationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A URL pointing to a player for a specific video. In general, this is the information in the ```src``` element of an ```embed``` tag and should not be the same as the content of the ```loc``` tag.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EmbedUrlProp")]
pub enum EmbedUrlProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "EmbedUrlProp")]
impl TryFrom<SchemaValue> for EmbedUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmbedUrlProp::Text(v)),
SchemaValue::Url(v) => Ok(EmbedUrlProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EmbedUrlProp")]
impl TryFrom<&SchemaValue> for EmbedUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmbedUrlProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(EmbedUrlProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A statement of knowledge, skill, ability, task or any other assertion expressing a competency that is desired or required to fulfill this role or to work in this occupation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SkillsProp")]
pub enum SkillsProp {
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SkillsProp")]
impl TryFrom<SchemaValue> for SkillsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SkillsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(SkillsProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SkillsProp")]
impl TryFrom<&SchemaValue> for SkillsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SkillsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(SkillsProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a page or other link involved in archival of a [CreativeWork]. In the case of [MediaReview], the items in a [MediaReviewItem] may often become inaccessible, but be archived by archival, journalistic, activist, or law enforcement organizations. In such cases, the referenced page may not directly publish the content.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArchivedAtProp")]
pub enum ArchivedAtProp {
WebPage(WebPage),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArchivedAtProp")]
impl TryFrom<SchemaValue> for ArchivedAtProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ArchivedAtProp::Url(v)),
SchemaValue::Text(v) => Ok(ArchivedAtProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebPage::try_from(v.clone()) { return Ok(ArchivedAtProp::WebPage(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArchivedAtProp")]
impl TryFrom<&SchemaValue> for ArchivedAtProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ArchivedAtProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(ArchivedAtProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebPage::try_from(v.clone()) { return Ok(ArchivedAtProp::WebPage(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of recipient. The recipient copied on a message.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CcRecipientProp")]
pub enum CcRecipientProp {
Person(Person),
Organization(Organization),
Text(String),
ContactPoint(ContactPoint),
}
#[automatically_derived]
#[cfg(feature = "CcRecipientProp")]
impl TryFrom<SchemaValue> for CcRecipientProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CcRecipientProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CcRecipientProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CcRecipientProp::Organization(object)) }
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(CcRecipientProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CcRecipientProp")]
impl TryFrom<&SchemaValue> for CcRecipientProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CcRecipientProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CcRecipientProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CcRecipientProp::Organization(object)) }
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(CcRecipientProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date the item, e.g. vehicle, was purchased by the current owner.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PurchaseDateProp")]
pub enum PurchaseDateProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "PurchaseDateProp")]
impl TryFrom<SchemaValue> for PurchaseDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PurchaseDateProp::Text(v)),
SchemaValue::Date(v) => Ok(PurchaseDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PurchaseDateProp")]
impl TryFrom<&SchemaValue> for PurchaseDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PurchaseDateProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(PurchaseDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The order is being paid as part of the referenced Invoice.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PartOfInvoiceProp")]
pub enum PartOfInvoiceProp {
Text(String),
Invoice(Invoice),
}
#[automatically_derived]
#[cfg(feature = "PartOfInvoiceProp")]
impl TryFrom<SchemaValue> for PartOfInvoiceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfInvoiceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Invoice::try_from(v.clone()) { return Ok(PartOfInvoiceProp::Invoice(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PartOfInvoiceProp")]
impl TryFrom<&SchemaValue> for PartOfInvoiceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfInvoiceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Invoice::try_from(v.clone()) { return Ok(PartOfInvoiceProp::Invoice(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Date on which the content on this web page was last reviewed for accuracy and/or completeness.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LastReviewedProp")]
pub enum LastReviewedProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "LastReviewedProp")]
impl TryFrom<SchemaValue> for LastReviewedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LastReviewedProp::Text(v)),
SchemaValue::Date(v) => Ok(LastReviewedProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LastReviewedProp")]
impl TryFrom<&SchemaValue> for LastReviewedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LastReviewedProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(LastReviewedProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Contact details for further information relevant to this job posting.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ApplicationContactProp")]
pub enum ApplicationContactProp {
Text(String),
ContactPoint(ContactPoint),
}
#[automatically_derived]
#[cfg(feature = "ApplicationContactProp")]
impl TryFrom<SchemaValue> for ApplicationContactProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationContactProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ApplicationContactProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ApplicationContactProp")]
impl TryFrom<&SchemaValue> for ApplicationContactProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationContactProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ApplicationContactProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of return method offered, specified from an enumeration.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReturnMethodProp")]
pub enum ReturnMethodProp {
ReturnMethodEnumeration(ReturnMethodEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReturnMethodProp")]
impl TryFrom<SchemaValue> for ReturnMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnMethodEnumeration::try_from(v.clone()) { return Ok(ReturnMethodProp::ReturnMethodEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReturnMethodProp")]
impl TryFrom<&SchemaValue> for ReturnMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnMethodEnumeration::try_from(v.clone()) { return Ok(ReturnMethodProp::ReturnMethodEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether pets are allowed to enter the accommodation or lodging business. More detailed information can be put in a text value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PetsAllowedProp")]
pub enum PetsAllowedProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "PetsAllowedProp")]
impl TryFrom<SchemaValue> for PetsAllowedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PetsAllowedProp::Text(v)),
SchemaValue::Boolean(v) => Ok(PetsAllowedProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PetsAllowedProp")]
impl TryFrom<&SchemaValue> for PetsAllowedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PetsAllowedProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(PetsAllowedProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A number that confirms the given order or payment has been received.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ConfirmationNumberProp")]
pub enum ConfirmationNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ConfirmationNumberProp")]
impl TryFrom<SchemaValue> for ConfirmationNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ConfirmationNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ConfirmationNumberProp")]
impl TryFrom<&SchemaValue> for ConfirmationNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ConfirmationNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The official name of the organization, e.g. the registered company name.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegalNameProp")]
pub enum LegalNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LegalNameProp")]
impl TryFrom<SchemaValue> for LegalNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegalNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegalNameProp")]
impl TryFrom<&SchemaValue> for LegalNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegalNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The opponent on this action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OpponentProp")]
pub enum OpponentProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OpponentProp")]
impl TryFrom<SchemaValue> for OpponentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OpponentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(OpponentProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OpponentProp")]
impl TryFrom<&SchemaValue> for OpponentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OpponentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(OpponentProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The "temporal" property can be used in cases where more specific properties
/// (e.g. [temporalCoverage], [dateCreated], [dateModified], [datePublished]) are not known to be appropriate.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TemporalProp")]
pub enum TemporalProp {
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TemporalProp")]
impl TryFrom<SchemaValue> for TemporalProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(TemporalProp::DateTime(v)),
SchemaValue::Text(v) => Ok(TemporalProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TemporalProp")]
impl TryFrom<&SchemaValue> for TemporalProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(TemporalProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(TemporalProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of object. The candidate subject of this action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CandidateProp")]
pub enum CandidateProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "CandidateProp")]
impl TryFrom<SchemaValue> for CandidateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CandidateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CandidateProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CandidateProp")]
impl TryFrom<&SchemaValue> for CandidateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CandidateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CandidateProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The release date of a product or product model. This can be used to distinguish the exact variant of a product.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReleaseDateProp")]
pub enum ReleaseDateProp {
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReleaseDateProp")]
impl TryFrom<SchemaValue> for ReleaseDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ReleaseDateProp::Date(v)),
SchemaValue::Text(v) => Ok(ReleaseDateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReleaseDateProp")]
impl TryFrom<&SchemaValue> for ReleaseDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ReleaseDateProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(ReleaseDateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The type of service required to have access to the channel (e.g. Standard or Premium).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BroadcastServiceTierProp")]
pub enum BroadcastServiceTierProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BroadcastServiceTierProp")]
impl TryFrom<SchemaValue> for BroadcastServiceTierProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastServiceTierProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BroadcastServiceTierProp")]
impl TryFrom<&SchemaValue> for BroadcastServiceTierProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastServiceTierProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A property-value pair representing an additional characteristic of the entity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.
///
/// Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. https://schema.org/width, https://schema.org/color, https://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AdditionalPropertyProp")]
pub enum AdditionalPropertyProp {
PropertyValue(PropertyValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AdditionalPropertyProp")]
impl TryFrom<SchemaValue> for AdditionalPropertyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdditionalPropertyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(AdditionalPropertyProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AdditionalPropertyProp")]
impl TryFrom<&SchemaValue> for AdditionalPropertyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdditionalPropertyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(AdditionalPropertyProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The version of the CreativeWork embodied by a specified resource.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VersionProp")]
pub enum VersionProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "VersionProp")]
impl TryFrom<SchemaValue> for VersionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VersionProp::Text(v)),
SchemaValue::Number(v) => Ok(VersionProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VersionProp")]
impl TryFrom<&SchemaValue> for VersionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VersionProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(VersionProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The type of boarding policy used by the airline (e.g. zone-based or group-based).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BoardingPolicyProp")]
pub enum BoardingPolicyProp {
BoardingPolicyType(BoardingPolicyType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BoardingPolicyProp")]
impl TryFrom<SchemaValue> for BoardingPolicyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BoardingPolicyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BoardingPolicyType::try_from(v.clone()) { return Ok(BoardingPolicyProp::BoardingPolicyType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BoardingPolicyProp")]
impl TryFrom<&SchemaValue> for BoardingPolicyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BoardingPolicyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BoardingPolicyType::try_from(v.clone()) { return Ok(BoardingPolicyProp::BoardingPolicyType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "KeywordsProp")]
pub enum KeywordsProp {
Text(String),
Url(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "KeywordsProp")]
impl TryFrom<SchemaValue> for KeywordsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(KeywordsProp::Text(v)),
SchemaValue::Url(v) => Ok(KeywordsProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(KeywordsProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "KeywordsProp")]
impl TryFrom<&SchemaValue> for KeywordsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(KeywordsProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(KeywordsProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(KeywordsProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The currency (coded using [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217)) used for the main salary information in this job posting or for this employee.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SalaryCurrencyProp")]
pub enum SalaryCurrencyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SalaryCurrencyProp")]
impl TryFrom<SchemaValue> for SalaryCurrencyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SalaryCurrencyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SalaryCurrencyProp")]
impl TryFrom<&SchemaValue> for SalaryCurrencyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SalaryCurrencyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The specific biochemical interaction through which this drug or supplement produces its pharmacological effect.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MechanismOfActionProp")]
pub enum MechanismOfActionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MechanismOfActionProp")]
impl TryFrom<SchemaValue> for MechanismOfActionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MechanismOfActionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MechanismOfActionProp")]
impl TryFrom<&SchemaValue> for MechanismOfActionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MechanismOfActionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Another gene which is a variation of this one.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlternativeOfProp")]
pub enum AlternativeOfProp {
Gene(Gene),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AlternativeOfProp")]
impl TryFrom<SchemaValue> for AlternativeOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlternativeOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Gene::try_from(v.clone()) { return Ok(AlternativeOfProp::Gene(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlternativeOfProp")]
impl TryFrom<&SchemaValue> for AlternativeOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlternativeOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Gene::try_from(v.clone()) { return Ok(AlternativeOfProp::Gene(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of credits or units awarded by a Course or required to complete an EducationalOccupationalProgram.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfCreditsProp")]
pub enum NumberOfCreditsProp {
StructuredValue(StructuredValue),
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "NumberOfCreditsProp")]
impl TryFrom<SchemaValue> for NumberOfCreditsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfCreditsProp::Text(v)),
SchemaValue::Integer(v) => Ok(NumberOfCreditsProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = StructuredValue::try_from(v.clone()) { return Ok(NumberOfCreditsProp::StructuredValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfCreditsProp")]
impl TryFrom<&SchemaValue> for NumberOfCreditsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfCreditsProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(NumberOfCreditsProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = StructuredValue::try_from(v.clone()) { return Ok(NumberOfCreditsProp::StructuredValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Maximal age of the child.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ChildMaxAgeProp")]
pub enum ChildMaxAgeProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "ChildMaxAgeProp")]
impl TryFrom<SchemaValue> for ChildMaxAgeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ChildMaxAgeProp::Text(v)),
SchemaValue::Number(v) => Ok(ChildMaxAgeProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ChildMaxAgeProp")]
impl TryFrom<&SchemaValue> for ChildMaxAgeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ChildMaxAgeProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(ChildMaxAgeProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Another BioChemEntity encoding by this one.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsEncodedByBioChemEntityProp")]
pub enum IsEncodedByBioChemEntityProp {
Text(String),
Gene(Gene),
}
#[automatically_derived]
#[cfg(feature = "IsEncodedByBioChemEntityProp")]
impl TryFrom<SchemaValue> for IsEncodedByBioChemEntityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsEncodedByBioChemEntityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Gene::try_from(v.clone()) { return Ok(IsEncodedByBioChemEntityProp::Gene(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsEncodedByBioChemEntityProp")]
impl TryFrom<&SchemaValue> for IsEncodedByBioChemEntityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsEncodedByBioChemEntityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Gene::try_from(v.clone()) { return Ok(IsEncodedByBioChemEntityProp::Gene(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of grams of sugar.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SugarContentProp")]
pub enum SugarContentProp {
Mass(Mass),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SugarContentProp")]
impl TryFrom<SchemaValue> for SugarContentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SugarContentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(SugarContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SugarContentProp")]
impl TryFrom<&SchemaValue> for SugarContentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SugarContentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(SugarContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether this image is representative of the content of the page.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RepresentativeOfPageProp")]
pub enum RepresentativeOfPageProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RepresentativeOfPageProp")]
impl TryFrom<SchemaValue> for RepresentativeOfPageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(RepresentativeOfPageProp::Boolean(v)),
SchemaValue::Text(v) => Ok(RepresentativeOfPageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RepresentativeOfPageProp")]
impl TryFrom<&SchemaValue> for RepresentativeOfPageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(RepresentativeOfPageProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(RepresentativeOfPageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of instrument. An object used (but not consumed) when performing instructions or a direction.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ToolProp")]
pub enum ToolProp {
Text(String),
HowToTool(HowToTool),
}
#[automatically_derived]
#[cfg(feature = "ToolProp")]
impl TryFrom<SchemaValue> for ToolProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ToolProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HowToTool::try_from(v.clone()) { return Ok(ToolProp::HowToTool(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ToolProp")]
impl TryFrom<&SchemaValue> for ToolProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ToolProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HowToTool::try_from(v.clone()) { return Ok(ToolProp::HowToTool(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The speed range of the vehicle. If the vehicle is powered by an engine, the upper limit of the speed range (indicated by [maxValue]) should be the maximum speed achievable under regular conditions.
///
/// Typical unit code(s): KMH for km/h, HM for mile per hour (0.447 04 m/s), KNT for knot
///
/// *Note 1: Use [minValue] and [maxValue] to indicate the range. Typically, the minimal value is zero.
/// * Note 2: There are many different ways of measuring the speed range. You can link to information about how the given value has been determined using the [valueReference] property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SpeedProp")]
pub enum SpeedProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SpeedProp")]
impl TryFrom<SchemaValue> for SpeedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpeedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(SpeedProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SpeedProp")]
impl TryFrom<&SchemaValue> for SpeedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpeedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(SpeedProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The Person's occupation. For past professions, use Role for expressing dates.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasOccupationProp")]
pub enum HasOccupationProp {
Text(String),
Occupation(Occupation),
}
#[automatically_derived]
#[cfg(feature = "HasOccupationProp")]
impl TryFrom<SchemaValue> for HasOccupationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasOccupationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Occupation::try_from(v.clone()) { return Ok(HasOccupationProp::Occupation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasOccupationProp")]
impl TryFrom<&SchemaValue> for HasOccupationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasOccupationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Occupation::try_from(v.clone()) { return Ok(HasOccupationProp::Occupation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The delivery method(s) to which the delivery charge or payment charge specification applies.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AppliesToDeliveryMethodProp")]
pub enum AppliesToDeliveryMethodProp {
Text(String),
DeliveryMethod(DeliveryMethod),
}
#[automatically_derived]
#[cfg(feature = "AppliesToDeliveryMethodProp")]
impl TryFrom<SchemaValue> for AppliesToDeliveryMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AppliesToDeliveryMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryMethod::try_from(v.clone()) { return Ok(AppliesToDeliveryMethodProp::DeliveryMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AppliesToDeliveryMethodProp")]
impl TryFrom<&SchemaValue> for AppliesToDeliveryMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AppliesToDeliveryMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryMethod::try_from(v.clone()) { return Ok(AppliesToDeliveryMethodProp::DeliveryMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The product identifier, such as ISBN. For example: ``` meta itemprop="productID" content="isbn:123-456-789" ```.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProductIDProp")]
pub enum ProductIDProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProductIDProp")]
impl TryFrom<SchemaValue> for ProductIDProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProductIDProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProductIDProp")]
impl TryFrom<&SchemaValue> for ProductIDProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProductIDProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Defines the number of times a recurring [Event] will take place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RepeatCountProp")]
pub enum RepeatCountProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RepeatCountProp")]
impl TryFrom<SchemaValue> for RepeatCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(RepeatCountProp::Integer(v)),
SchemaValue::Text(v) => Ok(RepeatCountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RepeatCountProp")]
impl TryFrom<&SchemaValue> for RepeatCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(RepeatCountProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(RepeatCountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The movie presented during this event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WorkPresentedProp")]
pub enum WorkPresentedProp {
Text(String),
Movie(Movie),
}
#[automatically_derived]
#[cfg(feature = "WorkPresentedProp")]
impl TryFrom<SchemaValue> for WorkPresentedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkPresentedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Movie::try_from(v.clone()) { return Ok(WorkPresentedProp::Movie(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WorkPresentedProp")]
impl TryFrom<&SchemaValue> for WorkPresentedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkPresentedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Movie::try_from(v.clone()) { return Ok(WorkPresentedProp::Movie(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Represents a relationship between two geometries (or the places they represent), relating a covering geometry to a covered geometry. "Every point of b is a point of (the interior or boundary of) a". As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoCoversProp")]
pub enum GeoCoversProp {
Text(String),
GeospatialGeometry(GeospatialGeometry),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "GeoCoversProp")]
impl TryFrom<SchemaValue> for GeoCoversProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoCoversProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoCoversProp::GeospatialGeometry(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoCoversProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoCoversProp")]
impl TryFrom<&SchemaValue> for GeoCoversProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoCoversProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoCoversProp::GeospatialGeometry(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoCoversProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The currency in which the monetary amount is expressed.
///
/// Use standard formats: [ISO 4217 currency format](http://en.wikipedia.org/wiki/ISO_4217), e.g. "USD"; [Ticker symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for cryptocurrencies, e.g. "BTC"; well known names for [Local Exchange Trading Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system) (LETS) and other currency types, e.g. "Ithaca HOUR".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CurrencyProp")]
pub enum CurrencyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CurrencyProp")]
impl TryFrom<SchemaValue> for CurrencyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CurrencyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CurrencyProp")]
impl TryFrom<&SchemaValue> for CurrencyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CurrencyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The branches that comprise the arterial structure.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArterialBranchProp")]
pub enum ArterialBranchProp {
AnatomicalStructure(AnatomicalStructure),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArterialBranchProp")]
impl TryFrom<SchemaValue> for ArterialBranchProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArterialBranchProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(ArterialBranchProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArterialBranchProp")]
impl TryFrom<&SchemaValue> for ArterialBranchProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArterialBranchProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(ArterialBranchProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the main image on the page.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PrimaryImageOfPageProp")]
pub enum PrimaryImageOfPageProp {
ImageObject(ImageObject),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PrimaryImageOfPageProp")]
impl TryFrom<SchemaValue> for PrimaryImageOfPageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrimaryImageOfPageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(PrimaryImageOfPageProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PrimaryImageOfPageProp")]
impl TryFrom<&SchemaValue> for PrimaryImageOfPageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrimaryImageOfPageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(PrimaryImageOfPageProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A photograph of this place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PhotoProp")]
pub enum PhotoProp {
ImageObject(ImageObject),
Text(String),
Photograph(Photograph),
}
#[automatically_derived]
#[cfg(feature = "PhotoProp")]
impl TryFrom<SchemaValue> for PhotoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PhotoProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(PhotoProp::ImageObject(object)) }
if let Ok(object) = Photograph::try_from(v.clone()) { return Ok(PhotoProp::Photograph(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PhotoProp")]
impl TryFrom<&SchemaValue> for PhotoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PhotoProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(PhotoProp::ImageObject(object)) }
if let Ok(object) = Photograph::try_from(v.clone()) { return Ok(PhotoProp::Photograph(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Networks covered by this plan.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncludesHealthPlanNetworkProp")]
pub enum IncludesHealthPlanNetworkProp {
HealthPlanNetwork(HealthPlanNetwork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IncludesHealthPlanNetworkProp")]
impl TryFrom<SchemaValue> for IncludesHealthPlanNetworkProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludesHealthPlanNetworkProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HealthPlanNetwork::try_from(v.clone()) { return Ok(IncludesHealthPlanNetworkProp::HealthPlanNetwork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncludesHealthPlanNetworkProp")]
impl TryFrom<&SchemaValue> for IncludesHealthPlanNetworkProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludesHealthPlanNetworkProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HealthPlanNetwork::try_from(v.clone()) { return Ok(IncludesHealthPlanNetworkProp::HealthPlanNetwork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The trailer of a movie or TV/radio series, season, episode, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TrailerProp")]
pub enum TrailerProp {
Text(String),
VideoObject(VideoObject),
}
#[automatically_derived]
#[cfg(feature = "TrailerProp")]
impl TryFrom<SchemaValue> for TrailerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrailerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = VideoObject::try_from(v.clone()) { return Ok(TrailerProp::VideoObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TrailerProp")]
impl TryFrom<&SchemaValue> for TrailerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrailerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = VideoObject::try_from(v.clone()) { return Ok(TrailerProp::VideoObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// For an [Organization] (e.g. [NewsMediaOrganization]), a statement describing (in news media, the newsroom’s) disclosure and correction policy for errors.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CorrectionsPolicyProp")]
pub enum CorrectionsPolicyProp {
CreativeWork(CreativeWork),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CorrectionsPolicyProp")]
impl TryFrom<SchemaValue> for CorrectionsPolicyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CorrectionsPolicyProp::Url(v)),
SchemaValue::Text(v) => Ok(CorrectionsPolicyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(CorrectionsPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CorrectionsPolicyProp")]
impl TryFrom<&SchemaValue> for CorrectionsPolicyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CorrectionsPolicyProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(CorrectionsPolicyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(CorrectionsPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An item is an object within the game world that can be collected by a player or, occasionally, a non-player character.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GameItemProp")]
pub enum GameItemProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GameItemProp")]
impl TryFrom<SchemaValue> for GameItemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameItemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(GameItemProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GameItemProp")]
impl TryFrom<&SchemaValue> for GameItemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameItemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(GameItemProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The current price of a currency.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CurrentExchangeRateProp")]
pub enum CurrentExchangeRateProp {
UnitPriceSpecification(UnitPriceSpecification),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CurrentExchangeRateProp")]
impl TryFrom<SchemaValue> for CurrentExchangeRateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CurrentExchangeRateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = UnitPriceSpecification::try_from(v.clone()) { return Ok(CurrentExchangeRateProp::UnitPriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CurrentExchangeRateProp")]
impl TryFrom<&SchemaValue> for CurrentExchangeRateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CurrentExchangeRateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = UnitPriceSpecification::try_from(v.clone()) { return Ok(CurrentExchangeRateProp::UnitPriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A NewsArticle associated with the Media Object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AssociatedArticleProp")]
pub enum AssociatedArticleProp {
NewsArticle(NewsArticle),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AssociatedArticleProp")]
impl TryFrom<SchemaValue> for AssociatedArticleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedArticleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = NewsArticle::try_from(v.clone()) { return Ok(AssociatedArticleProp::NewsArticle(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AssociatedArticleProp")]
impl TryFrom<&SchemaValue> for AssociatedArticleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedArticleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = NewsArticle::try_from(v.clone()) { return Ok(AssociatedArticleProp::NewsArticle(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Information about disease prevention.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DiseasePreventionInfoProp")]
pub enum DiseasePreventionInfoProp {
Text(String),
WebContent(WebContent),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "DiseasePreventionInfoProp")]
impl TryFrom<SchemaValue> for DiseasePreventionInfoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiseasePreventionInfoProp::Text(v)),
SchemaValue::Url(v) => Ok(DiseasePreventionInfoProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(DiseasePreventionInfoProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DiseasePreventionInfoProp")]
impl TryFrom<&SchemaValue> for DiseasePreventionInfoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiseasePreventionInfoProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(DiseasePreventionInfoProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(DiseasePreventionInfoProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The interest rate, charged or paid, applicable to the financial product. Note: This is different from the calculated annualPercentageRate.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InterestRateProp")]
pub enum InterestRateProp {
QuantitativeValue(QuantitativeValue),
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InterestRateProp")]
impl TryFrom<SchemaValue> for InterestRateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(InterestRateProp::Number(v)),
SchemaValue::Text(v) => Ok(InterestRateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(InterestRateProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InterestRateProp")]
impl TryFrom<&SchemaValue> for InterestRateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(InterestRateProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(InterestRateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(InterestRateProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The text of the UserComment.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CommentTextProp")]
pub enum CommentTextProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CommentTextProp")]
impl TryFrom<SchemaValue> for CommentTextProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CommentTextProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CommentTextProp")]
impl TryFrom<&SchemaValue> for CommentTextProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CommentTextProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates some accommodation that this floor plan describes.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsPlanForApartmentProp")]
pub enum IsPlanForApartmentProp {
Text(String),
Accommodation(Accommodation),
}
#[automatically_derived]
#[cfg(feature = "IsPlanForApartmentProp")]
impl TryFrom<SchemaValue> for IsPlanForApartmentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsPlanForApartmentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Accommodation::try_from(v.clone()) { return Ok(IsPlanForApartmentProp::Accommodation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsPlanForApartmentProp")]
impl TryFrom<&SchemaValue> for IsPlanForApartmentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsPlanForApartmentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Accommodation::try_from(v.clone()) { return Ok(IsPlanForApartmentProp::Accommodation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The media network(s) whose content is broadcast on this station.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BroadcastAffiliateOfProp")]
pub enum BroadcastAffiliateOfProp {
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "BroadcastAffiliateOfProp")]
impl TryFrom<SchemaValue> for BroadcastAffiliateOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastAffiliateOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BroadcastAffiliateOfProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BroadcastAffiliateOfProp")]
impl TryFrom<&SchemaValue> for BroadcastAffiliateOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastAffiliateOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BroadcastAffiliateOfProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A predefined value from OfferItemCondition specifying the condition of the product or service, or the products or services included in the offer. Also used for product return policies to specify the condition of products accepted for returns.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItemConditionProp")]
pub enum ItemConditionProp {
OfferItemCondition(OfferItemCondition),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ItemConditionProp")]
impl TryFrom<SchemaValue> for ItemConditionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemConditionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OfferItemCondition::try_from(v.clone()) { return Ok(ItemConditionProp::OfferItemCondition(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItemConditionProp")]
impl TryFrom<&SchemaValue> for ItemConditionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemConditionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OfferItemCondition::try_from(v.clone()) { return Ok(ItemConditionProp::OfferItemCondition(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Range of acceptable values for a typical patient, when applicable.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NormalRangeProp")]
pub enum NormalRangeProp {
MedicalEnumeration(MedicalEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NormalRangeProp")]
impl TryFrom<SchemaValue> for NormalRangeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NormalRangeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEnumeration::try_from(v.clone()) { return Ok(NormalRangeProp::MedicalEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NormalRangeProp")]
impl TryFrom<&SchemaValue> for NormalRangeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NormalRangeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEnumeration::try_from(v.clone()) { return Ok(NormalRangeProp::MedicalEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SuperEventProp")]
pub enum SuperEventProp {
Event(Event),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SuperEventProp")]
impl TryFrom<SchemaValue> for SuperEventProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuperEventProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(SuperEventProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SuperEventProp")]
impl TryFrom<&SchemaValue> for SuperEventProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuperEventProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(SuperEventProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The latitude of a location. For example ```37.42242``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LatitudeProp")]
pub enum LatitudeProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LatitudeProp")]
impl TryFrom<SchemaValue> for LatitudeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(LatitudeProp::Number(v)),
SchemaValue::Text(v) => Ok(LatitudeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LatitudeProp")]
impl TryFrom<&SchemaValue> for LatitudeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(LatitudeProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(LatitudeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Gender of something, typically a [Person], but possibly also fictional characters, animals, etc. While https://schema.org/Male and https://schema.org/Female may be used, text strings are also acceptable for people who do not identify as a binary gender. The [gender] property can also be used in an extended sense to cover e.g. the gender of sports teams. As with the gender of individuals, we do not try to enumerate all possibilities. A mixed-gender [SportsTeam] can be indicated with a text value of "Mixed".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GenderProp")]
pub enum GenderProp {
GenderType(GenderType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GenderProp")]
impl TryFrom<SchemaValue> for GenderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GenderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GenderType::try_from(v.clone()) { return Ok(GenderProp::GenderType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GenderProp")]
impl TryFrom<&SchemaValue> for GenderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GenderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GenderType::try_from(v.clone()) { return Ok(GenderProp::GenderType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The power of the vehicle's engine.
/// Typical unit code(s): KWT for kilowatt, BHP for brake horsepower, N12 for metric horsepower (PS, with 1 PS = 735,49875 W)
///
/// * Note 1: There are many different ways of measuring an engine's power. For an overview, see [http://en.wikipedia.org/wiki/Horsepower#Engine\_power\_test\_codes](http://en.wikipedia.org/wiki/Horsepower#Engine_power_test_codes).
/// * Note 2: You can link to information about how the given value has been determined using the [valueReference] property.
/// * Note 3: You can use [minValue] and [maxValue] to indicate ranges.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EnginePowerProp")]
pub enum EnginePowerProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EnginePowerProp")]
impl TryFrom<SchemaValue> for EnginePowerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EnginePowerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(EnginePowerProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EnginePowerProp")]
impl TryFrom<&SchemaValue> for EnginePowerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EnginePowerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(EnginePowerProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a BioChemEntity that (in some sense) has this BioChemEntity as a part.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasBioChemEntityPartProp")]
pub enum HasBioChemEntityPartProp {
BioChemEntity(BioChemEntity),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasBioChemEntityPartProp")]
impl TryFrom<SchemaValue> for HasBioChemEntityPartProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasBioChemEntityPartProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(HasBioChemEntityPartProp::BioChemEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasBioChemEntityPartProp")]
impl TryFrom<&SchemaValue> for HasBioChemEntityPartProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasBioChemEntityPartProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(HasBioChemEntityPartProp::BioChemEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An Amazon Standard Identification Number (ASIN) is a 10-character alphanumeric unique identifier assigned by Amazon.com and its partners for product identification within the Amazon organization (summary from [Wikipedia](https://en.wikipedia.org/wiki/Amazon_Standard_Identification_Number)'s article).
///
/// Note also that this is a definition for how to include ASINs in Schema.org data, and not a definition of ASINs in general - see documentation from Amazon for authoritative details.
/// ASINs are most commonly encoded as text strings, but the [asin] property supports URL/URI as potential values too.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AsinProp")]
pub enum AsinProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "AsinProp")]
impl TryFrom<SchemaValue> for AsinProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AsinProp::Text(v)),
SchemaValue::Url(v) => Ok(AsinProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AsinProp")]
impl TryFrom<&SchemaValue> for AsinProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AsinProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(AsinProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An organization identifier that uniquely identifies a legal entity as defined in ISO 17442.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LeiCodeProp")]
pub enum LeiCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LeiCodeProp")]
impl TryFrom<SchemaValue> for LeiCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LeiCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LeiCodeProp")]
impl TryFrom<&SchemaValue> for LeiCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LeiCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The loser of the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LoserProp")]
pub enum LoserProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LoserProp")]
impl TryFrom<SchemaValue> for LoserProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LoserProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LoserProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LoserProp")]
impl TryFrom<&SchemaValue> for LoserProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LoserProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LoserProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// For a [NewsMediaOrganization], a link to the masthead page or a page listing top editorial management.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MastheadProp")]
pub enum MastheadProp {
Text(String),
CreativeWork(CreativeWork),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "MastheadProp")]
impl TryFrom<SchemaValue> for MastheadProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MastheadProp::Text(v)),
SchemaValue::Url(v) => Ok(MastheadProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(MastheadProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MastheadProp")]
impl TryFrom<&SchemaValue> for MastheadProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MastheadProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(MastheadProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(MastheadProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The category or type of pharmacy associated with this cost sharing.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanPharmacyCategoryProp")]
pub enum HealthPlanPharmacyCategoryProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanPharmacyCategoryProp")]
impl TryFrom<SchemaValue> for HealthPlanPharmacyCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanPharmacyCategoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanPharmacyCategoryProp")]
impl TryFrom<&SchemaValue> for HealthPlanPharmacyCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanPharmacyCategoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Defines the energy efficiency Category (which could be either a rating out of range of values or a yes/no certification) for a product according to an international energy efficiency standard.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasEnergyEfficiencyCategoryProp")]
pub enum HasEnergyEfficiencyCategoryProp {
EnergyEfficiencyEnumeration(EnergyEfficiencyEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasEnergyEfficiencyCategoryProp")]
impl TryFrom<SchemaValue> for HasEnergyEfficiencyCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasEnergyEfficiencyCategoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EnergyEfficiencyEnumeration::try_from(v.clone()) { return Ok(HasEnergyEfficiencyCategoryProp::EnergyEfficiencyEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasEnergyEfficiencyCategoryProp")]
impl TryFrom<&SchemaValue> for HasEnergyEfficiencyCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasEnergyEfficiencyCategoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EnergyEfficiencyEnumeration::try_from(v.clone()) { return Ok(HasEnergyEfficiencyCategoryProp::EnergyEfficiencyEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifies a MerchantReturnPolicy that may be applicable.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasMerchantReturnPolicyProp")]
pub enum HasMerchantReturnPolicyProp {
Text(String),
MerchantReturnPolicy(MerchantReturnPolicy),
}
#[automatically_derived]
#[cfg(feature = "HasMerchantReturnPolicyProp")]
impl TryFrom<SchemaValue> for HasMerchantReturnPolicyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMerchantReturnPolicyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MerchantReturnPolicy::try_from(v.clone()) { return Ok(HasMerchantReturnPolicyProp::MerchantReturnPolicy(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasMerchantReturnPolicyProp")]
impl TryFrom<&SchemaValue> for HasMerchantReturnPolicyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMerchantReturnPolicyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MerchantReturnPolicy::try_from(v.clone()) { return Ok(HasMerchantReturnPolicyProp::MerchantReturnPolicy(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sibling of the person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SiblingsProp")]
pub enum SiblingsProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "SiblingsProp")]
impl TryFrom<SchemaValue> for SiblingsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SiblingsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SiblingsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SiblingsProp")]
impl TryFrom<&SchemaValue> for SiblingsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SiblingsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SiblingsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The count of total number of reviews.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReviewCountProp")]
pub enum ReviewCountProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "ReviewCountProp")]
impl TryFrom<SchemaValue> for ReviewCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewCountProp::Text(v)),
SchemaValue::Integer(v) => Ok(ReviewCountProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReviewCountProp")]
impl TryFrom<&SchemaValue> for ReviewCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewCountProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(ReviewCountProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArticleSectionProp")]
pub enum ArticleSectionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArticleSectionProp")]
impl TryFrom<SchemaValue> for ArticleSectionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArticleSectionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArticleSectionProp")]
impl TryFrom<&SchemaValue> for ArticleSectionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArticleSectionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Defines the day(s) of the week on which a recurring [Event] takes place. May be specified using either [DayOfWeek], or alternatively [Text] conforming to iCal's syntax for byDay recurrence rules.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ByDayProp")]
pub enum ByDayProp {
DayOfWeek(DayOfWeek),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ByDayProp")]
impl TryFrom<SchemaValue> for ByDayProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ByDayProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DayOfWeek::try_from(v.clone()) { return Ok(ByDayProp::DayOfWeek(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ByDayProp")]
impl TryFrom<&SchemaValue> for ByDayProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ByDayProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DayOfWeek::try_from(v.clone()) { return Ok(ByDayProp::DayOfWeek(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of grams of saturated fat.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SaturatedFatContentProp")]
pub enum SaturatedFatContentProp {
Mass(Mass),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SaturatedFatContentProp")]
impl TryFrom<SchemaValue> for SaturatedFatContentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SaturatedFatContentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(SaturatedFatContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SaturatedFatContentProp")]
impl TryFrom<&SchemaValue> for SaturatedFatContentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SaturatedFatContentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(SaturatedFatContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Any other drug related to this one, for example commonly-prescribed alternatives.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RelatedDrugProp")]
pub enum RelatedDrugProp {
Drug(Drug),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RelatedDrugProp")]
impl TryFrom<SchemaValue> for RelatedDrugProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedDrugProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Drug::try_from(v.clone()) { return Ok(RelatedDrugProp::Drug(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RelatedDrugProp")]
impl TryFrom<&SchemaValue> for RelatedDrugProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedDrugProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Drug::try_from(v.clone()) { return Ok(RelatedDrugProp::Drug(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of permission granted the person, organization, or audience.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PermissionTypeProp")]
pub enum PermissionTypeProp {
Text(String),
DigitalDocumentPermissionType(DigitalDocumentPermissionType),
}
#[automatically_derived]
#[cfg(feature = "PermissionTypeProp")]
impl TryFrom<SchemaValue> for PermissionTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PermissionTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DigitalDocumentPermissionType::try_from(v.clone()) { return Ok(PermissionTypeProp::DigitalDocumentPermissionType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PermissionTypeProp")]
impl TryFrom<&SchemaValue> for PermissionTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PermissionTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DigitalDocumentPermissionType::try_from(v.clone()) { return Ok(PermissionTypeProp::DigitalDocumentPermissionType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Represents the length and pace of a course, expressed as a [Schedule].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CourseScheduleProp")]
pub enum CourseScheduleProp {
Text(String),
Schedule(Schedule),
}
#[automatically_derived]
#[cfg(feature = "CourseScheduleProp")]
impl TryFrom<SchemaValue> for CourseScheduleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CourseScheduleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Schedule::try_from(v.clone()) { return Ok(CourseScheduleProp::Schedule(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CourseScheduleProp")]
impl TryFrom<&SchemaValue> for CourseScheduleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CourseScheduleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Schedule::try_from(v.clone()) { return Ok(CourseScheduleProp::Schedule(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Typical preparation that a patient must undergo before having the procedure performed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PreparationProp")]
pub enum PreparationProp {
Text(String),
MedicalEntity(MedicalEntity),
}
#[automatically_derived]
#[cfg(feature = "PreparationProp")]
impl TryFrom<SchemaValue> for PreparationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PreparationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(PreparationProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PreparationProp")]
impl TryFrom<&SchemaValue> for PreparationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PreparationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(PreparationProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A [Grant] that directly or indirectly provide funding or sponsorship for this item. See also [ownershipFundingInfo].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FundingProp")]
pub enum FundingProp {
Text(String),
Grant(Grant),
}
#[automatically_derived]
#[cfg(feature = "FundingProp")]
impl TryFrom<SchemaValue> for FundingProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FundingProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Grant::try_from(v.clone()) { return Ok(FundingProp::Grant(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FundingProp")]
impl TryFrom<&SchemaValue> for FundingProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FundingProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Grant::try_from(v.clone()) { return Ok(FundingProp::Grant(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A pointer from a newer variant of a product to its previous, often discontinued predecessor.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SuccessorOfProp")]
pub enum SuccessorOfProp {
Text(String),
ProductModel(ProductModel),
}
#[automatically_derived]
#[cfg(feature = "SuccessorOfProp")]
impl TryFrom<SchemaValue> for SuccessorOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuccessorOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProductModel::try_from(v.clone()) { return Ok(SuccessorOfProp::ProductModel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SuccessorOfProp")]
impl TryFrom<&SchemaValue> for SuccessorOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuccessorOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProductModel::try_from(v.clone()) { return Ok(SuccessorOfProp::ProductModel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date/time the message was received if a single recipient exists.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DateReceivedProp")]
pub enum DateReceivedProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "DateReceivedProp")]
impl TryFrom<SchemaValue> for DateReceivedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DateReceivedProp::Text(v)),
SchemaValue::DateTime(v) => Ok(DateReceivedProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DateReceivedProp")]
impl TryFrom<&SchemaValue> for DateReceivedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DateReceivedProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(DateReceivedProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of the column in which the NewsArticle appears in the print edition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PrintColumnProp")]
pub enum PrintColumnProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PrintColumnProp")]
impl TryFrom<SchemaValue> for PrintColumnProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrintColumnProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PrintColumnProp")]
impl TryFrom<&SchemaValue> for PrintColumnProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrintColumnProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The taxonomic rank of this taxon given preferably as a URI from a controlled vocabulary – typically the ranks from TDWG TaxonRank ontology or equivalent Wikidata URIs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TaxonRankProp")]
pub enum TaxonRankProp {
Text(String),
Url(String),
PropertyValue(PropertyValue),
}
#[automatically_derived]
#[cfg(feature = "TaxonRankProp")]
impl TryFrom<SchemaValue> for TaxonRankProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TaxonRankProp::Text(v)),
SchemaValue::Url(v) => Ok(TaxonRankProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(TaxonRankProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TaxonRankProp")]
impl TryFrom<&SchemaValue> for TaxonRankProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TaxonRankProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(TaxonRankProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(TaxonRankProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifying something physically contained by something else. Typically used here for the underlying anatomical structures, such as organs, that comprise the anatomical system.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ComprisedOfProp")]
pub enum ComprisedOfProp {
Text(String),
AnatomicalSystem(AnatomicalSystem),
AnatomicalStructure(AnatomicalStructure),
}
#[automatically_derived]
#[cfg(feature = "ComprisedOfProp")]
impl TryFrom<SchemaValue> for ComprisedOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ComprisedOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(ComprisedOfProp::AnatomicalSystem(object)) }
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(ComprisedOfProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ComprisedOfProp")]
impl TryFrom<&SchemaValue> for ComprisedOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ComprisedOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(ComprisedOfProp::AnatomicalSystem(object)) }
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(ComprisedOfProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The individual who adds lettering, including speech balloons and sound effects, to artwork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LettererProp")]
pub enum LettererProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "LettererProp")]
impl TryFrom<SchemaValue> for LettererProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LettererProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LettererProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LettererProp")]
impl TryFrom<&SchemaValue> for LettererProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LettererProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LettererProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of offers for the product.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OfferCountProp")]
pub enum OfferCountProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "OfferCountProp")]
impl TryFrom<SchemaValue> for OfferCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OfferCountProp::Text(v)),
SchemaValue::Integer(v) => Ok(OfferCountProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OfferCountProp")]
impl TryFrom<&SchemaValue> for OfferCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OfferCountProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(OfferCountProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of screens in the movie theater.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ScreenCountProp")]
pub enum ScreenCountProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ScreenCountProp")]
impl TryFrom<SchemaValue> for ScreenCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(ScreenCountProp::Number(v)),
SchemaValue::Text(v) => Ok(ScreenCountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ScreenCountProp")]
impl TryFrom<&SchemaValue> for ScreenCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(ScreenCountProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(ScreenCountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Prerequisites for enrolling in the program.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProgramPrerequisitesProp")]
pub enum ProgramPrerequisitesProp {
Text(String),
Course(Course),
EducationalOccupationalCredential(EducationalOccupationalCredential),
AlignmentObject(AlignmentObject),
}
#[automatically_derived]
#[cfg(feature = "ProgramPrerequisitesProp")]
impl TryFrom<SchemaValue> for ProgramPrerequisitesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgramPrerequisitesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Course::try_from(v.clone()) { return Ok(ProgramPrerequisitesProp::Course(object)) }
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(ProgramPrerequisitesProp::EducationalOccupationalCredential(object)) }
if let Ok(object) = AlignmentObject::try_from(v.clone()) { return Ok(ProgramPrerequisitesProp::AlignmentObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProgramPrerequisitesProp")]
impl TryFrom<&SchemaValue> for ProgramPrerequisitesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgramPrerequisitesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Course::try_from(v.clone()) { return Ok(ProgramPrerequisitesProp::Course(object)) }
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(ProgramPrerequisitesProp::EducationalOccupationalCredential(object)) }
if let Ok(object) = AlignmentObject::try_from(v.clone()) { return Ok(ProgramPrerequisitesProp::AlignmentObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An active ingredient, typically chemical compounds and/or biologic substances.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ActiveIngredientProp")]
pub enum ActiveIngredientProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ActiveIngredientProp")]
impl TryFrom<SchemaValue> for ActiveIngredientProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActiveIngredientProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ActiveIngredientProp")]
impl TryFrom<&SchemaValue> for ActiveIngredientProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActiveIngredientProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The industry associated with the job position.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IndustryProp")]
pub enum IndustryProp {
Text(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "IndustryProp")]
impl TryFrom<SchemaValue> for IndustryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IndustryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(IndustryProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IndustryProp")]
impl TryFrom<&SchemaValue> for IndustryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IndustryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(IndustryProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The value of an active ingredient's strength, e.g. 325.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StrengthValueProp")]
pub enum StrengthValueProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "StrengthValueProp")]
impl TryFrom<SchemaValue> for StrengthValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StrengthValueProp::Text(v)),
SchemaValue::Number(v) => Ok(StrengthValueProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StrengthValueProp")]
impl TryFrom<&SchemaValue> for StrengthValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StrengthValueProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(StrengthValueProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Knowledge, skill, ability or personal attribute that must be demonstrated by a person or other entity in order to do something such as earn an Educational Occupational Credential or understand a LearningResource.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CompetencyRequiredProp")]
pub enum CompetencyRequiredProp {
DefinedTerm(DefinedTerm),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CompetencyRequiredProp")]
impl TryFrom<SchemaValue> for CompetencyRequiredProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CompetencyRequiredProp::Url(v)),
SchemaValue::Text(v) => Ok(CompetencyRequiredProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(CompetencyRequiredProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CompetencyRequiredProp")]
impl TryFrom<&SchemaValue> for CompetencyRequiredProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CompetencyRequiredProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(CompetencyRequiredProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(CompetencyRequiredProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The country. For example, USA. You can also provide the two-letter [ISO 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AddressCountryProp")]
pub enum AddressCountryProp {
Country(Country),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AddressCountryProp")]
impl TryFrom<SchemaValue> for AddressCountryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AddressCountryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Country::try_from(v.clone()) { return Ok(AddressCountryProp::Country(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AddressCountryProp")]
impl TryFrom<&SchemaValue> for AddressCountryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AddressCountryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Country::try_from(v.clone()) { return Ok(AddressCountryProp::Country(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A list of single or combined accessModes that are sufficient to understand all the intellectual content of a resource. Values should be drawn from the [approved vocabulary](https://www.w3.org/2021/a11y-discov-vocab/latest/#accessModeSufficient-vocabulary).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccessModeSufficientProp")]
pub enum AccessModeSufficientProp {
Text(String),
ItemList(ItemList),
}
#[automatically_derived]
#[cfg(feature = "AccessModeSufficientProp")]
impl TryFrom<SchemaValue> for AccessModeSufficientProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessModeSufficientProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(AccessModeSufficientProp::ItemList(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccessModeSufficientProp")]
impl TryFrom<&SchemaValue> for AccessModeSufficientProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessModeSufficientProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(AccessModeSufficientProp::ItemList(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates (by URL or string) a particular version of a schema used in some CreativeWork. This property was created primarily to
/// indicate the use of a specific schema.org release, e.g. ```10.0``` as a simple string, or more explicitly via URL, ```https://schema.org/docs/releases.html#v10.0```. There may be situations in which other schemas might usefully be referenced this way, e.g. ```http://dublincore.org/specifications/dublin-core/dces/1999-07-02/``` but this has not been carefully explored in the community.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SchemaVersionProp")]
pub enum SchemaVersionProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "SchemaVersionProp")]
impl TryFrom<SchemaValue> for SchemaVersionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SchemaVersionProp::Text(v)),
SchemaValue::Url(v) => Ok(SchemaVersionProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SchemaVersionProp")]
impl TryFrom<&SchemaValue> for SchemaVersionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SchemaVersionProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(SchemaVersionProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MedicineSystemProp")]
pub enum MedicineSystemProp {
Text(String),
MedicineSystem(MedicineSystem),
}
#[automatically_derived]
#[cfg(feature = "MedicineSystemProp")]
impl TryFrom<SchemaValue> for MedicineSystemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MedicineSystemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicineSystem::try_from(v.clone()) { return Ok(MedicineSystemProp::MedicineSystem(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MedicineSystemProp")]
impl TryFrom<&SchemaValue> for MedicineSystemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MedicineSystemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicineSystem::try_from(v.clone()) { return Ok(MedicineSystemProp::MedicineSystem(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An [EIDR](https://eidr.org/) (Entertainment Identifier Registry) [identifier] representing a specific edit / edition for a work of film or television.
///
/// For example, the motion picture known as "Ghostbusters" whose [titleEIDR] is "10.5240/7EC7-228A-510A-053E-CBB8-J" has several edits, e.g. "10.5240/1F2A-E1C5-680A-14C6-E76B-I" and "10.5240/8A35-3BEE-6497-5D12-9E4F-3".
///
/// Since schema.org types like [Movie] and [TVEpisode] can be used for both works and their multiple expressions, it is possible to use [titleEIDR] alone (for a general description), or alongside [editEIDR] for a more edit-specific description.
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EditEIDRProp")]
pub enum EditEIDRProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "EditEIDRProp")]
impl TryFrom<SchemaValue> for EditEIDRProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EditEIDRProp::Text(v)),
SchemaValue::Url(v) => Ok(EditEIDRProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EditEIDRProp")]
impl TryFrom<&SchemaValue> for EditEIDRProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EditEIDRProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(EditEIDRProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An organization that acknowledges the validity, value or utility of a credential. Note: recognition may include a process of quality assurance or accreditation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecognizedByProp")]
pub enum RecognizedByProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecognizedByProp")]
impl TryFrom<SchemaValue> for RecognizedByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecognizedByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(RecognizedByProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecognizedByProp")]
impl TryFrom<&SchemaValue> for RecognizedByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecognizedByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(RecognizedByProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Any special commitments associated with this job posting. Valid entries include VeteranCommit, MilitarySpouseCommit, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SpecialCommitmentsProp")]
pub enum SpecialCommitmentsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SpecialCommitmentsProp")]
impl TryFrom<SchemaValue> for SpecialCommitmentsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpecialCommitmentsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SpecialCommitmentsProp")]
impl TryFrom<&SchemaValue> for SpecialCommitmentsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpecialCommitmentsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Component (sub-)structure(s) that comprise this anatomical structure.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SubStructureProp")]
pub enum SubStructureProp {
Text(String),
AnatomicalStructure(AnatomicalStructure),
}
#[automatically_derived]
#[cfg(feature = "SubStructureProp")]
impl TryFrom<SchemaValue> for SubStructureProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubStructureProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(SubStructureProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SubStructureProp")]
impl TryFrom<&SchemaValue> for SubStructureProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubStructureProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(SubStructureProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A publication event associated with the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PublicationProp")]
pub enum PublicationProp {
Text(String),
PublicationEvent(PublicationEvent),
}
#[automatically_derived]
#[cfg(feature = "PublicationProp")]
impl TryFrom<SchemaValue> for PublicationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublicationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PublicationEvent::try_from(v.clone()) { return Ok(PublicationProp::PublicationEvent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PublicationProp")]
impl TryFrom<&SchemaValue> for PublicationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublicationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PublicationEvent::try_from(v.clone()) { return Ok(PublicationProp::PublicationEvent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Link to the repository where the un-compiled, human readable code and related code is located (SVN, GitHub, CodePlex).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CodeRepositoryProp")]
pub enum CodeRepositoryProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CodeRepositoryProp")]
impl TryFrom<SchemaValue> for CodeRepositoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CodeRepositoryProp::Url(v)),
SchemaValue::Text(v) => Ok(CodeRepositoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CodeRepositoryProp")]
impl TryFrom<&SchemaValue> for CodeRepositoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CodeRepositoryProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(CodeRepositoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EligibleTransactionVolumeProp")]
pub enum EligibleTransactionVolumeProp {
PriceSpecification(PriceSpecification),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EligibleTransactionVolumeProp")]
impl TryFrom<SchemaValue> for EligibleTransactionVolumeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibleTransactionVolumeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(EligibleTransactionVolumeProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EligibleTransactionVolumeProp")]
impl TryFrom<&SchemaValue> for EligibleTransactionVolumeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibleTransactionVolumeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(EligibleTransactionVolumeProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The distance travelled, e.g. exercising or travelling.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DistanceProp")]
pub enum DistanceProp {
Text(String),
Distance(Distance),
}
#[automatically_derived]
#[cfg(feature = "DistanceProp")]
impl TryFrom<SchemaValue> for DistanceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DistanceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(DistanceProp::Distance(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DistanceProp")]
impl TryFrom<&SchemaValue> for DistanceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DistanceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(DistanceProp::Distance(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The [SHA-2](https://en.wikipedia.org/wiki/SHA-2) SHA256 hash of the content of the item. For example, a zero-length input has value 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "Sha256Prop")]
pub enum Sha256Prop {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "Sha256Prop")]
impl TryFrom<SchemaValue> for Sha256Prop {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Sha256Prop::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "Sha256Prop")]
impl TryFrom<&SchemaValue> for Sha256Prop {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Sha256Prop::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date that payment is due.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PaymentDueDateProp")]
pub enum PaymentDueDateProp {
Date(String),
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PaymentDueDateProp")]
impl TryFrom<SchemaValue> for PaymentDueDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(PaymentDueDateProp::Date(v)),
SchemaValue::DateTime(v) => Ok(PaymentDueDateProp::DateTime(v)),
SchemaValue::Text(v) => Ok(PaymentDueDateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PaymentDueDateProp")]
impl TryFrom<&SchemaValue> for PaymentDueDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(PaymentDueDateProp::Date(v.clone())),
SchemaValue::DateTime(v) => Ok(PaymentDueDateProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(PaymentDueDateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The URL that goes directly to the summary of benefits and coverage for the specific standard plan or plan variation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BenefitsSummaryUrlProp")]
pub enum BenefitsSummaryUrlProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BenefitsSummaryUrlProp")]
impl TryFrom<SchemaValue> for BenefitsSummaryUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(BenefitsSummaryUrlProp::Url(v)),
SchemaValue::Text(v) => Ok(BenefitsSummaryUrlProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BenefitsSummaryUrlProp")]
impl TryFrom<&SchemaValue> for BenefitsSummaryUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(BenefitsSummaryUrlProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(BenefitsSummaryUrlProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the name of the PropertyValueSpecification to be used in URL templates and form encoding in a manner analogous to HTML's input@name.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValueNameProp")]
pub enum ValueNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ValueNameProp")]
impl TryFrom<SchemaValue> for ValueNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValueNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValueNameProp")]
impl TryFrom<&SchemaValue> for ValueNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValueNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// This ordering relation for qualitative values indicates that the subject is lesser than or equal to the object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LesserOrEqualProp")]
pub enum LesserOrEqualProp {
QualitativeValue(QualitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LesserOrEqualProp")]
impl TryFrom<SchemaValue> for LesserOrEqualProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LesserOrEqualProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(LesserOrEqualProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LesserOrEqualProp")]
impl TryFrom<&SchemaValue> for LesserOrEqualProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LesserOrEqualProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(LesserOrEqualProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A contact location for a person's residence.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HomeLocationProp")]
pub enum HomeLocationProp {
Text(String),
Place(Place),
ContactPoint(ContactPoint),
}
#[automatically_derived]
#[cfg(feature = "HomeLocationProp")]
impl TryFrom<SchemaValue> for HomeLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HomeLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(HomeLocationProp::Place(object)) }
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(HomeLocationProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HomeLocationProp")]
impl TryFrom<&SchemaValue> for HomeLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HomeLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(HomeLocationProp::Place(object)) }
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(HomeLocationProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of object. The collection target of the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CollectionProp")]
pub enum CollectionProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CollectionProp")]
impl TryFrom<SchemaValue> for CollectionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CollectionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(CollectionProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CollectionProp")]
impl TryFrom<&SchemaValue> for CollectionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CollectionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(CollectionProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// How often one should engage in the activity.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ActivityFrequencyProp")]
pub enum ActivityFrequencyProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ActivityFrequencyProp")]
impl TryFrom<SchemaValue> for ActivityFrequencyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActivityFrequencyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(ActivityFrequencyProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ActivityFrequencyProp")]
impl TryFrom<&SchemaValue> for ActivityFrequencyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActivityFrequencyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(ActivityFrequencyProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The lower value of some characteristic or property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MinValueProp")]
pub enum MinValueProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "MinValueProp")]
impl TryFrom<SchemaValue> for MinValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MinValueProp::Text(v)),
SchemaValue::Number(v) => Ok(MinValueProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MinValueProp")]
impl TryFrom<&SchemaValue> for MinValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MinValueProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(MinValueProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Either the actual menu as a structured representation, as text, or a URL of the menu.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MenuProp")]
pub enum MenuProp {
Url(String),
Menu(Menu),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MenuProp")]
impl TryFrom<SchemaValue> for MenuProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MenuProp::Url(v)),
SchemaValue::Text(v) => Ok(MenuProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Menu::try_from(v.clone()) { return Ok(MenuProp::Menu(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MenuProp")]
impl TryFrom<&SchemaValue> for MenuProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MenuProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(MenuProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Menu::try_from(v.clone()) { return Ok(MenuProp::Menu(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The illustrator of the book.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IllustratorProp")]
pub enum IllustratorProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "IllustratorProp")]
impl TryFrom<SchemaValue> for IllustratorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IllustratorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(IllustratorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IllustratorProp")]
impl TryFrom<&SchemaValue> for IllustratorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IllustratorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(IllustratorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A URL to a map of the place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasMapProp")]
pub enum HasMapProp {
Text(String),
Url(String),
Map(Map),
}
#[automatically_derived]
#[cfg(feature = "HasMapProp")]
impl TryFrom<SchemaValue> for HasMapProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMapProp::Text(v)),
SchemaValue::Url(v) => Ok(HasMapProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Map::try_from(v.clone()) { return Ok(HasMapProp::Map(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasMapProp")]
impl TryFrom<&SchemaValue> for HasMapProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMapProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(HasMapProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Map::try_from(v.clone()) { return Ok(HasMapProp::Map(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of service being offered, e.g. veterans' benefits, emergency relief, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServiceTypeProp")]
pub enum ServiceTypeProp {
GovernmentBenefitsType(GovernmentBenefitsType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ServiceTypeProp")]
impl TryFrom<SchemaValue> for ServiceTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GovernmentBenefitsType::try_from(v.clone()) { return Ok(ServiceTypeProp::GovernmentBenefitsType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServiceTypeProp")]
impl TryFrom<&SchemaValue> for ServiceTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GovernmentBenefitsType::try_from(v.clone()) { return Ok(ServiceTypeProp::GovernmentBenefitsType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A condition the test is used to diagnose.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UsedToDiagnoseProp")]
pub enum UsedToDiagnoseProp {
MedicalCondition(MedicalCondition),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "UsedToDiagnoseProp")]
impl TryFrom<SchemaValue> for UsedToDiagnoseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UsedToDiagnoseProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCondition::try_from(v.clone()) { return Ok(UsedToDiagnoseProp::MedicalCondition(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UsedToDiagnoseProp")]
impl TryFrom<&SchemaValue> for UsedToDiagnoseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UsedToDiagnoseProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCondition::try_from(v.clone()) { return Ok(UsedToDiagnoseProp::MedicalCondition(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The platform from which the train departs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DeparturePlatformProp")]
pub enum DeparturePlatformProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DeparturePlatformProp")]
impl TryFrom<SchemaValue> for DeparturePlatformProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeparturePlatformProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DeparturePlatformProp")]
impl TryFrom<&SchemaValue> for DeparturePlatformProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeparturePlatformProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Thumbnail image for an image or video.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ThumbnailProp")]
pub enum ThumbnailProp {
Text(String),
ImageObject(ImageObject),
}
#[automatically_derived]
#[cfg(feature = "ThumbnailProp")]
impl TryFrom<SchemaValue> for ThumbnailProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ThumbnailProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(ThumbnailProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ThumbnailProp")]
impl TryFrom<&SchemaValue> for ThumbnailProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ThumbnailProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(ThumbnailProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates if use of the media require a subscription (either paid or free). Allowed values are ```true``` or ```false``` (note that an earlier version had 'yes', 'no').
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RequiresSubscriptionProp")]
pub enum RequiresSubscriptionProp {
Boolean(bool),
MediaSubscription(MediaSubscription),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RequiresSubscriptionProp")]
impl TryFrom<SchemaValue> for RequiresSubscriptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(RequiresSubscriptionProp::Boolean(v)),
SchemaValue::Text(v) => Ok(RequiresSubscriptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaSubscription::try_from(v.clone()) { return Ok(RequiresSubscriptionProp::MediaSubscription(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RequiresSubscriptionProp")]
impl TryFrom<&SchemaValue> for RequiresSubscriptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(RequiresSubscriptionProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(RequiresSubscriptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaSubscription::try_from(v.clone()) { return Ok(RequiresSubscriptionProp::MediaSubscription(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The currency of the discount.
///
/// Use standard formats: [ISO 4217 currency format](http://en.wikipedia.org/wiki/ISO_4217), e.g. "USD"; [Ticker symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for cryptocurrencies, e.g. "BTC"; well known names for [Local Exchange Trading Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system) (LETS) and other currency types, e.g. "Ithaca HOUR".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DiscountCurrencyProp")]
pub enum DiscountCurrencyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DiscountCurrencyProp")]
impl TryFrom<SchemaValue> for DiscountCurrencyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiscountCurrencyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DiscountCurrencyProp")]
impl TryFrom<&SchemaValue> for DiscountCurrencyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiscountCurrencyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// 'merchant' is an out-dated term for 'seller'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MerchantProp")]
pub enum MerchantProp {
Text(String),
Person(Person),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "MerchantProp")]
impl TryFrom<SchemaValue> for MerchantProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MerchantProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MerchantProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(MerchantProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MerchantProp")]
impl TryFrom<&SchemaValue> for MerchantProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MerchantProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MerchantProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(MerchantProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A work that is a translation of the content of this work. E.g. 西遊記 has an English workTranslation “Journey to the West”, a German workTranslation “Monkeys Pilgerfahrt” and a Vietnamese translation Tây du ký bình khảo.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WorkTranslationProp")]
pub enum WorkTranslationProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WorkTranslationProp")]
impl TryFrom<SchemaValue> for WorkTranslationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkTranslationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(WorkTranslationProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WorkTranslationProp")]
impl TryFrom<&SchemaValue> for WorkTranslationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkTranslationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(WorkTranslationProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The Action representing the type of interaction. For up votes, +1s, etc. use [LikeAction]. For down votes use [DislikeAction]. Otherwise, use the most specific Action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InteractionTypeProp")]
pub enum InteractionTypeProp {
Text(String),
Action(Action),
}
#[automatically_derived]
#[cfg(feature = "InteractionTypeProp")]
impl TryFrom<SchemaValue> for InteractionTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractionTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Action::try_from(v.clone()) { return Ok(InteractionTypeProp::Action(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InteractionTypeProp")]
impl TryFrom<&SchemaValue> for InteractionTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractionTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Action::try_from(v.clone()) { return Ok(InteractionTypeProp::Action(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A release of this album.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlbumReleaseProp")]
pub enum AlbumReleaseProp {
Text(String),
MusicRelease(MusicRelease),
}
#[automatically_derived]
#[cfg(feature = "AlbumReleaseProp")]
impl TryFrom<SchemaValue> for AlbumReleaseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlbumReleaseProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicRelease::try_from(v.clone()) { return Ok(AlbumReleaseProp::MusicRelease(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlbumReleaseProp")]
impl TryFrom<&SchemaValue> for AlbumReleaseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlbumReleaseProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicRelease::try_from(v.clone()) { return Ok(AlbumReleaseProp::MusicRelease(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of membership points earned by the member. If necessary, the unitText can be used to express the units the points are issued in. (E.g. stars, miles, etc.)
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MembershipPointsEarnedProp")]
pub enum MembershipPointsEarnedProp {
QuantitativeValue(QuantitativeValue),
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MembershipPointsEarnedProp")]
impl TryFrom<SchemaValue> for MembershipPointsEarnedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(MembershipPointsEarnedProp::Number(v)),
SchemaValue::Text(v) => Ok(MembershipPointsEarnedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MembershipPointsEarnedProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MembershipPointsEarnedProp")]
impl TryFrom<&SchemaValue> for MembershipPointsEarnedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(MembershipPointsEarnedProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(MembershipPointsEarnedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(MembershipPointsEarnedProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The height of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HeightProp")]
pub enum HeightProp {
Text(String),
QuantitativeValue(QuantitativeValue),
Distance(Distance),
}
#[automatically_derived]
#[cfg(feature = "HeightProp")]
impl TryFrom<SchemaValue> for HeightProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HeightProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(HeightProp::QuantitativeValue(object)) }
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(HeightProp::Distance(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HeightProp")]
impl TryFrom<&SchemaValue> for HeightProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HeightProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(HeightProp::QuantitativeValue(object)) }
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(HeightProp::Distance(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Characteristics of the population for which this is intended, or which typically uses it, e.g. 'adults'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TargetPopulationProp")]
pub enum TargetPopulationProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TargetPopulationProp")]
impl TryFrom<SchemaValue> for TargetPopulationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetPopulationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TargetPopulationProp")]
impl TryFrom<&SchemaValue> for TargetPopulationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetPopulationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The basic containment relation between a place and one that contains it.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContainedInProp")]
pub enum ContainedInProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ContainedInProp")]
impl TryFrom<SchemaValue> for ContainedInProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContainedInProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ContainedInProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContainedInProp")]
impl TryFrom<&SchemaValue> for ContainedInProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContainedInProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ContainedInProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The direct performer or driver of the action (animate or inanimate). E.g. *John* wrote a book.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AgentProp")]
pub enum AgentProp {
Organization(Organization),
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AgentProp")]
impl TryFrom<SchemaValue> for AgentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AgentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AgentProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AgentProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AgentProp")]
impl TryFrom<&SchemaValue> for AgentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AgentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AgentProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AgentProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings ```Yes``` or ```No```.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AcceptsReservationsProp")]
pub enum AcceptsReservationsProp {
Text(String),
Boolean(bool),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "AcceptsReservationsProp")]
impl TryFrom<SchemaValue> for AcceptsReservationsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcceptsReservationsProp::Text(v)),
SchemaValue::Boolean(v) => Ok(AcceptsReservationsProp::Boolean(v)),
SchemaValue::Url(v) => Ok(AcceptsReservationsProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AcceptsReservationsProp")]
impl TryFrom<&SchemaValue> for AcceptsReservationsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcceptsReservationsProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(AcceptsReservationsProp::Boolean(v.clone())),
SchemaValue::Url(v) => Ok(AcceptsReservationsProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Type of ordering (e.g. Ascending, Descending, Unordered).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItemListOrderProp")]
pub enum ItemListOrderProp {
ItemListOrderType(ItemListOrderType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ItemListOrderProp")]
impl TryFrom<SchemaValue> for ItemListOrderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemListOrderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemListOrderType::try_from(v.clone()) { return Ok(ItemListOrderProp::ItemListOrderType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItemListOrderProp")]
impl TryFrom<&SchemaValue> for ItemListOrderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemListOrderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemListOrderType::try_from(v.clone()) { return Ok(ItemListOrderProp::ItemListOrderType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifies the allowed range for number of characters in a literal value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValueMaxLengthProp")]
pub enum ValueMaxLengthProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ValueMaxLengthProp")]
impl TryFrom<SchemaValue> for ValueMaxLengthProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(ValueMaxLengthProp::Number(v)),
SchemaValue::Text(v) => Ok(ValueMaxLengthProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValueMaxLengthProp")]
impl TryFrom<&SchemaValue> for ValueMaxLengthProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(ValueMaxLengthProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(ValueMaxLengthProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A flag to signal that the item, event, or place is accessible for free.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FreeProp")]
pub enum FreeProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "FreeProp")]
impl TryFrom<SchemaValue> for FreeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FreeProp::Text(v)),
SchemaValue::Boolean(v) => Ok(FreeProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FreeProp")]
impl TryFrom<&SchemaValue> for FreeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FreeProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(FreeProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Defines the month(s) of the year on which a recurring [Event] takes place. Specified as an [Integer] between 1-12. January is 1.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ByMonthProp")]
pub enum ByMonthProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ByMonthProp")]
impl TryFrom<SchemaValue> for ByMonthProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(ByMonthProp::Integer(v)),
SchemaValue::Text(v) => Ok(ByMonthProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ByMonthProp")]
impl TryFrom<&SchemaValue> for ByMonthProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(ByMonthProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(ByMonthProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of items in an ItemList. Note that some descriptions might not fully describe all items in a list (e.g., multi-page pagination); in such cases, the numberOfItems would be for the entire list.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfItemsProp")]
pub enum NumberOfItemsProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfItemsProp")]
impl TryFrom<SchemaValue> for NumberOfItemsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumberOfItemsProp::Integer(v)),
SchemaValue::Text(v) => Ok(NumberOfItemsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfItemsProp")]
impl TryFrom<&SchemaValue> for NumberOfItemsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumberOfItemsProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(NumberOfItemsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An item being offered (or demanded). The transactional nature of the offer or demand is documented using [businessFunction], e.g. sell, lease etc. While several common expected types are listed explicitly in this definition, others can be used. Using a second type, such as Product or a subtype of Product, can clarify the nature of the offer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItemOfferedProp")]
pub enum ItemOfferedProp {
Trip(Trip),
Event(Event),
AggregateOffer(AggregateOffer),
Service(Service),
Product(Product),
Text(String),
MenuItem(MenuItem),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "ItemOfferedProp")]
impl TryFrom<SchemaValue> for ItemOfferedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemOfferedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Trip::try_from(v.clone()) { return Ok(ItemOfferedProp::Trip(object)) }
if let Ok(object) = Event::try_from(v.clone()) { return Ok(ItemOfferedProp::Event(object)) }
if let Ok(object) = AggregateOffer::try_from(v.clone()) { return Ok(ItemOfferedProp::AggregateOffer(object)) }
if let Ok(object) = Service::try_from(v.clone()) { return Ok(ItemOfferedProp::Service(object)) }
if let Ok(object) = Product::try_from(v.clone()) { return Ok(ItemOfferedProp::Product(object)) }
if let Ok(object) = MenuItem::try_from(v.clone()) { return Ok(ItemOfferedProp::MenuItem(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(ItemOfferedProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItemOfferedProp")]
impl TryFrom<&SchemaValue> for ItemOfferedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemOfferedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Trip::try_from(v.clone()) { return Ok(ItemOfferedProp::Trip(object)) }
if let Ok(object) = Event::try_from(v.clone()) { return Ok(ItemOfferedProp::Event(object)) }
if let Ok(object) = AggregateOffer::try_from(v.clone()) { return Ok(ItemOfferedProp::AggregateOffer(object)) }
if let Ok(object) = Service::try_from(v.clone()) { return Ok(ItemOfferedProp::Service(object)) }
if let Ok(object) = Product::try_from(v.clone()) { return Ok(ItemOfferedProp::Product(object)) }
if let Ok(object) = MenuItem::try_from(v.clone()) { return Ok(ItemOfferedProp::MenuItem(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(ItemOfferedProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Identifier of the NHSN facility that this data record applies to. Use [cvdFacilityCounty] to indicate the county. To provide other details, [healthcareReportingData] can be used on a [Hospital] entry.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdFacilityIdProp")]
pub enum CvdFacilityIdProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CvdFacilityIdProp")]
impl TryFrom<SchemaValue> for CvdFacilityIdProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdFacilityIdProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdFacilityIdProp")]
impl TryFrom<&SchemaValue> for CvdFacilityIdProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdFacilityIdProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The unique identifier for the train.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TrainNumberProp")]
pub enum TrainNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TrainNumberProp")]
impl TryFrom<SchemaValue> for TrainNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrainNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TrainNumberProp")]
impl TryFrom<&SchemaValue> for TrainNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrainNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An entity represented by an entry in a list or data feed (e.g. an 'artist' in a list of 'artists').
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItemProp")]
pub enum ItemProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ItemProp")]
impl TryFrom<SchemaValue> for ItemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ItemProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItemProp")]
impl TryFrom<&SchemaValue> for ItemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ItemProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SubOrganizationProp")]
pub enum SubOrganizationProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SubOrganizationProp")]
impl TryFrom<SchemaValue> for SubOrganizationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubOrganizationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SubOrganizationProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SubOrganizationProp")]
impl TryFrom<&SchemaValue> for SubOrganizationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubOrganizationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SubOrganizationProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a MediaManipulationRatingEnumeration classification of a media object (in the context of how it was published or shared).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MediaAuthenticityCategoryProp")]
pub enum MediaAuthenticityCategoryProp {
Text(String),
MediaManipulationRatingEnumeration(MediaManipulationRatingEnumeration),
}
#[automatically_derived]
#[cfg(feature = "MediaAuthenticityCategoryProp")]
impl TryFrom<SchemaValue> for MediaAuthenticityCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MediaAuthenticityCategoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaManipulationRatingEnumeration::try_from(v.clone()) { return Ok(MediaAuthenticityCategoryProp::MediaManipulationRatingEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MediaAuthenticityCategoryProp")]
impl TryFrom<&SchemaValue> for MediaAuthenticityCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MediaAuthenticityCategoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaManipulationRatingEnumeration::try_from(v.clone()) { return Ok(MediaAuthenticityCategoryProp::MediaManipulationRatingEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The permitted total weight of cargo and installations (e.g. a roof rack) on top of the vehicle.
///
/// Typical unit code(s): KGM for kilogram, LBR for pound
///
/// * Note 1: You can indicate additional information in the [name] of the [QuantitativeValue] node.
/// * Note 2: You may also link to a [QualitativeValue] node that provides additional information using [valueReference]
/// * Note 3: Note that you can use [minValue] and [maxValue] to indicate ranges.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RoofLoadProp")]
pub enum RoofLoadProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "RoofLoadProp")]
impl TryFrom<SchemaValue> for RoofLoadProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RoofLoadProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(RoofLoadProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RoofLoadProp")]
impl TryFrom<&SchemaValue> for RoofLoadProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RoofLoadProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(RoofLoadProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The base salary of the job or of an employee in an EmployeeRole.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BaseSalaryProp")]
pub enum BaseSalaryProp {
MonetaryAmount(MonetaryAmount),
PriceSpecification(PriceSpecification),
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BaseSalaryProp")]
impl TryFrom<SchemaValue> for BaseSalaryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(BaseSalaryProp::Number(v)),
SchemaValue::Text(v) => Ok(BaseSalaryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(BaseSalaryProp::MonetaryAmount(object)) }
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(BaseSalaryProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BaseSalaryProp")]
impl TryFrom<&SchemaValue> for BaseSalaryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(BaseSalaryProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(BaseSalaryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(BaseSalaryProp::MonetaryAmount(object)) }
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(BaseSalaryProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Represents spatial relations in which two geometries (or the places they represent) are topologically disjoint: "they have no point in common. They form a set of disconnected geometries." (A symmetric relationship, as defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).)
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoDisjointProp")]
pub enum GeoDisjointProp {
Text(String),
Place(Place),
GeospatialGeometry(GeospatialGeometry),
}
#[automatically_derived]
#[cfg(feature = "GeoDisjointProp")]
impl TryFrom<SchemaValue> for GeoDisjointProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoDisjointProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoDisjointProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoDisjointProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoDisjointProp")]
impl TryFrom<&SchemaValue> for GeoDisjointProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoDisjointProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoDisjointProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoDisjointProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// This ordering relation for qualitative values indicates that the subject is greater than or equal to the object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GreaterOrEqualProp")]
pub enum GreaterOrEqualProp {
Text(String),
QualitativeValue(QualitativeValue),
}
#[automatically_derived]
#[cfg(feature = "GreaterOrEqualProp")]
impl TryFrom<SchemaValue> for GreaterOrEqualProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GreaterOrEqualProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(GreaterOrEqualProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GreaterOrEqualProp")]
impl TryFrom<&SchemaValue> for GreaterOrEqualProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GreaterOrEqualProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(GreaterOrEqualProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Features or modules provided by this application (and possibly required by other applications).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FeatureListProp")]
pub enum FeatureListProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FeatureListProp")]
impl TryFrom<SchemaValue> for FeatureListProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(FeatureListProp::Url(v)),
SchemaValue::Text(v) => Ok(FeatureListProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FeatureListProp")]
impl TryFrom<&SchemaValue> for FeatureListProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(FeatureListProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(FeatureListProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The name of the bus (e.g. Bolt Express).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BusNameProp")]
pub enum BusNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BusNameProp")]
impl TryFrom<SchemaValue> for BusNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BusNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BusNameProp")]
impl TryFrom<&SchemaValue> for BusNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BusNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The frame size of the video.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VideoFrameSizeProp")]
pub enum VideoFrameSizeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VideoFrameSizeProp")]
impl TryFrom<SchemaValue> for VideoFrameSizeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VideoFrameSizeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VideoFrameSizeProp")]
impl TryFrom<&SchemaValue> for VideoFrameSizeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VideoFrameSizeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LearningResourceTypeProp")]
pub enum LearningResourceTypeProp {
Text(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "LearningResourceTypeProp")]
impl TryFrom<SchemaValue> for LearningResourceTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LearningResourceTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(LearningResourceTypeProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LearningResourceTypeProp")]
impl TryFrom<&SchemaValue> for LearningResourceTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LearningResourceTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(LearningResourceTypeProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A secondary contributor to the CreativeWork or Event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContributorProp")]
pub enum ContributorProp {
Organization(Organization),
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "ContributorProp")]
impl TryFrom<SchemaValue> for ContributorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContributorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ContributorProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ContributorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContributorProp")]
impl TryFrom<&SchemaValue> for ContributorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContributorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ContributorProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ContributorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Method used for delivery or shipping.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasDeliveryMethodProp")]
pub enum HasDeliveryMethodProp {
DeliveryMethod(DeliveryMethod),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasDeliveryMethodProp")]
impl TryFrom<SchemaValue> for HasDeliveryMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasDeliveryMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryMethod::try_from(v.clone()) { return Ok(HasDeliveryMethodProp::DeliveryMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasDeliveryMethodProp")]
impl TryFrom<&SchemaValue> for HasDeliveryMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasDeliveryMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryMethod::try_from(v.clone()) { return Ok(HasDeliveryMethodProp::DeliveryMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of the medical article, taken from the US NLM MeSH publication type catalog. See also [MeSH documentation](http://www.nlm.nih.gov/mesh/pubtypes.html).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PublicationTypeProp")]
pub enum PublicationTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PublicationTypeProp")]
impl TryFrom<SchemaValue> for PublicationTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublicationTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PublicationTypeProp")]
impl TryFrom<&SchemaValue> for PublicationTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublicationTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An application that can complete the request.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ActionApplicationProp")]
pub enum ActionApplicationProp {
SoftwareApplication(SoftwareApplication),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ActionApplicationProp")]
impl TryFrom<SchemaValue> for ActionApplicationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionApplicationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SoftwareApplication::try_from(v.clone()) { return Ok(ActionApplicationProp::SoftwareApplication(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ActionApplicationProp")]
impl TryFrom<&SchemaValue> for ActionApplicationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionApplicationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SoftwareApplication::try_from(v.clone()) { return Ok(ActionApplicationProp::SoftwareApplication(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Points-of-Sales operated by the organization or person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasPOSProp")]
pub enum HasPOSProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasPOSProp")]
impl TryFrom<SchemaValue> for HasPOSProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasPOSProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(HasPOSProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasPOSProp")]
impl TryFrom<&SchemaValue> for HasPOSProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasPOSProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(HasPOSProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The larger organization that this local business is a branch of, if any. Not to be confused with (anatomical) [branch].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BranchOfProp")]
pub enum BranchOfProp {
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "BranchOfProp")]
impl TryFrom<SchemaValue> for BranchOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BranchOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BranchOfProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BranchOfProp")]
impl TryFrom<&SchemaValue> for BranchOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BranchOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BranchOfProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates (typically several) Syllabus entities that lay out what each section of the overall course will cover.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SyllabusSectionsProp")]
pub enum SyllabusSectionsProp {
Syllabus(Syllabus),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SyllabusSectionsProp")]
impl TryFrom<SchemaValue> for SyllabusSectionsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SyllabusSectionsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Syllabus::try_from(v.clone()) { return Ok(SyllabusSectionsProp::Syllabus(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SyllabusSectionsProp")]
impl TryFrom<&SchemaValue> for SyllabusSectionsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SyllabusSectionsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Syllabus::try_from(v.clone()) { return Ok(SyllabusSectionsProp::Syllabus(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The organization issuing the ticket or permit.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IssuedByProp")]
pub enum IssuedByProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IssuedByProp")]
impl TryFrom<SchemaValue> for IssuedByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IssuedByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(IssuedByProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IssuedByProp")]
impl TryFrom<&SchemaValue> for IssuedByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IssuedByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(IssuedByProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A broadcast service to which the broadcast service may belong to such as regional variations of a national channel.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ParentServiceProp")]
pub enum ParentServiceProp {
BroadcastService(BroadcastService),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ParentServiceProp")]
impl TryFrom<SchemaValue> for ParentServiceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentServiceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BroadcastService::try_from(v.clone()) { return Ok(ParentServiceProp::BroadcastService(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ParentServiceProp")]
impl TryFrom<&SchemaValue> for ParentServiceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentServiceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BroadcastService::try_from(v.clone()) { return Ok(ParentServiceProp::BroadcastService(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A component test of the panel.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SubTestProp")]
pub enum SubTestProp {
MedicalTest(MedicalTest),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SubTestProp")]
impl TryFrom<SchemaValue> for SubTestProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubTestProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTest::try_from(v.clone()) { return Ok(SubTestProp::MedicalTest(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SubTestProp")]
impl TryFrom<&SchemaValue> for SubTestProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubTestProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTest::try_from(v.clone()) { return Ok(SubTestProp::MedicalTest(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The composer of the soundtrack.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MusicByProp")]
pub enum MusicByProp {
Person(Person),
MusicGroup(MusicGroup),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MusicByProp")]
impl TryFrom<SchemaValue> for MusicByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MusicByProp::Person(object)) }
if let Ok(object) = MusicGroup::try_from(v.clone()) { return Ok(MusicByProp::MusicGroup(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MusicByProp")]
impl TryFrom<&SchemaValue> for MusicByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MusicByProp::Person(object)) }
if let Ok(object) = MusicGroup::try_from(v.clone()) { return Ok(MusicByProp::MusicGroup(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A director of e.g. TV, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DirectorsProp")]
pub enum DirectorsProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "DirectorsProp")]
impl TryFrom<SchemaValue> for DirectorsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DirectorsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(DirectorsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DirectorsProp")]
impl TryFrom<&SchemaValue> for DirectorsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DirectorsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(DirectorsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An abstract is a short description that summarizes a [CreativeWork].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AbstractTypeProp")]
pub enum AbstractTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AbstractTypeProp")]
impl TryFrom<SchemaValue> for AbstractTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AbstractTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AbstractTypeProp")]
impl TryFrom<&SchemaValue> for AbstractTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AbstractTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The 14-character, HIOS-generated Plan ID number. (Plan IDs must be unique, even across different markets.)
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanIdProp")]
pub enum HealthPlanIdProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanIdProp")]
impl TryFrom<SchemaValue> for HealthPlanIdProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanIdProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanIdProp")]
impl TryFrom<&SchemaValue> for HealthPlanIdProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanIdProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// 'carrier' is an out-dated term indicating the 'provider' for parcel delivery and flights.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CarrierProp")]
pub enum CarrierProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CarrierProp")]
impl TryFrom<SchemaValue> for CarrierProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CarrierProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CarrierProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CarrierProp")]
impl TryFrom<&SchemaValue> for CarrierProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CarrierProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CarrierProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The total financial value of the person as calculated by subtracting assets from liabilities.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NetWorthProp")]
pub enum NetWorthProp {
Text(String),
PriceSpecification(PriceSpecification),
MonetaryAmount(MonetaryAmount),
}
#[automatically_derived]
#[cfg(feature = "NetWorthProp")]
impl TryFrom<SchemaValue> for NetWorthProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NetWorthProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(NetWorthProp::PriceSpecification(object)) }
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(NetWorthProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NetWorthProp")]
impl TryFrom<&SchemaValue> for NetWorthProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NetWorthProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(NetWorthProp::PriceSpecification(object)) }
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(NetWorthProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CreatorProp")]
pub enum CreatorProp {
Person(Person),
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CreatorProp")]
impl TryFrom<SchemaValue> for CreatorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CreatorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CreatorProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CreatorProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CreatorProp")]
impl TryFrom<&SchemaValue> for CreatorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CreatorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CreatorProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CreatorProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A collection of music albums.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlbumsProp")]
pub enum AlbumsProp {
MusicAlbum(MusicAlbum),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AlbumsProp")]
impl TryFrom<SchemaValue> for AlbumsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlbumsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbum::try_from(v.clone()) { return Ok(AlbumsProp::MusicAlbum(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlbumsProp")]
impl TryFrom<&SchemaValue> for AlbumsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlbumsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbum::try_from(v.clone()) { return Ok(AlbumsProp::MusicAlbum(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A full description of the lodging unit.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LodgingUnitDescriptionProp")]
pub enum LodgingUnitDescriptionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LodgingUnitDescriptionProp")]
impl TryFrom<SchemaValue> for LodgingUnitDescriptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LodgingUnitDescriptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LodgingUnitDescriptionProp")]
impl TryFrom<&SchemaValue> for LodgingUnitDescriptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LodgingUnitDescriptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The person or organization who produced the work (e.g. music album, movie, TV/radio series etc.).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProducerProp")]
pub enum ProducerProp {
Organization(Organization),
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProducerProp")]
impl TryFrom<SchemaValue> for ProducerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProducerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ProducerProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ProducerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProducerProp")]
impl TryFrom<&SchemaValue> for ProducerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProducerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ProducerProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ProducerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Media type typically expressed using a MIME format (see [IANA site](http://www.iana.org/assignments/media-types/media-types.xhtml) and [MDN reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types)), e.g. application/zip for a SoftwareApplication binary, audio/mpeg for .mp3 etc.
///
/// In cases where a [CreativeWork] has several media type representations, [encoding] can be used to indicate each [MediaObject] alongside particular [encodingFormat] information.
///
/// Unregistered or niche encoding and file formats can be indicated instead via the most appropriate URL, e.g. defining Web page or a Wikipedia/Wikidata entry.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EncodingFormatProp")]
pub enum EncodingFormatProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EncodingFormatProp")]
impl TryFrom<SchemaValue> for EncodingFormatProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(EncodingFormatProp::Url(v)),
SchemaValue::Text(v) => Ok(EncodingFormatProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EncodingFormatProp")]
impl TryFrom<&SchemaValue> for EncodingFormatProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(EncodingFormatProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(EncodingFormatProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An alignment to an established educational framework.
///
/// This property should not be used where the nature of the alignment can be described using a simple property, for example to express that a resource [teaches] or [assesses] a competency.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EducationalAlignmentProp")]
pub enum EducationalAlignmentProp {
AlignmentObject(AlignmentObject),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EducationalAlignmentProp")]
impl TryFrom<SchemaValue> for EducationalAlignmentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalAlignmentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AlignmentObject::try_from(v.clone()) { return Ok(EducationalAlignmentProp::AlignmentObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EducationalAlignmentProp")]
impl TryFrom<&SchemaValue> for EducationalAlignmentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalAlignmentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AlignmentObject::try_from(v.clone()) { return Ok(EducationalAlignmentProp::AlignmentObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The audience eligible for this service.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServiceAudienceProp")]
pub enum ServiceAudienceProp {
Audience(Audience),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ServiceAudienceProp")]
impl TryFrom<SchemaValue> for ServiceAudienceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceAudienceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(ServiceAudienceProp::Audience(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServiceAudienceProp")]
impl TryFrom<&SchemaValue> for ServiceAudienceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceAudienceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(ServiceAudienceProp::Audience(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Relates a property to a class that is (one of) the type(s) the property is expected to be used on.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DomainIncludesProp")]
pub enum DomainIncludesProp {
Text(String),
Class(Class),
}
#[automatically_derived]
#[cfg(feature = "DomainIncludesProp")]
impl TryFrom<SchemaValue> for DomainIncludesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DomainIncludesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Class::try_from(v.clone()) { return Ok(DomainIncludesProp::Class(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DomainIncludesProp")]
impl TryFrom<&SchemaValue> for DomainIncludesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DomainIncludesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Class::try_from(v.clone()) { return Ok(DomainIncludesProp::Class(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the kind of statistic represented by a [StatisticalVariable], e.g. mean, count etc. The value of statType is a property, either from within Schema.org (e.g. [count], [median], [marginOfError], [maxValue], [minValue]) or from other compatible (e.g. RDF) systems such as DataCommons.org or Wikidata.org.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StatTypeProp")]
pub enum StatTypeProp {
Text(String),
Property(Property),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "StatTypeProp")]
impl TryFrom<SchemaValue> for StatTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StatTypeProp::Text(v)),
SchemaValue::Url(v) => Ok(StatTypeProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Property::try_from(v.clone()) { return Ok(StatTypeProp::Property(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StatTypeProp")]
impl TryFrom<&SchemaValue> for StatTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StatTypeProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(StatTypeProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Property::try_from(v.clone()) { return Ok(StatTypeProp::Property(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// If this NewsArticle appears in print, this field indicates the name of the page on which the article is found. Please note that this field is intended for the exact page name (e.g. A5, B18).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PrintPageProp")]
pub enum PrintPageProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PrintPageProp")]
impl TryFrom<SchemaValue> for PrintPageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrintPageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PrintPageProp")]
impl TryFrom<&SchemaValue> for PrintPageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PrintPageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An agent associated with the publication event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PublishedByProp")]
pub enum PublishedByProp {
Organization(Organization),
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PublishedByProp")]
impl TryFrom<SchemaValue> for PublishedByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublishedByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(PublishedByProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(PublishedByProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PublishedByProp")]
impl TryFrom<&SchemaValue> for PublishedByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublishedByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(PublishedByProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(PublishedByProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A diagnostic test that can identify this sign.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IdentifyingTestProp")]
pub enum IdentifyingTestProp {
MedicalTest(MedicalTest),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IdentifyingTestProp")]
impl TryFrom<SchemaValue> for IdentifyingTestProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IdentifyingTestProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTest::try_from(v.clone()) { return Ok(IdentifyingTestProp::MedicalTest(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IdentifyingTestProp")]
impl TryFrom<&SchemaValue> for IdentifyingTestProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IdentifyingTestProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTest::try_from(v.clone()) { return Ok(IdentifyingTestProp::MedicalTest(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Identifies a [Trip] that is a subTrip of this Trip. For example Day 1, Day 2, etc. of a multi-day trip.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SubTripProp")]
pub enum SubTripProp {
Trip(Trip),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SubTripProp")]
impl TryFrom<SchemaValue> for SubTripProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubTripProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Trip::try_from(v.clone()) { return Ok(SubTripProp::Trip(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SubTripProp")]
impl TryFrom<&SchemaValue> for SubTripProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubTripProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Trip::try_from(v.clone()) { return Ok(SubTripProp::Trip(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The method (from an enumeration) by which the customer obtains a return shipping label for a product returned due to customer remorse.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CustomerRemorseReturnLabelSourceProp")]
pub enum CustomerRemorseReturnLabelSourceProp {
ReturnLabelSourceEnumeration(ReturnLabelSourceEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CustomerRemorseReturnLabelSourceProp")]
impl TryFrom<SchemaValue> for CustomerRemorseReturnLabelSourceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CustomerRemorseReturnLabelSourceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnLabelSourceEnumeration::try_from(v.clone()) { return Ok(CustomerRemorseReturnLabelSourceProp::ReturnLabelSourceEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CustomerRemorseReturnLabelSourceProp")]
impl TryFrom<&SchemaValue> for CustomerRemorseReturnLabelSourceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CustomerRemorseReturnLabelSourceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnLabelSourceEnumeration::try_from(v.clone()) { return Ok(CustomerRemorseReturnLabelSourceProp::ReturnLabelSourceEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of positions open for this job posting. Use a positive integer. Do not use if the number of positions is unclear or not known.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TotalJobOpeningsProp")]
pub enum TotalJobOpeningsProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "TotalJobOpeningsProp")]
impl TryFrom<SchemaValue> for TotalJobOpeningsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TotalJobOpeningsProp::Text(v)),
SchemaValue::Integer(v) => Ok(TotalJobOpeningsProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TotalJobOpeningsProp")]
impl TryFrom<&SchemaValue> for TotalJobOpeningsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TotalJobOpeningsProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(TotalJobOpeningsProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The response (yes, no, maybe) to the RSVP.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RsvpResponseProp")]
pub enum RsvpResponseProp {
RsvpResponseType(RsvpResponseType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RsvpResponseProp")]
impl TryFrom<SchemaValue> for RsvpResponseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RsvpResponseProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RsvpResponseType::try_from(v.clone()) { return Ok(RsvpResponseProp::RsvpResponseType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RsvpResponseProp")]
impl TryFrom<&SchemaValue> for RsvpResponseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RsvpResponseProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RsvpResponseType::try_from(v.clone()) { return Ok(RsvpResponseProp::RsvpResponseType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the approximate radius of a GeoCircle (metres unless indicated otherwise via Distance notation).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoRadiusProp")]
pub enum GeoRadiusProp {
Text(String),
Distance(Distance),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "GeoRadiusProp")]
impl TryFrom<SchemaValue> for GeoRadiusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoRadiusProp::Text(v)),
SchemaValue::Number(v) => Ok(GeoRadiusProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(GeoRadiusProp::Distance(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoRadiusProp")]
impl TryFrom<&SchemaValue> for GeoRadiusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoRadiusProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(GeoRadiusProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(GeoRadiusProp::Distance(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The website to access the service.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServiceUrlProp")]
pub enum ServiceUrlProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "ServiceUrlProp")]
impl TryFrom<SchemaValue> for ServiceUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceUrlProp::Text(v)),
SchemaValue::Url(v) => Ok(ServiceUrlProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServiceUrlProp")]
impl TryFrom<&SchemaValue> for ServiceUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceUrlProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ServiceUrlProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProviderProp")]
pub enum ProviderProp {
Text(String),
Organization(Organization),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "ProviderProp")]
impl TryFrom<SchemaValue> for ProviderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProviderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ProviderProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ProviderProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProviderProp")]
impl TryFrom<&SchemaValue> for ProviderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProviderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ProviderProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ProviderProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Description of the meals that will be provided or available for purchase.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MealServiceProp")]
pub enum MealServiceProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MealServiceProp")]
impl TryFrom<SchemaValue> for MealServiceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MealServiceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MealServiceProp")]
impl TryFrom<&SchemaValue> for MealServiceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MealServiceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// e.g. Painting, Drawing, Sculpture, Print, Photograph, Assemblage, Collage, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArtformProp")]
pub enum ArtformProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "ArtformProp")]
impl TryFrom<SchemaValue> for ArtformProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArtformProp::Text(v)),
SchemaValue::Url(v) => Ok(ArtformProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArtformProp")]
impl TryFrom<&SchemaValue> for ArtformProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArtformProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ArtformProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of downvotes this question, answer or comment has received from the community.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DownvoteCountProp")]
pub enum DownvoteCountProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DownvoteCountProp")]
impl TryFrom<SchemaValue> for DownvoteCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(DownvoteCountProp::Integer(v)),
SchemaValue::Text(v) => Ok(DownvoteCountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DownvoteCountProp")]
impl TryFrom<&SchemaValue> for DownvoteCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(DownvoteCountProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(DownvoteCountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The (e.g. fictional) character, Person or Organization to whom the quotation is attributed within the containing CreativeWork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SpokenByCharacterProp")]
pub enum SpokenByCharacterProp {
Organization(Organization),
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "SpokenByCharacterProp")]
impl TryFrom<SchemaValue> for SpokenByCharacterProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpokenByCharacterProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SpokenByCharacterProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SpokenByCharacterProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SpokenByCharacterProp")]
impl TryFrom<&SchemaValue> for SpokenByCharacterProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpokenByCharacterProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SpokenByCharacterProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SpokenByCharacterProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A step-by-step or full explanation about Answer. Can outline how this Answer was achieved or contain more broad clarification or statement about it.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AnswerExplanationProp")]
pub enum AnswerExplanationProp {
Comment(Comment),
WebContent(WebContent),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AnswerExplanationProp")]
impl TryFrom<SchemaValue> for AnswerExplanationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AnswerExplanationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Comment::try_from(v.clone()) { return Ok(AnswerExplanationProp::Comment(object)) }
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(AnswerExplanationProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AnswerExplanationProp")]
impl TryFrom<&SchemaValue> for AnswerExplanationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AnswerExplanationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Comment::try_from(v.clone()) { return Ok(AnswerExplanationProp::Comment(object)) }
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(AnswerExplanationProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// One or more detailed price specifications, indicating the unit price and delivery or payment charges.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PriceSpecificationProp")]
pub enum PriceSpecificationProp {
Text(String),
PriceSpecification(PriceSpecification),
}
#[automatically_derived]
#[cfg(feature = "PriceSpecificationProp")]
impl TryFrom<SchemaValue> for PriceSpecificationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceSpecificationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(PriceSpecificationProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PriceSpecificationProp")]
impl TryFrom<&SchemaValue> for PriceSpecificationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceSpecificationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(PriceSpecificationProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifies after how much time this price (or price component) becomes valid and billing starts. Can be used, for example, to model a price increase after the first year of a subscription. The unit of measurement is specified by the unitCode property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BillingStartProp")]
pub enum BillingStartProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BillingStartProp")]
impl TryFrom<SchemaValue> for BillingStartProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(BillingStartProp::Number(v)),
SchemaValue::Text(v) => Ok(BillingStartProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BillingStartProp")]
impl TryFrom<&SchemaValue> for BillingStartProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(BillingStartProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(BillingStartProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The BroadcastService offered on this channel.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProvidesBroadcastServiceProp")]
pub enum ProvidesBroadcastServiceProp {
Text(String),
BroadcastService(BroadcastService),
}
#[automatically_derived]
#[cfg(feature = "ProvidesBroadcastServiceProp")]
impl TryFrom<SchemaValue> for ProvidesBroadcastServiceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProvidesBroadcastServiceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BroadcastService::try_from(v.clone()) { return Ok(ProvidesBroadcastServiceProp::BroadcastService(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProvidesBroadcastServiceProp")]
impl TryFrom<&SchemaValue> for ProvidesBroadcastServiceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProvidesBroadcastServiceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BroadcastService::try_from(v.clone()) { return Ok(ProvidesBroadcastServiceProp::BroadcastService(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A single step item (as HowToStep, text, document, video, etc.) or a HowToSection (originally misnamed 'steps'; 'step' is preferred).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StepsProp")]
pub enum StepsProp {
Text(String),
ItemList(ItemList),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "StepsProp")]
impl TryFrom<SchemaValue> for StepsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StepsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(StepsProp::ItemList(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(StepsProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StepsProp")]
impl TryFrom<&SchemaValue> for StepsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StepsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(StepsProp::ItemList(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(StepsProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A contraindication for this therapy.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContraindicationProp")]
pub enum ContraindicationProp {
Text(String),
MedicalContraindication(MedicalContraindication),
}
#[automatically_derived]
#[cfg(feature = "ContraindicationProp")]
impl TryFrom<SchemaValue> for ContraindicationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContraindicationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalContraindication::try_from(v.clone()) { return Ok(ContraindicationProp::MedicalContraindication(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContraindicationProp")]
impl TryFrom<&SchemaValue> for ContraindicationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContraindicationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalContraindication::try_from(v.clone()) { return Ok(ContraindicationProp::MedicalContraindication(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The 10th percentile value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "Percentile10Prop")]
pub enum Percentile10Prop {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "Percentile10Prop")]
impl TryFrom<SchemaValue> for Percentile10Prop {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Percentile10Prop::Text(v)),
SchemaValue::Number(v) => Ok(Percentile10Prop::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "Percentile10Prop")]
impl TryFrom<&SchemaValue> for Percentile10Prop {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Percentile10Prop::Text(v.clone())),
SchemaValue::Number(v) => Ok(Percentile10Prop::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Specifies for how long this price (or price component) will be billed. Can be used, for example, to model the contractual duration of a subscription or payment plan. Type can be either a Duration or a Number (in which case the unit of measurement, for example month, is specified by the unitCode property).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BillingDurationProp")]
pub enum BillingDurationProp {
Duration(Duration),
QuantitativeValue(QuantitativeValue),
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BillingDurationProp")]
impl TryFrom<SchemaValue> for BillingDurationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(BillingDurationProp::Number(v)),
SchemaValue::Text(v) => Ok(BillingDurationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(BillingDurationProp::Duration(object)) }
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(BillingDurationProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BillingDurationProp")]
impl TryFrom<&SchemaValue> for BillingDurationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(BillingDurationProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(BillingDurationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(BillingDurationProp::Duration(object)) }
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(BillingDurationProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A performer at the event—for example, a presenter, musician, musical group or actor.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PerformerProp")]
pub enum PerformerProp {
Person(Person),
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "PerformerProp")]
impl TryFrom<SchemaValue> for PerformerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PerformerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(PerformerProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(PerformerProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PerformerProp")]
impl TryFrom<&SchemaValue> for PerformerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PerformerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(PerformerProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(PerformerProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indications regarding the permitted usage of the accommodation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PermittedUsageProp")]
pub enum PermittedUsageProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PermittedUsageProp")]
impl TryFrom<SchemaValue> for PermittedUsageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PermittedUsageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PermittedUsageProp")]
impl TryFrom<&SchemaValue> for PermittedUsageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PermittedUsageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The cuisine of the restaurant.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServesCuisineProp")]
pub enum ServesCuisineProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ServesCuisineProp")]
impl TryFrom<SchemaValue> for ServesCuisineProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServesCuisineProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServesCuisineProp")]
impl TryFrom<&SchemaValue> for ServesCuisineProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServesCuisineProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The label that issued the release.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecordLabelProp")]
pub enum RecordLabelProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecordLabelProp")]
impl TryFrom<SchemaValue> for RecordLabelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecordLabelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(RecordLabelProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecordLabelProp")]
impl TryFrom<&SchemaValue> for RecordLabelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecordLabelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(RecordLabelProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MemberProp")]
pub enum MemberProp {
Organization(Organization),
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MemberProp")]
impl TryFrom<SchemaValue> for MemberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MemberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(MemberProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MemberProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MemberProp")]
impl TryFrom<&SchemaValue> for MemberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MemberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(MemberProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MemberProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifies whether the applicable value-added tax (VAT) is included in the price specification or not.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValueAddedTaxIncludedProp")]
pub enum ValueAddedTaxIncludedProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ValueAddedTaxIncludedProp")]
impl TryFrom<SchemaValue> for ValueAddedTaxIncludedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(ValueAddedTaxIncludedProp::Boolean(v)),
SchemaValue::Text(v) => Ok(ValueAddedTaxIncludedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValueAddedTaxIncludedProp")]
impl TryFrom<&SchemaValue> for ValueAddedTaxIncludedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(ValueAddedTaxIncludedProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(ValueAddedTaxIncludedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of children staying in the unit.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumChildrenProp")]
pub enum NumChildrenProp {
Integer(i64),
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "NumChildrenProp")]
impl TryFrom<SchemaValue> for NumChildrenProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumChildrenProp::Integer(v)),
SchemaValue::Text(v) => Ok(NumChildrenProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumChildrenProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumChildrenProp")]
impl TryFrom<&SchemaValue> for NumChildrenProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumChildrenProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(NumChildrenProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumChildrenProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A media object representing the circumstances while performing this direction.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DuringMediaProp")]
pub enum DuringMediaProp {
MediaObject(MediaObject),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DuringMediaProp")]
impl TryFrom<SchemaValue> for DuringMediaProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(DuringMediaProp::Url(v)),
SchemaValue::Text(v) => Ok(DuringMediaProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(DuringMediaProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DuringMediaProp")]
impl TryFrom<&SchemaValue> for DuringMediaProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(DuringMediaProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(DuringMediaProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(DuringMediaProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The total number of students that have enrolled in the history of the course.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TotalHistoricalEnrollmentProp")]
pub enum TotalHistoricalEnrollmentProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TotalHistoricalEnrollmentProp")]
impl TryFrom<SchemaValue> for TotalHistoricalEnrollmentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(TotalHistoricalEnrollmentProp::Integer(v)),
SchemaValue::Text(v) => Ok(TotalHistoricalEnrollmentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TotalHistoricalEnrollmentProp")]
impl TryFrom<&SchemaValue> for TotalHistoricalEnrollmentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(TotalHistoricalEnrollmentProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(TotalHistoricalEnrollmentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An organization identifier as defined in ISO 6523(-1). Note that many existing organization identifiers such as [leiCode](https://schema.org/leiCode), [duns](https://schema.org/duns) and [vatID](https://schema.org/vatID) can be expressed as an ISO 6523 identifier by setting the ICD part of the ISO 6523 identifier accordingly.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "Iso6523CodeProp")]
pub enum Iso6523CodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "Iso6523CodeProp")]
impl TryFrom<SchemaValue> for Iso6523CodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Iso6523CodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "Iso6523CodeProp")]
impl TryFrom<&SchemaValue> for Iso6523CodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Iso6523CodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates that this legislation (or part of legislation) fulfills the objectives set by another legislation, by passing appropriate implementation measures. Typically, some legislations of European Union's member states or regions transpose European Directives. This indicates a legally binding link between the 2 legislations.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationTransposesProp")]
pub enum LegislationTransposesProp {
Legislation(Legislation),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LegislationTransposesProp")]
impl TryFrom<SchemaValue> for LegislationTransposesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationTransposesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Legislation::try_from(v.clone()) { return Ok(LegislationTransposesProp::Legislation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationTransposesProp")]
impl TryFrom<&SchemaValue> for LegislationTransposesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationTransposesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Legislation::try_from(v.clone()) { return Ok(LegislationTransposesProp::Legislation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The biomechanical properties of the bone.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BiomechnicalClassProp")]
pub enum BiomechnicalClassProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BiomechnicalClassProp")]
impl TryFrom<SchemaValue> for BiomechnicalClassProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BiomechnicalClassProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BiomechnicalClassProp")]
impl TryFrom<&SchemaValue> for BiomechnicalClassProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BiomechnicalClassProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates an item or CreativeWork that this item, or CreativeWork (in some sense), is part of.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsPartOfProp")]
pub enum IsPartOfProp {
Text(String),
CreativeWork(CreativeWork),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "IsPartOfProp")]
impl TryFrom<SchemaValue> for IsPartOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsPartOfProp::Text(v)),
SchemaValue::Url(v) => Ok(IsPartOfProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(IsPartOfProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsPartOfProp")]
impl TryFrom<&SchemaValue> for IsPartOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsPartOfProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(IsPartOfProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(IsPartOfProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of educational or occupational program. For example, classroom, internship, alternance, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProgramTypeProp")]
pub enum ProgramTypeProp {
Text(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "ProgramTypeProp")]
impl TryFrom<SchemaValue> for ProgramTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgramTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(ProgramTypeProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProgramTypeProp")]
impl TryFrom<&SchemaValue> for ProgramTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgramTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(ProgramTypeProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specific physiologic risks associated to the diet plan.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RisksProp")]
pub enum RisksProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RisksProp")]
impl TryFrom<SchemaValue> for RisksProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RisksProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RisksProp")]
impl TryFrom<&SchemaValue> for RisksProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RisksProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A URL to a map of the place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MapProp")]
pub enum MapProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "MapProp")]
impl TryFrom<SchemaValue> for MapProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MapProp::Text(v)),
SchemaValue::Url(v) => Ok(MapProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MapProp")]
impl TryFrom<&SchemaValue> for MapProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MapProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(MapProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A medical study or trial related to this entity.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StudyProp")]
pub enum StudyProp {
Text(String),
MedicalStudy(MedicalStudy),
}
#[automatically_derived]
#[cfg(feature = "StudyProp")]
impl TryFrom<SchemaValue> for StudyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StudyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalStudy::try_from(v.clone()) { return Ok(StudyProp::MedicalStudy(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StudyProp")]
impl TryFrom<&SchemaValue> for StudyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StudyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalStudy::try_from(v.clone()) { return Ok(StudyProp::MedicalStudy(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The standard for interpreting the Plan ID. The preferred is "HIOS". See the Centers for Medicare & Medicaid Services for more details.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UsesHealthPlanIdStandardProp")]
pub enum UsesHealthPlanIdStandardProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "UsesHealthPlanIdStandardProp")]
impl TryFrom<SchemaValue> for UsesHealthPlanIdStandardProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UsesHealthPlanIdStandardProp::Text(v)),
SchemaValue::Url(v) => Ok(UsesHealthPlanIdStandardProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UsesHealthPlanIdStandardProp")]
impl TryFrom<&SchemaValue> for UsesHealthPlanIdStandardProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UsesHealthPlanIdStandardProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(UsesHealthPlanIdStandardProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Upcoming or past events associated with this place or organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EventsProp")]
pub enum EventsProp {
Event(Event),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EventsProp")]
impl TryFrom<SchemaValue> for EventsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EventsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(EventsProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EventsProp")]
impl TryFrom<&SchemaValue> for EventsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EventsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(EventsProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates information about the shipping policies and options associated with an [Offer].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ShippingDetailsProp")]
pub enum ShippingDetailsProp {
Text(String),
OfferShippingDetails(OfferShippingDetails),
}
#[automatically_derived]
#[cfg(feature = "ShippingDetailsProp")]
impl TryFrom<SchemaValue> for ShippingDetailsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ShippingDetailsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OfferShippingDetails::try_from(v.clone()) { return Ok(ShippingDetailsProp::OfferShippingDetails(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ShippingDetailsProp")]
impl TryFrom<&SchemaValue> for ShippingDetailsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ShippingDetailsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OfferShippingDetails::try_from(v.clone()) { return Ok(ShippingDetailsProp::OfferShippingDetails(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The method (from an enumeration) by which the customer obtains a return shipping label for a defect product.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItemDefectReturnLabelSourceProp")]
pub enum ItemDefectReturnLabelSourceProp {
ReturnLabelSourceEnumeration(ReturnLabelSourceEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ItemDefectReturnLabelSourceProp")]
impl TryFrom<SchemaValue> for ItemDefectReturnLabelSourceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemDefectReturnLabelSourceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnLabelSourceEnumeration::try_from(v.clone()) { return Ok(ItemDefectReturnLabelSourceProp::ReturnLabelSourceEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItemDefectReturnLabelSourceProp")]
impl TryFrom<&SchemaValue> for ItemDefectReturnLabelSourceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemDefectReturnLabelSourceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ReturnLabelSourceEnumeration::try_from(v.clone()) { return Ok(ItemDefectReturnLabelSourceProp::ReturnLabelSourceEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An actor, e.g. in TV, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ActorsProp")]
pub enum ActorsProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "ActorsProp")]
impl TryFrom<SchemaValue> for ActorsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActorsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ActorsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ActorsProp")]
impl TryFrom<&SchemaValue> for ActorsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActorsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ActorsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AssociatedPathophysiologyProp")]
pub enum AssociatedPathophysiologyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AssociatedPathophysiologyProp")]
impl TryFrom<SchemaValue> for AssociatedPathophysiologyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedPathophysiologyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AssociatedPathophysiologyProp")]
impl TryFrom<&SchemaValue> for AssociatedPathophysiologyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedPathophysiologyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// After this date, the item will no longer be available for pickup.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailableThroughProp")]
pub enum AvailableThroughProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "AvailableThroughProp")]
impl TryFrom<SchemaValue> for AvailableThroughProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableThroughProp::Text(v)),
SchemaValue::DateTime(v) => Ok(AvailableThroughProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailableThroughProp")]
impl TryFrom<&SchemaValue> for AvailableThroughProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableThroughProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(AvailableThroughProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A product measurement, for example the inseam of pants, the wheel size of a bicycle, or the gauge of a screw. Usually an exact measurement, but can also be a range of measurements for adjustable products, for example belts and ski bindings.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasMeasurementProp")]
pub enum HasMeasurementProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "HasMeasurementProp")]
impl TryFrom<SchemaValue> for HasMeasurementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMeasurementProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(HasMeasurementProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasMeasurementProp")]
impl TryFrom<&SchemaValue> for HasMeasurementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMeasurementProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(HasMeasurementProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The "spatial" property can be used in cases when more specific properties
/// (e.g. [locationCreated], [spatialCoverage], [contentLocation]) are not known to be appropriate.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SpatialProp")]
pub enum SpatialProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SpatialProp")]
impl TryFrom<SchemaValue> for SpatialProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpatialProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(SpatialProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SpatialProp")]
impl TryFrom<&SchemaValue> for SpatialProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SpatialProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(SpatialProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The catalog number for the release.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CatalogNumberProp")]
pub enum CatalogNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CatalogNumberProp")]
impl TryFrom<SchemaValue> for CatalogNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CatalogNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CatalogNumberProp")]
impl TryFrom<&SchemaValue> for CatalogNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CatalogNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Date of death.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DeathDateProp")]
pub enum DeathDateProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "DeathDateProp")]
impl TryFrom<SchemaValue> for DeathDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeathDateProp::Text(v)),
SchemaValue::Date(v) => Ok(DeathDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DeathDateProp")]
impl TryFrom<&SchemaValue> for DeathDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeathDateProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(DeathDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A type of sport (e.g. Baseball).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SportProp")]
pub enum SportProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "SportProp")]
impl TryFrom<SchemaValue> for SportProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SportProp::Text(v)),
SchemaValue::Url(v) => Ok(SportProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SportProp")]
impl TryFrom<&SchemaValue> for SportProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SportProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(SportProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The specific time described by a creative work, for works (e.g. articles, video objects etc.) that emphasise a particular moment within an Event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContentReferenceTimeProp")]
pub enum ContentReferenceTimeProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "ContentReferenceTimeProp")]
impl TryFrom<SchemaValue> for ContentReferenceTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContentReferenceTimeProp::Text(v)),
SchemaValue::DateTime(v) => Ok(ContentReferenceTimeProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContentReferenceTimeProp")]
impl TryFrom<&SchemaValue> for ContentReferenceTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContentReferenceTimeProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(ContentReferenceTimeProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AuthorProp")]
pub enum AuthorProp {
Organization(Organization),
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "AuthorProp")]
impl TryFrom<SchemaValue> for AuthorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AuthorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AuthorProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AuthorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AuthorProp")]
impl TryFrom<&SchemaValue> for AuthorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AuthorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AuthorProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AuthorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The airport where the flight terminates.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArrivalAirportProp")]
pub enum ArrivalAirportProp {
Text(String),
Airport(Airport),
}
#[automatically_derived]
#[cfg(feature = "ArrivalAirportProp")]
impl TryFrom<SchemaValue> for ArrivalAirportProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalAirportProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Airport::try_from(v.clone()) { return Ok(ArrivalAirportProp::Airport(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArrivalAirportProp")]
impl TryFrom<&SchemaValue> for ArrivalAirportProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalAirportProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Airport::try_from(v.clone()) { return Ok(ArrivalAirportProp::Airport(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Represents a relationship between two geometries (or the places they represent), relating a containing geometry to a contained geometry. "a contains b iff no points of b lie in the exterior of a, and at least one point of the interior of b lies in the interior of a". As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoContainsProp")]
pub enum GeoContainsProp {
Text(String),
Place(Place),
GeospatialGeometry(GeospatialGeometry),
}
#[automatically_derived]
#[cfg(feature = "GeoContainsProp")]
impl TryFrom<SchemaValue> for GeoContainsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoContainsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoContainsProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoContainsProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoContainsProp")]
impl TryFrom<&SchemaValue> for GeoContainsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoContainsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoContainsProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoContainsProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The closing hour of the place or service on the given day(s) of the week.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ClosesProp")]
pub enum ClosesProp {
Text(String),
Time(String),
}
#[automatically_derived]
#[cfg(feature = "ClosesProp")]
impl TryFrom<SchemaValue> for ClosesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ClosesProp::Text(v)),
SchemaValue::Time(v) => Ok(ClosesProp::Time(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ClosesProp")]
impl TryFrom<&SchemaValue> for ClosesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ClosesProp::Text(v.clone())),
SchemaValue::Time(v) => Ok(ClosesProp::Time(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The International Standard Recording Code for the recording.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsrcCodeProp")]
pub enum IsrcCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IsrcCodeProp")]
impl TryFrom<SchemaValue> for IsrcCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsrcCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsrcCodeProp")]
impl TryFrom<&SchemaValue> for IsrcCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsrcCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The task that a player-controlled character, or group of characters may complete in order to gain a reward.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "QuestProp")]
pub enum QuestProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "QuestProp")]
impl TryFrom<SchemaValue> for QuestProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(QuestProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(QuestProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "QuestProp")]
impl TryFrom<&SchemaValue> for QuestProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(QuestProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(QuestProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An option available on this contact point (e.g. a toll-free number or support for hearing-impaired callers).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContactOptionProp")]
pub enum ContactOptionProp {
ContactPointOption(ContactPointOption),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ContactOptionProp")]
impl TryFrom<SchemaValue> for ContactOptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContactOptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPointOption::try_from(v.clone()) { return Ok(ContactOptionProp::ContactPointOption(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContactOptionProp")]
impl TryFrom<&SchemaValue> for ContactOptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContactOptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPointOption::try_from(v.clone()) { return Ok(ContactOptionProp::ContactPointOption(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Drugs that affect the test's results.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AffectedByProp")]
pub enum AffectedByProp {
Drug(Drug),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AffectedByProp")]
impl TryFrom<SchemaValue> for AffectedByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AffectedByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Drug::try_from(v.clone()) { return Ok(AffectedByProp::Drug(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AffectedByProp")]
impl TryFrom<&SchemaValue> for AffectedByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AffectedByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Drug::try_from(v.clone()) { return Ok(AffectedByProp::Drug(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The total number of forward gears available for the transmission system of the vehicle.
///
/// Typical unit code(s): C62
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfForwardGearsProp")]
pub enum NumberOfForwardGearsProp {
Text(String),
QuantitativeValue(QuantitativeValue),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "NumberOfForwardGearsProp")]
impl TryFrom<SchemaValue> for NumberOfForwardGearsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfForwardGearsProp::Text(v)),
SchemaValue::Number(v) => Ok(NumberOfForwardGearsProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfForwardGearsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfForwardGearsProp")]
impl TryFrom<&SchemaValue> for NumberOfForwardGearsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfForwardGearsProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(NumberOfForwardGearsProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfForwardGearsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Item(s) being shipped.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItemShippedProp")]
pub enum ItemShippedProp {
Product(Product),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ItemShippedProp")]
impl TryFrom<SchemaValue> for ItemShippedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemShippedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(ItemShippedProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItemShippedProp")]
impl TryFrom<&SchemaValue> for ItemShippedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemShippedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(ItemShippedProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// One of a set of differential diagnoses for the condition. Specifically, a closely-related or competing diagnosis typically considered later in the cognitive process whereby this medical condition is distinguished from others most likely responsible for a similar collection of signs and symptoms to reach the most parsimonious diagnosis or diagnoses in a patient.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DifferentialDiagnosisProp")]
pub enum DifferentialDiagnosisProp {
Text(String),
DDxElement(DDxElement),
}
#[automatically_derived]
#[cfg(feature = "DifferentialDiagnosisProp")]
impl TryFrom<SchemaValue> for DifferentialDiagnosisProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DifferentialDiagnosisProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DDxElement::try_from(v.clone()) { return Ok(DifferentialDiagnosisProp::DDxElement(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DifferentialDiagnosisProp")]
impl TryFrom<&SchemaValue> for DifferentialDiagnosisProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DifferentialDiagnosisProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DDxElement::try_from(v.clone()) { return Ok(DifferentialDiagnosisProp::DDxElement(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Used to tag an item to be intended or suitable for consumption or use by adults only.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasAdultConsiderationProp")]
pub enum HasAdultConsiderationProp {
Text(String),
AdultOrientedEnumeration(AdultOrientedEnumeration),
}
#[automatically_derived]
#[cfg(feature = "HasAdultConsiderationProp")]
impl TryFrom<SchemaValue> for HasAdultConsiderationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasAdultConsiderationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdultOrientedEnumeration::try_from(v.clone()) { return Ok(HasAdultConsiderationProp::AdultOrientedEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasAdultConsiderationProp")]
impl TryFrom<&SchemaValue> for HasAdultConsiderationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasAdultConsiderationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdultOrientedEnumeration::try_from(v.clone()) { return Ok(HasAdultConsiderationProp::AdultOrientedEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A link to the page containing the comments of the CreativeWork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DiscussionUrlProp")]
pub enum DiscussionUrlProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "DiscussionUrlProp")]
impl TryFrom<SchemaValue> for DiscussionUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiscussionUrlProp::Text(v)),
SchemaValue::Url(v) => Ok(DiscussionUrlProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DiscussionUrlProp")]
impl TryFrom<&SchemaValue> for DiscussionUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiscussionUrlProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(DiscussionUrlProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Text of a notice appropriate for describing the copyright aspects of this Creative Work, ideally indicating the owner of the copyright for the Work.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CopyrightNoticeProp")]
pub enum CopyrightNoticeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CopyrightNoticeProp")]
impl TryFrom<SchemaValue> for CopyrightNoticeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CopyrightNoticeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CopyrightNoticeProp")]
impl TryFrom<&SchemaValue> for CopyrightNoticeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CopyrightNoticeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The muscle whose action counteracts the specified muscle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AntagonistProp")]
pub enum AntagonistProp {
Muscle(Muscle),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AntagonistProp")]
impl TryFrom<SchemaValue> for AntagonistProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AntagonistProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Muscle::try_from(v.clone()) { return Ok(AntagonistProp::Muscle(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AntagonistProp")]
impl TryFrom<&SchemaValue> for AntagonistProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AntagonistProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Muscle::try_from(v.clone()) { return Ok(AntagonistProp::Muscle(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceding zero. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "Gtin13Prop")]
pub enum Gtin13Prop {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "Gtin13Prop")]
impl TryFrom<SchemaValue> for Gtin13Prop {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Gtin13Prop::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "Gtin13Prop")]
impl TryFrom<&SchemaValue> for Gtin13Prop {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Gtin13Prop::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The default value of the input. For properties that expect a literal, the default is a literal value, for properties that expect an object, it's an ID reference to one of the current values.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DefaultValueProp")]
pub enum DefaultValueProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DefaultValueProp")]
impl TryFrom<SchemaValue> for DefaultValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DefaultValueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(DefaultValueProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DefaultValueProp")]
impl TryFrom<&SchemaValue> for DefaultValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DefaultValueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(DefaultValueProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Text of an utterances (spoken words, lyrics etc.) that occurs at a certain section of a media object, represented as a [HyperTocEntry].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UtterancesProp")]
pub enum UtterancesProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "UtterancesProp")]
impl TryFrom<SchemaValue> for UtterancesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UtterancesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UtterancesProp")]
impl TryFrom<&SchemaValue> for UtterancesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UtterancesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates something directly or indirectly funded or sponsored through a [Grant]. See also [ownershipFundingInfo].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FundedItemProp")]
pub enum FundedItemProp {
CreativeWork(CreativeWork),
Person(Person),
BioChemEntity(BioChemEntity),
Text(String),
MedicalEntity(MedicalEntity),
Event(Event),
Organization(Organization),
Product(Product),
}
#[automatically_derived]
#[cfg(feature = "FundedItemProp")]
impl TryFrom<SchemaValue> for FundedItemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FundedItemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(FundedItemProp::CreativeWork(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FundedItemProp::Person(object)) }
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(FundedItemProp::BioChemEntity(object)) }
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(FundedItemProp::MedicalEntity(object)) }
if let Ok(object) = Event::try_from(v.clone()) { return Ok(FundedItemProp::Event(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(FundedItemProp::Organization(object)) }
if let Ok(object) = Product::try_from(v.clone()) { return Ok(FundedItemProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FundedItemProp")]
impl TryFrom<&SchemaValue> for FundedItemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FundedItemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(FundedItemProp::CreativeWork(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FundedItemProp::Person(object)) }
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(FundedItemProp::BioChemEntity(object)) }
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(FundedItemProp::MedicalEntity(object)) }
if let Ok(object) = Event::try_from(v.clone()) { return Ok(FundedItemProp::Event(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(FundedItemProp::Organization(object)) }
if let Ok(object) = Product::try_from(v.clone()) { return Ok(FundedItemProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the party responsible for generating and publishing the current structured data markup, typically in cases where the structured data is derived automatically from existing published content but published on a different site. For example, student projects and open data initiatives often re-publish existing content with more explicitly structured metadata. The
/// [sdPublisher] property helps make such practices more explicit.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SdPublisherProp")]
pub enum SdPublisherProp {
Person(Person),
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SdPublisherProp")]
impl TryFrom<SchemaValue> for SdPublisherProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SdPublisherProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SdPublisherProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SdPublisherProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SdPublisherProp")]
impl TryFrom<&SchemaValue> for SdPublisherProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SdPublisherProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SdPublisherProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SdPublisherProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Medical audience for page.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MedicalAudienceProp")]
pub enum MedicalAudienceProp {
MedicalAudience(MedicalAudience),
Text(String),
MedicalAudienceType(MedicalAudienceType),
}
#[automatically_derived]
#[cfg(feature = "MedicalAudienceProp")]
impl TryFrom<SchemaValue> for MedicalAudienceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MedicalAudienceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalAudience::try_from(v.clone()) { return Ok(MedicalAudienceProp::MedicalAudience(object)) }
if let Ok(object) = MedicalAudienceType::try_from(v.clone()) { return Ok(MedicalAudienceProp::MedicalAudienceType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MedicalAudienceProp")]
impl TryFrom<&SchemaValue> for MedicalAudienceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MedicalAudienceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalAudience::try_from(v.clone()) { return Ok(MedicalAudienceProp::MedicalAudience(object)) }
if let Ok(object) = MedicalAudienceType::try_from(v.clone()) { return Ok(MedicalAudienceProp::MedicalAudienceType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A [callsign](https://en.wikipedia.org/wiki/Call_sign), as used in broadcasting and radio communications to identify people, radio and TV stations, or vehicles.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CallSignProp")]
pub enum CallSignProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CallSignProp")]
impl TryFrom<SchemaValue> for CallSignProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CallSignProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CallSignProp")]
impl TryFrom<&SchemaValue> for CallSignProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CallSignProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Represents a relationship between two geometries (or the places they represent), relating a geometry to one that contains it, i.e. it is inside (i.e. within) its interior. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoWithinProp")]
pub enum GeoWithinProp {
GeospatialGeometry(GeospatialGeometry),
Text(String),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "GeoWithinProp")]
impl TryFrom<SchemaValue> for GeoWithinProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoWithinProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoWithinProp::GeospatialGeometry(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoWithinProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoWithinProp")]
impl TryFrom<&SchemaValue> for GeoWithinProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoWithinProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoWithinProp::GeospatialGeometry(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoWithinProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The bitrate of the media object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BitrateProp")]
pub enum BitrateProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BitrateProp")]
impl TryFrom<SchemaValue> for BitrateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BitrateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BitrateProp")]
impl TryFrom<&SchemaValue> for BitrateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BitrateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Languages in which subtitles/captions are available, in [IETF BCP 47 standard format](http://tools.ietf.org/html/bcp47).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SubtitleLanguageProp")]
pub enum SubtitleLanguageProp {
Language(Language),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SubtitleLanguageProp")]
impl TryFrom<SchemaValue> for SubtitleLanguageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubtitleLanguageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Language::try_from(v.clone()) { return Ok(SubtitleLanguageProp::Language(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SubtitleLanguageProp")]
impl TryFrom<&SchemaValue> for SubtitleLanguageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubtitleLanguageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Language::try_from(v.clone()) { return Ok(SubtitleLanguageProp::Language(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A short textual code (also called "store code") that uniquely identifies a place of business. The code is typically assigned by the parentOrganization and used in structured URLs.
///
/// For example, in the URL http://www.starbucks.co.uk/store-locator/etc/detail/3047 the code "3047" is a branchCode for a particular branch.
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BranchCodeProp")]
pub enum BranchCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BranchCodeProp")]
impl TryFrom<SchemaValue> for BranchCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BranchCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BranchCodeProp")]
impl TryFrom<&SchemaValue> for BranchCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BranchCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UnitCodeProp")]
pub enum UnitCodeProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "UnitCodeProp")]
impl TryFrom<SchemaValue> for UnitCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(UnitCodeProp::Url(v)),
SchemaValue::Text(v) => Ok(UnitCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UnitCodeProp")]
impl TryFrom<&SchemaValue> for UnitCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(UnitCodeProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(UnitCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The underlying innervation associated with the muscle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NerveProp")]
pub enum NerveProp {
Text(String),
Nerve(Nerve),
}
#[automatically_derived]
#[cfg(feature = "NerveProp")]
impl TryFrom<SchemaValue> for NerveProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NerveProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Nerve::try_from(v.clone()) { return Ok(NerveProp::Nerve(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NerveProp")]
impl TryFrom<&SchemaValue> for NerveProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NerveProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Nerve::try_from(v.clone()) { return Ok(NerveProp::Nerve(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The station where the train trip ends.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArrivalStationProp")]
pub enum ArrivalStationProp {
Text(String),
TrainStation(TrainStation),
}
#[automatically_derived]
#[cfg(feature = "ArrivalStationProp")]
impl TryFrom<SchemaValue> for ArrivalStationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalStationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TrainStation::try_from(v.clone()) { return Ok(ArrivalStationProp::TrainStation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArrivalStationProp")]
impl TryFrom<&SchemaValue> for ArrivalStationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalStationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TrainStation::try_from(v.clone()) { return Ok(ArrivalStationProp::TrainStation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CodeProp")]
pub enum CodeProp {
Text(String),
MedicalCode(MedicalCode),
}
#[automatically_derived]
#[cfg(feature = "CodeProp")]
impl TryFrom<SchemaValue> for CodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCode::try_from(v.clone()) { return Ok(CodeProp::MedicalCode(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CodeProp")]
impl TryFrom<&SchemaValue> for CodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCode::try_from(v.clone()) { return Ok(CodeProp::MedicalCode(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Media type, typically MIME format (see [IANA site](http://www.iana.org/assignments/media-types/media-types.xhtml)) of the content, e.g. application/zip of a SoftwareApplication binary. In cases where a CreativeWork has several media type representations, 'encoding' can be used to indicate each MediaObject alongside particular fileFormat information. Unregistered or niche file formats can be indicated instead via the most appropriate URL, e.g. defining Web page or a Wikipedia entry.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FileFormatProp")]
pub enum FileFormatProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FileFormatProp")]
impl TryFrom<SchemaValue> for FileFormatProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(FileFormatProp::Url(v)),
SchemaValue::Text(v) => Ok(FileFormatProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FileFormatProp")]
impl TryFrom<&SchemaValue> for FileFormatProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(FileFormatProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(FileFormatProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CategoryProp")]
pub enum CategoryProp {
Url(String),
Text(String),
PhysicalActivityCategory(PhysicalActivityCategory),
Thing(Thing),
CategoryCode(CategoryCode),
}
#[automatically_derived]
#[cfg(feature = "CategoryProp")]
impl TryFrom<SchemaValue> for CategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CategoryProp::Url(v)),
SchemaValue::Text(v) => Ok(CategoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PhysicalActivityCategory::try_from(v.clone()) { return Ok(CategoryProp::PhysicalActivityCategory(object)) }
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(CategoryProp::Thing(object)) }
if let Ok(object) = CategoryCode::try_from(v.clone()) { return Ok(CategoryProp::CategoryCode(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CategoryProp")]
impl TryFrom<&SchemaValue> for CategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CategoryProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(CategoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PhysicalActivityCategory::try_from(v.clone()) { return Ok(CategoryProp::PhysicalActivityCategory(object)) }
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(CategoryProp::Thing(object)) }
if let Ok(object) = CategoryCode::try_from(v.clone()) { return Ok(CategoryProp::CategoryCode(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A refund type, from an enumerated list.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RefundTypeProp")]
pub enum RefundTypeProp {
Text(String),
RefundTypeEnumeration(RefundTypeEnumeration),
}
#[automatically_derived]
#[cfg(feature = "RefundTypeProp")]
impl TryFrom<SchemaValue> for RefundTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RefundTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RefundTypeEnumeration::try_from(v.clone()) { return Ok(RefundTypeProp::RefundTypeEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RefundTypeProp")]
impl TryFrom<&SchemaValue> for RefundTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RefundTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RefundTypeEnumeration::try_from(v.clone()) { return Ok(RefundTypeProp::RefundTypeEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A diagnostic test or procedure offered by this lab.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailableTestProp")]
pub enum AvailableTestProp {
Text(String),
MedicalTest(MedicalTest),
}
#[automatically_derived]
#[cfg(feature = "AvailableTestProp")]
impl TryFrom<SchemaValue> for AvailableTestProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableTestProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTest::try_from(v.clone()) { return Ok(AvailableTestProp::MedicalTest(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailableTestProp")]
impl TryFrom<&SchemaValue> for AvailableTestProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableTestProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTest::try_from(v.clone()) { return Ok(AvailableTestProp::MedicalTest(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of instrument. The query used on this action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "QueryProp")]
pub enum QueryProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "QueryProp")]
impl TryFrom<SchemaValue> for QueryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(QueryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "QueryProp")]
impl TryFrom<&SchemaValue> for QueryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(QueryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The product that this structured value is referring to.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TypeOfGoodProp")]
pub enum TypeOfGoodProp {
Product(Product),
Service(Service),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TypeOfGoodProp")]
impl TryFrom<SchemaValue> for TypeOfGoodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TypeOfGoodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(TypeOfGoodProp::Product(object)) }
if let Ok(object) = Service::try_from(v.clone()) { return Ok(TypeOfGoodProp::Service(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TypeOfGoodProp")]
impl TryFrom<&SchemaValue> for TypeOfGoodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TypeOfGoodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(TypeOfGoodProp::Product(object)) }
if let Ok(object) = Service::try_from(v.clone()) { return Ok(TypeOfGoodProp::Service(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The key, mode, or scale this composition uses.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MusicalKeyProp")]
pub enum MusicalKeyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MusicalKeyProp")]
impl TryFrom<SchemaValue> for MusicalKeyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicalKeyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MusicalKeyProp")]
impl TryFrom<&SchemaValue> for MusicalKeyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicalKeyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// collectiondate - Date for which patient counts are reported.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdCollectionDateProp")]
pub enum CvdCollectionDateProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "CvdCollectionDateProp")]
impl TryFrom<SchemaValue> for CvdCollectionDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdCollectionDateProp::Text(v)),
SchemaValue::DateTime(v) => Ok(CvdCollectionDateProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdCollectionDateProp")]
impl TryFrom<&SchemaValue> for CvdCollectionDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdCollectionDateProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(CvdCollectionDateProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Specifies a Web page or service by URL, for product returns.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MerchantReturnLinkProp")]
pub enum MerchantReturnLinkProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "MerchantReturnLinkProp")]
impl TryFrom<SchemaValue> for MerchantReturnLinkProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MerchantReturnLinkProp::Text(v)),
SchemaValue::Url(v) => Ok(MerchantReturnLinkProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MerchantReturnLinkProp")]
impl TryFrom<&SchemaValue> for MerchantReturnLinkProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MerchantReturnLinkProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(MerchantReturnLinkProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The location of the reserved seat (e.g., 27).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SeatNumberProp")]
pub enum SeatNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SeatNumberProp")]
impl TryFrom<SchemaValue> for SeatNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeatNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SeatNumberProp")]
impl TryFrom<&SchemaValue> for SeatNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeatNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An episode of a TV/radio series or season.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EpisodesProp")]
pub enum EpisodesProp {
Episode(Episode),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EpisodesProp")]
impl TryFrom<SchemaValue> for EpisodesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EpisodesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Episode::try_from(v.clone()) { return Ok(EpisodesProp::Episode(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EpisodesProp")]
impl TryFrom<&SchemaValue> for EpisodesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EpisodesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Episode::try_from(v.clone()) { return Ok(EpisodesProp::Episode(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Device used to perform the test.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UsesDeviceProp")]
pub enum UsesDeviceProp {
MedicalDevice(MedicalDevice),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "UsesDeviceProp")]
impl TryFrom<SchemaValue> for UsesDeviceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UsesDeviceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalDevice::try_from(v.clone()) { return Ok(UsesDeviceProp::MedicalDevice(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UsesDeviceProp")]
impl TryFrom<&SchemaValue> for UsesDeviceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UsesDeviceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalDevice::try_from(v.clone()) { return Ok(UsesDeviceProp::MedicalDevice(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A person that acts in a coaching role for a sports team.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CoachProp")]
pub enum CoachProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "CoachProp")]
impl TryFrom<SchemaValue> for CoachProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CoachProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CoachProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CoachProp")]
impl TryFrom<&SchemaValue> for CoachProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CoachProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CoachProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A defined range of postal codes.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PostalCodeRangeProp")]
pub enum PostalCodeRangeProp {
Text(String),
PostalCodeRangeSpecification(PostalCodeRangeSpecification),
}
#[automatically_derived]
#[cfg(feature = "PostalCodeRangeProp")]
impl TryFrom<SchemaValue> for PostalCodeRangeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostalCodeRangeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalCodeRangeSpecification::try_from(v.clone()) { return Ok(PostalCodeRangeProp::PostalCodeRangeSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PostalCodeRangeProp")]
impl TryFrom<&SchemaValue> for PostalCodeRangeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostalCodeRangeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalCodeRangeSpecification::try_from(v.clone()) { return Ok(PostalCodeRangeProp::PostalCodeRangeSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A pointer to another, functionally similar product (or multiple products).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsSimilarToProp")]
pub enum IsSimilarToProp {
Text(String),
Product(Product),
Service(Service),
}
#[automatically_derived]
#[cfg(feature = "IsSimilarToProp")]
impl TryFrom<SchemaValue> for IsSimilarToProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsSimilarToProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsSimilarToProp::Product(object)) }
if let Ok(object) = Service::try_from(v.clone()) { return Ok(IsSimilarToProp::Service(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsSimilarToProp")]
impl TryFrom<&SchemaValue> for IsSimilarToProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsSimilarToProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsSimilarToProp::Product(object)) }
if let Ok(object) = Service::try_from(v.clone()) { return Ok(IsSimilarToProp::Service(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The title of the job.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TitleProp")]
pub enum TitleProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TitleProp")]
impl TryFrom<SchemaValue> for TitleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TitleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TitleProp")]
impl TryFrom<&SchemaValue> for TitleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TitleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of grams of carbohydrates.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CarbohydrateContentProp")]
pub enum CarbohydrateContentProp {
Mass(Mass),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CarbohydrateContentProp")]
impl TryFrom<SchemaValue> for CarbohydrateContentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CarbohydrateContentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(CarbohydrateContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CarbohydrateContentProp")]
impl TryFrom<&SchemaValue> for CarbohydrateContentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CarbohydrateContentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(CarbohydrateContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The drive wheel configuration, i.e. which roadwheels will receive torque from the vehicle's engine via the drivetrain.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DriveWheelConfigurationProp")]
pub enum DriveWheelConfigurationProp {
DriveWheelConfigurationValue(DriveWheelConfigurationValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DriveWheelConfigurationProp")]
impl TryFrom<SchemaValue> for DriveWheelConfigurationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DriveWheelConfigurationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DriveWheelConfigurationValue::try_from(v.clone()) { return Ok(DriveWheelConfigurationProp::DriveWheelConfigurationValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DriveWheelConfigurationProp")]
impl TryFrom<&SchemaValue> for DriveWheelConfigurationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DriveWheelConfigurationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DriveWheelConfigurationValue::try_from(v.clone()) { return Ok(DriveWheelConfigurationProp::DriveWheelConfigurationValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of location. The specific food event where the action occurred.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FoodEventProp")]
pub enum FoodEventProp {
FoodEvent(FoodEvent),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FoodEventProp")]
impl TryFrom<SchemaValue> for FoodEventProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoodEventProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = FoodEvent::try_from(v.clone()) { return Ok(FoodEventProp::FoodEvent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FoodEventProp")]
impl TryFrom<&SchemaValue> for FoodEventProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoodEventProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = FoodEvent::try_from(v.clone()) { return Ok(FoodEventProp::FoodEvent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of rooms (excluding bathrooms and closets) of the accommodation or lodging business.
/// Typical unit code(s): ROM for room or C62 for no unit. The type of room can be put in the unitText property of the QuantitativeValue.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfRoomsProp")]
pub enum NumberOfRoomsProp {
Number(f64),
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfRoomsProp")]
impl TryFrom<SchemaValue> for NumberOfRoomsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfRoomsProp::Number(v)),
SchemaValue::Text(v) => Ok(NumberOfRoomsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfRoomsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfRoomsProp")]
impl TryFrom<&SchemaValue> for NumberOfRoomsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(NumberOfRoomsProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(NumberOfRoomsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfRoomsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Date order was placed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OrderDateProp")]
pub enum OrderDateProp {
Text(String),
DateTime(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "OrderDateProp")]
impl TryFrom<SchemaValue> for OrderDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderDateProp::Text(v)),
SchemaValue::DateTime(v) => Ok(OrderDateProp::DateTime(v)),
SchemaValue::Date(v) => Ok(OrderDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OrderDateProp")]
impl TryFrom<&SchemaValue> for OrderDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderDateProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(OrderDateProp::DateTime(v.clone())),
SchemaValue::Date(v) => Ok(OrderDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The rate of coinsurance expressed as a number between 0.0 and 1.0.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanCoinsuranceRateProp")]
pub enum HealthPlanCoinsuranceRateProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanCoinsuranceRateProp")]
impl TryFrom<SchemaValue> for HealthPlanCoinsuranceRateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanCoinsuranceRateProp::Text(v)),
SchemaValue::Number(v) => Ok(HealthPlanCoinsuranceRateProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanCoinsuranceRateProp")]
impl TryFrom<&SchemaValue> for HealthPlanCoinsuranceRateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanCoinsuranceRateProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(HealthPlanCoinsuranceRateProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of instrument. The method of delivery.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DeliveryMethodProp")]
pub enum DeliveryMethodProp {
DeliveryMethod(DeliveryMethod),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DeliveryMethodProp")]
impl TryFrom<SchemaValue> for DeliveryMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeliveryMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryMethod::try_from(v.clone()) { return Ok(DeliveryMethodProp::DeliveryMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DeliveryMethodProp")]
impl TryFrom<&SchemaValue> for DeliveryMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeliveryMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryMethod::try_from(v.clone()) { return Ok(DeliveryMethodProp::DeliveryMethod(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type(s) of customers for which the given offer is valid.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EligibleCustomerTypeProp")]
pub enum EligibleCustomerTypeProp {
Text(String),
BusinessEntityType(BusinessEntityType),
}
#[automatically_derived]
#[cfg(feature = "EligibleCustomerTypeProp")]
impl TryFrom<SchemaValue> for EligibleCustomerTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibleCustomerTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BusinessEntityType::try_from(v.clone()) { return Ok(EligibleCustomerTypeProp::BusinessEntityType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EligibleCustomerTypeProp")]
impl TryFrom<&SchemaValue> for EligibleCustomerTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibleCustomerTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BusinessEntityType::try_from(v.clone()) { return Ok(EligibleCustomerTypeProp::BusinessEntityType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Tissue, organ, biological sample, etc in which activity of this gene has been observed experimentally. For example brain, digestive system.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExpressedInProp")]
pub enum ExpressedInProp {
AnatomicalSystem(AnatomicalSystem),
BioChemEntity(BioChemEntity),
AnatomicalStructure(AnatomicalStructure),
Text(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "ExpressedInProp")]
impl TryFrom<SchemaValue> for ExpressedInProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpressedInProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(ExpressedInProp::AnatomicalSystem(object)) }
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(ExpressedInProp::BioChemEntity(object)) }
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(ExpressedInProp::AnatomicalStructure(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(ExpressedInProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExpressedInProp")]
impl TryFrom<&SchemaValue> for ExpressedInProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpressedInProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalSystem::try_from(v.clone()) { return Ok(ExpressedInProp::AnatomicalSystem(object)) }
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(ExpressedInProp::BioChemEntity(object)) }
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(ExpressedInProp::AnatomicalStructure(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(ExpressedInProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PotentialActionProp")]
pub enum PotentialActionProp {
Text(String),
Action(Action),
}
#[automatically_derived]
#[cfg(feature = "PotentialActionProp")]
impl TryFrom<SchemaValue> for PotentialActionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PotentialActionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Action::try_from(v.clone()) { return Ok(PotentialActionProp::Action(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PotentialActionProp")]
impl TryFrom<&SchemaValue> for PotentialActionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PotentialActionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Action::try_from(v.clone()) { return Ok(PotentialActionProp::Action(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FuelTypeProp")]
pub enum FuelTypeProp {
Text(String),
QualitativeValue(QualitativeValue),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "FuelTypeProp")]
impl TryFrom<SchemaValue> for FuelTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FuelTypeProp::Text(v)),
SchemaValue::Url(v) => Ok(FuelTypeProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(FuelTypeProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FuelTypeProp")]
impl TryFrom<&SchemaValue> for FuelTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FuelTypeProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(FuelTypeProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(FuelTypeProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A subgrouping of the menu (by dishes, course, serving time period, etc.).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasMenuSectionProp")]
pub enum HasMenuSectionProp {
MenuSection(MenuSection),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasMenuSectionProp")]
impl TryFrom<SchemaValue> for HasMenuSectionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMenuSectionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MenuSection::try_from(v.clone()) { return Ok(HasMenuSectionProp::MenuSection(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasMenuSectionProp")]
impl TryFrom<&SchemaValue> for HasMenuSectionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMenuSectionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MenuSection::try_from(v.clone()) { return Ok(HasMenuSectionProp::MenuSection(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of bed to which the BedDetail refers, i.e. the type of bed available in the quantity indicated by quantity.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TypeOfBedProp")]
pub enum TypeOfBedProp {
Text(String),
BedType(BedType),
}
#[automatically_derived]
#[cfg(feature = "TypeOfBedProp")]
impl TryFrom<SchemaValue> for TypeOfBedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TypeOfBedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BedType::try_from(v.clone()) { return Ok(TypeOfBedProp::BedType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TypeOfBedProp")]
impl TryFrom<&SchemaValue> for TypeOfBedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TypeOfBedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BedType::try_from(v.clone()) { return Ok(TypeOfBedProp::BedType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A financial aid type or program which students may use to pay for tuition or fees associated with the program.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FinancialAidEligibleProp")]
pub enum FinancialAidEligibleProp {
Text(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "FinancialAidEligibleProp")]
impl TryFrom<SchemaValue> for FinancialAidEligibleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FinancialAidEligibleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(FinancialAidEligibleProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FinancialAidEligibleProp")]
impl TryFrom<&SchemaValue> for FinancialAidEligibleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FinancialAidEligibleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(FinancialAidEligibleProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A link to the ListItem that precedes the current one.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PreviousItemProp")]
pub enum PreviousItemProp {
Text(String),
ListItem(ListItem),
}
#[automatically_derived]
#[cfg(feature = "PreviousItemProp")]
impl TryFrom<SchemaValue> for PreviousItemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PreviousItemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ListItem::try_from(v.clone()) { return Ok(PreviousItemProp::ListItem(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PreviousItemProp")]
impl TryFrom<&SchemaValue> for PreviousItemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PreviousItemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ListItem::try_from(v.clone()) { return Ok(PreviousItemProp::ListItem(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Identifies input methods that are sufficient to fully control the described resource. Values should be drawn from the [approved vocabulary](https://www.w3.org/2021/a11y-discov-vocab/latest/#accessibilityControl-vocabulary).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccessibilityControlProp")]
pub enum AccessibilityControlProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AccessibilityControlProp")]
impl TryFrom<SchemaValue> for AccessibilityControlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessibilityControlProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccessibilityControlProp")]
impl TryFrom<&SchemaValue> for AccessibilityControlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessibilityControlProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A director of e.g. TV, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DirectorProp")]
pub enum DirectorProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DirectorProp")]
impl TryFrom<SchemaValue> for DirectorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DirectorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(DirectorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DirectorProp")]
impl TryFrom<&SchemaValue> for DirectorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DirectorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(DirectorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The person or organization the reservation or ticket is for.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UnderNameProp")]
pub enum UnderNameProp {
Person(Person),
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "UnderNameProp")]
impl TryFrom<SchemaValue> for UnderNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UnderNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(UnderNameProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(UnderNameProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UnderNameProp")]
impl TryFrom<&SchemaValue> for UnderNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UnderNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(UnderNameProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(UnderNameProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of grams of fat.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FatContentProp")]
pub enum FatContentProp {
Mass(Mass),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FatContentProp")]
impl TryFrom<SchemaValue> for FatContentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FatContentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(FatContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FatContentProp")]
impl TryFrom<&SchemaValue> for FatContentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FatContentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(FatContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates that the vehicle meets the respective emission standard.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MeetsEmissionStandardProp")]
pub enum MeetsEmissionStandardProp {
Url(String),
QualitativeValue(QualitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MeetsEmissionStandardProp")]
impl TryFrom<SchemaValue> for MeetsEmissionStandardProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MeetsEmissionStandardProp::Url(v)),
SchemaValue::Text(v) => Ok(MeetsEmissionStandardProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(MeetsEmissionStandardProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MeetsEmissionStandardProp")]
impl TryFrom<&SchemaValue> for MeetsEmissionStandardProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MeetsEmissionStandardProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(MeetsEmissionStandardProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(MeetsEmissionStandardProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Cheat codes to the game.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CheatCodeProp")]
pub enum CheatCodeProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CheatCodeProp")]
impl TryFrom<SchemaValue> for CheatCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CheatCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(CheatCodeProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CheatCodeProp")]
impl TryFrom<&SchemaValue> for CheatCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CheatCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(CheatCodeProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Other co-agents that participated in the action indirectly. E.g. John wrote a book with *Steve*.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ParticipantProp")]
pub enum ParticipantProp {
Organization(Organization),
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ParticipantProp")]
impl TryFrom<SchemaValue> for ParticipantProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParticipantProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ParticipantProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ParticipantProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ParticipantProp")]
impl TryFrom<&SchemaValue> for ParticipantProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParticipantProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ParticipantProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ParticipantProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The value of a [QuantitativeValue] (including [Observation]) or property value node.
///
/// * For [QuantitativeValue] and [MonetaryAmount], the recommended type for values is 'Number'.
/// * For [PropertyValue], it can be 'Text', 'Number', 'Boolean', or 'StructuredValue'.
/// * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.
/// * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValueProp")]
pub enum ValueProp {
Number(f64),
StructuredValue(StructuredValue),
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "ValueProp")]
impl TryFrom<SchemaValue> for ValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(ValueProp::Number(v)),
SchemaValue::Text(v) => Ok(ValueProp::Text(v)),
SchemaValue::Boolean(v) => Ok(ValueProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = StructuredValue::try_from(v.clone()) { return Ok(ValueProp::StructuredValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValueProp")]
impl TryFrom<&SchemaValue> for ValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(ValueProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(ValueProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(ValueProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = StructuredValue::try_from(v.clone()) { return Ok(ValueProp::StructuredValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A license document that applies to this structured data, typically indicated by URL.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SdLicenseProp")]
pub enum SdLicenseProp {
Text(String),
Url(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "SdLicenseProp")]
impl TryFrom<SchemaValue> for SdLicenseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SdLicenseProp::Text(v)),
SchemaValue::Url(v) => Ok(SdLicenseProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(SdLicenseProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SdLicenseProp")]
impl TryFrom<&SchemaValue> for SdLicenseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SdLicenseProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(SdLicenseProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(SdLicenseProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Device required to run the application. Used in cases where a specific make/model is required to run the application.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailableOnDeviceProp")]
pub enum AvailableOnDeviceProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AvailableOnDeviceProp")]
impl TryFrom<SchemaValue> for AvailableOnDeviceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableOnDeviceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailableOnDeviceProp")]
impl TryFrom<&SchemaValue> for AvailableOnDeviceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableOnDeviceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The time it takes to actually cook the dish, in [ISO 8601 duration format](http://en.wikipedia.org/wiki/ISO_8601).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CookTimeProp")]
pub enum CookTimeProp {
Duration(Duration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CookTimeProp")]
impl TryFrom<SchemaValue> for CookTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CookTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(CookTimeProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CookTimeProp")]
impl TryFrom<&SchemaValue> for CookTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CookTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(CookTimeProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The legal value of this legislation file. The same legislation can be written in multiple files with different legal values. Typically a digitally signed PDF have a "stronger" legal value than the HTML file of the same act.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationLegalValueProp")]
pub enum LegislationLegalValueProp {
LegalValueLevel(LegalValueLevel),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LegislationLegalValueProp")]
impl TryFrom<SchemaValue> for LegislationLegalValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationLegalValueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = LegalValueLevel::try_from(v.clone()) { return Ok(LegislationLegalValueProp::LegalValueLevel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationLegalValueProp")]
impl TryFrom<&SchemaValue> for LegislationLegalValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationLegalValueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = LegalValueLevel::try_from(v.clone()) { return Ok(LegislationLegalValueProp::LegalValueLevel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Official rating of a piece of content—for example, 'MPAA PG-13'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContentRatingProp")]
pub enum ContentRatingProp {
Rating(Rating),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ContentRatingProp")]
impl TryFrom<SchemaValue> for ContentRatingProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContentRatingProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Rating::try_from(v.clone()) { return Ok(ContentRatingProp::Rating(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContentRatingProp")]
impl TryFrom<&SchemaValue> for ContentRatingProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContentRatingProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Rating::try_from(v.clone()) { return Ok(ContentRatingProp::Rating(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Classification of the album by its type of content: soundtrack, live album, studio album, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlbumProductionTypeProp")]
pub enum AlbumProductionTypeProp {
MusicAlbumProductionType(MusicAlbumProductionType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AlbumProductionTypeProp")]
impl TryFrom<SchemaValue> for AlbumProductionTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlbumProductionTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbumProductionType::try_from(v.clone()) { return Ok(AlbumProductionTypeProp::MusicAlbumProductionType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlbumProductionTypeProp")]
impl TryFrom<&SchemaValue> for AlbumProductionTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlbumProductionTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbumProductionType::try_from(v.clone()) { return Ok(AlbumProductionTypeProp::MusicAlbumProductionType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A description of the procedure involved in setting up, using, and/or installing the device.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProcedureProp")]
pub enum ProcedureProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProcedureProp")]
impl TryFrom<SchemaValue> for ProcedureProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProcedureProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProcedureProp")]
impl TryFrom<&SchemaValue> for ProcedureProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProcedureProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The condition, complication, etc. influenced by this factor.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncreasesRiskOfProp")]
pub enum IncreasesRiskOfProp {
Text(String),
MedicalEntity(MedicalEntity),
}
#[automatically_derived]
#[cfg(feature = "IncreasesRiskOfProp")]
impl TryFrom<SchemaValue> for IncreasesRiskOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncreasesRiskOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(IncreasesRiskOfProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncreasesRiskOfProp")]
impl TryFrom<&SchemaValue> for IncreasesRiskOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncreasesRiskOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(IncreasesRiskOfProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Any FDA or other warnings about the drug (text or URL).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WarningProp")]
pub enum WarningProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "WarningProp")]
impl TryFrom<SchemaValue> for WarningProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WarningProp::Text(v)),
SchemaValue::Url(v) => Ok(WarningProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WarningProp")]
impl TryFrom<&SchemaValue> for WarningProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WarningProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(WarningProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The caption for this object. For downloadable machine formats (closed caption, subtitles etc.) use MediaObject and indicate the [encodingFormat].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CaptionProp")]
pub enum CaptionProp {
Text(String),
MediaObject(MediaObject),
}
#[automatically_derived]
#[cfg(feature = "CaptionProp")]
impl TryFrom<SchemaValue> for CaptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CaptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(CaptionProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CaptionProp")]
impl TryFrom<&SchemaValue> for CaptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CaptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(CaptionProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The station from which the train departs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DepartureStationProp")]
pub enum DepartureStationProp {
TrainStation(TrainStation),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DepartureStationProp")]
impl TryFrom<SchemaValue> for DepartureStationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureStationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TrainStation::try_from(v.clone()) { return Ok(DepartureStationProp::TrainStation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DepartureStationProp")]
impl TryFrom<&SchemaValue> for DepartureStationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartureStationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TrainStation::try_from(v.clone()) { return Ok(DepartureStationProp::TrainStation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A minimum amount that has to be paid in every month.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccountMinimumInflowProp")]
pub enum AccountMinimumInflowProp {
Text(String),
MonetaryAmount(MonetaryAmount),
}
#[automatically_derived]
#[cfg(feature = "AccountMinimumInflowProp")]
impl TryFrom<SchemaValue> for AccountMinimumInflowProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccountMinimumInflowProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(AccountMinimumInflowProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccountMinimumInflowProp")]
impl TryFrom<&SchemaValue> for AccountMinimumInflowProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccountMinimumInflowProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(AccountMinimumInflowProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A description of the types of physical activity associated with the job. Defined terms such as those in O*net may be used, but note that there is no way to specify the level of ability as well as its nature when using a defined term.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PhysicalRequirementProp")]
pub enum PhysicalRequirementProp {
DefinedTerm(DefinedTerm),
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "PhysicalRequirementProp")]
impl TryFrom<SchemaValue> for PhysicalRequirementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PhysicalRequirementProp::Text(v)),
SchemaValue::Url(v) => Ok(PhysicalRequirementProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(PhysicalRequirementProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PhysicalRequirementProp")]
impl TryFrom<&SchemaValue> for PhysicalRequirementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PhysicalRequirementProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(PhysicalRequirementProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(PhysicalRequirementProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Identifies that this [Trip] is a subTrip of another Trip. For example Day 1, Day 2, etc. of a multi-day trip.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PartOfTripProp")]
pub enum PartOfTripProp {
Text(String),
Trip(Trip),
}
#[automatically_derived]
#[cfg(feature = "PartOfTripProp")]
impl TryFrom<SchemaValue> for PartOfTripProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfTripProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Trip::try_from(v.clone()) { return Ok(PartOfTripProp::Trip(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PartOfTripProp")]
impl TryFrom<&SchemaValue> for PartOfTripProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfTripProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Trip::try_from(v.clone()) { return Ok(PartOfTripProp::Trip(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The owner of the real estate property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LandlordProp")]
pub enum LandlordProp {
Person(Person),
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "LandlordProp")]
impl TryFrom<SchemaValue> for LandlordProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LandlordProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LandlordProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(LandlordProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LandlordProp")]
impl TryFrom<&SchemaValue> for LandlordProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LandlordProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LandlordProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(LandlordProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The geographic area where a permit or similar thing is valid.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValidInProp")]
pub enum ValidInProp {
Text(String),
AdministrativeArea(AdministrativeArea),
}
#[automatically_derived]
#[cfg(feature = "ValidInProp")]
impl TryFrom<SchemaValue> for ValidInProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValidInProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(ValidInProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValidInProp")]
impl TryFrom<&SchemaValue> for ValidInProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValidInProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(ValidInProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether the book is an abridged edition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AbridgedProp")]
pub enum AbridgedProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "AbridgedProp")]
impl TryFrom<SchemaValue> for AbridgedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AbridgedProp::Text(v)),
SchemaValue::Boolean(v) => Ok(AbridgedProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AbridgedProp")]
impl TryFrom<&SchemaValue> for AbridgedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AbridgedProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(AbridgedProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The participant/person/organization that bought the object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BuyerProp")]
pub enum BuyerProp {
Organization(Organization),
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BuyerProp")]
impl TryFrom<SchemaValue> for BuyerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BuyerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BuyerProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(BuyerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BuyerProp")]
impl TryFrom<&SchemaValue> for BuyerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BuyerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BuyerProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(BuyerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The most generic uni-directional social relation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FollowsProp")]
pub enum FollowsProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FollowsProp")]
impl TryFrom<SchemaValue> for FollowsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FollowsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FollowsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FollowsProp")]
impl TryFrom<&SchemaValue> for FollowsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FollowsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FollowsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of grams of unsaturated fat.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UnsaturatedFatContentProp")]
pub enum UnsaturatedFatContentProp {
Mass(Mass),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "UnsaturatedFatContentProp")]
impl TryFrom<SchemaValue> for UnsaturatedFatContentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UnsaturatedFatContentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(UnsaturatedFatContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UnsaturatedFatContentProp")]
impl TryFrom<&SchemaValue> for UnsaturatedFatContentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UnsaturatedFatContentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Mass::try_from(v.clone()) { return Ok(UnsaturatedFatContentProp::Mass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The delivery of the parcel related to this order or order item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OrderDeliveryProp")]
pub enum OrderDeliveryProp {
ParcelDelivery(ParcelDelivery),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OrderDeliveryProp")]
impl TryFrom<SchemaValue> for OrderDeliveryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderDeliveryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ParcelDelivery::try_from(v.clone()) { return Ok(OrderDeliveryProp::ParcelDelivery(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OrderDeliveryProp")]
impl TryFrom<&SchemaValue> for OrderDeliveryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderDeliveryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ParcelDelivery::try_from(v.clone()) { return Ok(OrderDeliveryProp::ParcelDelivery(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates data describing a hospital, e.g. a CDC [CDCPMDRecord] or as some kind of [Dataset].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthcareReportingDataProp")]
pub enum HealthcareReportingDataProp {
Text(String),
Dataset(Dataset),
CDCPMDRecord(CDCPMDRecord),
}
#[automatically_derived]
#[cfg(feature = "HealthcareReportingDataProp")]
impl TryFrom<SchemaValue> for HealthcareReportingDataProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthcareReportingDataProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Dataset::try_from(v.clone()) { return Ok(HealthcareReportingDataProp::Dataset(object)) }
if let Ok(object) = CDCPMDRecord::try_from(v.clone()) { return Ok(HealthcareReportingDataProp::CDCPMDRecord(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthcareReportingDataProp")]
impl TryFrom<&SchemaValue> for HealthcareReportingDataProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthcareReportingDataProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Dataset::try_from(v.clone()) { return Ok(HealthcareReportingDataProp::Dataset(object)) }
if let Ok(object) = CDCPMDRecord::try_from(v.clone()) { return Ok(HealthcareReportingDataProp::CDCPMDRecord(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// File size in (mega/kilo)bytes.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContentSizeProp")]
pub enum ContentSizeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ContentSizeProp")]
impl TryFrom<SchemaValue> for ContentSizeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContentSizeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContentSizeProp")]
impl TryFrom<&SchemaValue> for ContentSizeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContentSizeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A pointer to products or services sought by the organization or person (demand).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SeeksProp")]
pub enum SeeksProp {
Text(String),
Demand(Demand),
}
#[automatically_derived]
#[cfg(feature = "SeeksProp")]
impl TryFrom<SchemaValue> for SeeksProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeeksProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Demand::try_from(v.clone()) { return Ok(SeeksProp::Demand(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SeeksProp")]
impl TryFrom<&SchemaValue> for SeeksProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeeksProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Demand::try_from(v.clone()) { return Ok(SeeksProp::Demand(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of instrument. The exercise plan used on this action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExercisePlanProp")]
pub enum ExercisePlanProp {
ExercisePlan(ExercisePlan),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ExercisePlanProp")]
impl TryFrom<SchemaValue> for ExercisePlanProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExercisePlanProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ExercisePlan::try_from(v.clone()) { return Ok(ExercisePlanProp::ExercisePlan(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExercisePlanProp")]
impl TryFrom<&SchemaValue> for ExercisePlanProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExercisePlanProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ExercisePlan::try_from(v.clone()) { return Ok(ExercisePlanProp::ExercisePlan(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// This property links to all [UnitPriceSpecification] nodes that apply in parallel for the [CompoundPriceSpecification] node.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PriceComponentProp")]
pub enum PriceComponentProp {
UnitPriceSpecification(UnitPriceSpecification),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PriceComponentProp")]
impl TryFrom<SchemaValue> for PriceComponentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceComponentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = UnitPriceSpecification::try_from(v.clone()) { return Ok(PriceComponentProp::UnitPriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PriceComponentProp")]
impl TryFrom<&SchemaValue> for PriceComponentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PriceComponentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = UnitPriceSpecification::try_from(v.clone()) { return Ok(PriceComponentProp::UnitPriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The typical delay between the receipt of the order and the goods either leaving the warehouse or being prepared for pickup, in case the delivery method is on site pickup.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DeliveryLeadTimeProp")]
pub enum DeliveryLeadTimeProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "DeliveryLeadTimeProp")]
impl TryFrom<SchemaValue> for DeliveryLeadTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeliveryLeadTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(DeliveryLeadTimeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DeliveryLeadTimeProp")]
impl TryFrom<&SchemaValue> for DeliveryLeadTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeliveryLeadTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(DeliveryLeadTimeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Position of the episode within an ordered group of episodes.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EpisodeNumberProp")]
pub enum EpisodeNumberProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EpisodeNumberProp")]
impl TryFrom<SchemaValue> for EpisodeNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(EpisodeNumberProp::Integer(v)),
SchemaValue::Text(v) => Ok(EpisodeNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EpisodeNumberProp")]
impl TryFrom<&SchemaValue> for EpisodeNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(EpisodeNumberProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(EpisodeNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The service provided by this channel.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProvidesServiceProp")]
pub enum ProvidesServiceProp {
Text(String),
Service(Service),
}
#[automatically_derived]
#[cfg(feature = "ProvidesServiceProp")]
impl TryFrom<SchemaValue> for ProvidesServiceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProvidesServiceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Service::try_from(v.clone()) { return Ok(ProvidesServiceProp::Service(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProvidesServiceProp")]
impl TryFrom<&SchemaValue> for ProvidesServiceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProvidesServiceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Service::try_from(v.clone()) { return Ok(ProvidesServiceProp::Service(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The place where the Organization was founded.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FoundingLocationProp")]
pub enum FoundingLocationProp {
Text(String),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "FoundingLocationProp")]
impl TryFrom<SchemaValue> for FoundingLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoundingLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(FoundingLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FoundingLocationProp")]
impl TryFrom<&SchemaValue> for FoundingLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoundingLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(FoundingLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The target audience for this permit.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PermitAudienceProp")]
pub enum PermitAudienceProp {
Audience(Audience),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PermitAudienceProp")]
impl TryFrom<SchemaValue> for PermitAudienceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PermitAudienceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(PermitAudienceProp::Audience(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PermitAudienceProp")]
impl TryFrom<&SchemaValue> for PermitAudienceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PermitAudienceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(PermitAudienceProp::Audience(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The basic containment relation between a place and one that contains it.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContainedInPlaceProp")]
pub enum ContainedInPlaceProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ContainedInPlaceProp")]
impl TryFrom<SchemaValue> for ContainedInPlaceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContainedInPlaceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ContainedInPlaceProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContainedInPlaceProp")]
impl TryFrom<&SchemaValue> for ContainedInPlaceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContainedInPlaceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ContainedInPlaceProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Any additional component of the exercise prescription that may need to be articulated to the patient. This may include the order of exercises, the number of repetitions of movement, quantitative distance, progressions over time, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AdditionalVariableProp")]
pub enum AdditionalVariableProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AdditionalVariableProp")]
impl TryFrom<SchemaValue> for AdditionalVariableProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdditionalVariableProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AdditionalVariableProp")]
impl TryFrom<&SchemaValue> for AdditionalVariableProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdditionalVariableProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ModelProp")]
pub enum ModelProp {
ProductModel(ProductModel),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ModelProp")]
impl TryFrom<SchemaValue> for ModelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ModelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProductModel::try_from(v.clone()) { return Ok(ModelProp::ProductModel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ModelProp")]
impl TryFrom<&SchemaValue> for ModelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ModelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProductModel::try_from(v.clone()) { return Ok(ModelProp::ProductModel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The most generic familial relation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RelatedToProp")]
pub enum RelatedToProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RelatedToProp")]
impl TryFrom<SchemaValue> for RelatedToProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedToProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(RelatedToProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RelatedToProp")]
impl TryFrom<&SchemaValue> for RelatedToProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedToProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(RelatedToProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Status of a game server.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServerStatusProp")]
pub enum ServerStatusProp {
GameServerStatus(GameServerStatus),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ServerStatusProp")]
impl TryFrom<SchemaValue> for ServerStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServerStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GameServerStatus::try_from(v.clone()) { return Ok(ServerStatusProp::GameServerStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServerStatusProp")]
impl TryFrom<&SchemaValue> for ServerStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServerStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GameServerStatus::try_from(v.clone()) { return Ok(ServerStatusProp::GameServerStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Seasonal override of a return policy.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReturnPolicySeasonalOverrideProp")]
pub enum ReturnPolicySeasonalOverrideProp {
MerchantReturnPolicySeasonalOverride(MerchantReturnPolicySeasonalOverride),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReturnPolicySeasonalOverrideProp")]
impl TryFrom<SchemaValue> for ReturnPolicySeasonalOverrideProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnPolicySeasonalOverrideProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MerchantReturnPolicySeasonalOverride::try_from(v.clone()) { return Ok(ReturnPolicySeasonalOverrideProp::MerchantReturnPolicySeasonalOverride(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReturnPolicySeasonalOverrideProp")]
impl TryFrom<&SchemaValue> for ReturnPolicySeasonalOverrideProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnPolicySeasonalOverrideProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MerchantReturnPolicySeasonalOverride::try_from(v.clone()) { return Ok(ReturnPolicySeasonalOverrideProp::MerchantReturnPolicySeasonalOverride(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// If the file can be downloaded, URL to download the binary.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DownloadUrlProp")]
pub enum DownloadUrlProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "DownloadUrlProp")]
impl TryFrom<SchemaValue> for DownloadUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DownloadUrlProp::Text(v)),
SchemaValue::Url(v) => Ok(DownloadUrlProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DownloadUrlProp")]
impl TryFrom<&SchemaValue> for DownloadUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DownloadUrlProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(DownloadUrlProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Associated product/technology version. E.g., .NET Framework 4.5.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AssemblyVersionProp")]
pub enum AssemblyVersionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AssemblyVersionProp")]
impl TryFrom<SchemaValue> for AssemblyVersionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssemblyVersionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AssemblyVersionProp")]
impl TryFrom<&SchemaValue> for AssemblyVersionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssemblyVersionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The playlist to which this recording belongs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InPlaylistProp")]
pub enum InPlaylistProp {
MusicPlaylist(MusicPlaylist),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InPlaylistProp")]
impl TryFrom<SchemaValue> for InPlaylistProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InPlaylistProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicPlaylist::try_from(v.clone()) { return Ok(InPlaylistProp::MusicPlaylist(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InPlaylistProp")]
impl TryFrom<&SchemaValue> for InPlaylistProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InPlaylistProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicPlaylist::try_from(v.clone()) { return Ok(InPlaylistProp::MusicPlaylist(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A box is the area enclosed by the rectangle formed by two points. The first point is the lower corner, the second point is the upper corner. A box is expressed as two points separated by a space character.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BoxTypeProp")]
pub enum BoxTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BoxTypeProp")]
impl TryFrom<SchemaValue> for BoxTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BoxTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BoxTypeProp")]
impl TryFrom<&SchemaValue> for BoxTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BoxTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Length of the lease for some [Accommodation], either particular to some [Offer] or in some cases intrinsic to the property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LeaseLengthProp")]
pub enum LeaseLengthProp {
QuantitativeValue(QuantitativeValue),
Duration(Duration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LeaseLengthProp")]
impl TryFrom<SchemaValue> for LeaseLengthProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LeaseLengthProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(LeaseLengthProp::QuantitativeValue(object)) }
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(LeaseLengthProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LeaseLengthProp")]
impl TryFrom<&SchemaValue> for LeaseLengthProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LeaseLengthProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(LeaseLengthProp::QuantitativeValue(object)) }
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(LeaseLengthProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The post office box number for PO box addresses.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PostOfficeBoxNumberProp")]
pub enum PostOfficeBoxNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PostOfficeBoxNumberProp")]
impl TryFrom<SchemaValue> for PostOfficeBoxNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostOfficeBoxNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PostOfficeBoxNumberProp")]
impl TryFrom<&SchemaValue> for PostOfficeBoxNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostOfficeBoxNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The thing -- flight, event, restaurant, etc. being reserved.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReservationForProp")]
pub enum ReservationForProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReservationForProp")]
impl TryFrom<SchemaValue> for ReservationForProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReservationForProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ReservationForProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReservationForProp")]
impl TryFrom<&SchemaValue> for ReservationForProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReservationForProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ReservationForProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The status of payment; whether the invoice has been paid or not.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PaymentStatusProp")]
pub enum PaymentStatusProp {
PaymentStatusType(PaymentStatusType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PaymentStatusProp")]
impl TryFrom<SchemaValue> for PaymentStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PaymentStatusType::try_from(v.clone()) { return Ok(PaymentStatusProp::PaymentStatusType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PaymentStatusProp")]
impl TryFrom<&SchemaValue> for PaymentStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PaymentStatusType::try_from(v.clone()) { return Ok(PaymentStatusProp::PaymentStatusType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A short textual code that uniquely identifies the value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CodeValueProp")]
pub enum CodeValueProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CodeValueProp")]
impl TryFrom<SchemaValue> for CodeValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CodeValueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CodeValueProp")]
impl TryFrom<&SchemaValue> for CodeValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CodeValueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Cash, Credit Card, Cryptocurrency, Local Exchange Tradings System, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PaymentAcceptedProp")]
pub enum PaymentAcceptedProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PaymentAcceptedProp")]
impl TryFrom<SchemaValue> for PaymentAcceptedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentAcceptedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PaymentAcceptedProp")]
impl TryFrom<&SchemaValue> for PaymentAcceptedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentAcceptedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The object upon which the action is carried out, whose state is kept intact or changed. Also known as the semantic roles patient, affected or undergoer (which change their state) or theme (which doesn't). E.g. John read *a book*.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ObjectProp")]
pub enum ObjectProp {
Text(String),
Thing(Thing),
}
#[automatically_derived]
#[cfg(feature = "ObjectProp")]
impl TryFrom<SchemaValue> for ObjectProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ObjectProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ObjectProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ObjectProp")]
impl TryFrom<&SchemaValue> for ObjectProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ObjectProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ObjectProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The permitted total weight of the loaded vehicle, including passengers and cargo and the weight of the empty vehicle.
///
/// Typical unit code(s): KGM for kilogram, LBR for pound
///
/// * Note 1: You can indicate additional information in the [name] of the [QuantitativeValue] node.
/// * Note 2: You may also link to a [QualitativeValue] node that provides additional information using [valueReference].
/// * Note 3: Note that you can use [minValue] and [maxValue] to indicate ranges.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WeightTotalProp")]
pub enum WeightTotalProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "WeightTotalProp")]
impl TryFrom<SchemaValue> for WeightTotalProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WeightTotalProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(WeightTotalProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WeightTotalProp")]
impl TryFrom<&SchemaValue> for WeightTotalProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WeightTotalProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(WeightTotalProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The total price for the reservation or ticket, including applicable taxes, shipping, etc.
///
/// Usage guidelines:
///
/// * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.
/// * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TotalPriceProp")]
pub enum TotalPriceProp {
Number(f64),
PriceSpecification(PriceSpecification),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TotalPriceProp")]
impl TryFrom<SchemaValue> for TotalPriceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(TotalPriceProp::Number(v)),
SchemaValue::Text(v) => Ok(TotalPriceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(TotalPriceProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TotalPriceProp")]
impl TryFrom<&SchemaValue> for TotalPriceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(TotalPriceProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(TotalPriceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(TotalPriceProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The level in terms of progression through an educational or training context. Examples of educational levels include 'beginner', 'intermediate' or 'advanced', and formal sets of level indicators.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EducationalLevelProp")]
pub enum EducationalLevelProp {
Text(String),
DefinedTerm(DefinedTerm),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "EducationalLevelProp")]
impl TryFrom<SchemaValue> for EducationalLevelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalLevelProp::Text(v)),
SchemaValue::Url(v) => Ok(EducationalLevelProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(EducationalLevelProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EducationalLevelProp")]
impl TryFrom<&SchemaValue> for EducationalLevelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalLevelProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(EducationalLevelProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(EducationalLevelProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a post that is part of a [Blog]. Note that historically, what we term a "Blog" was once known as a "weblog", and that what we term a "BlogPosting" is now often colloquially referred to as a "blog".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BlogPostsProp")]
pub enum BlogPostsProp {
Text(String),
BlogPosting(BlogPosting),
}
#[automatically_derived]
#[cfg(feature = "BlogPostsProp")]
impl TryFrom<SchemaValue> for BlogPostsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BlogPostsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BlogPosting::try_from(v.clone()) { return Ok(BlogPostsProp::BlogPosting(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BlogPostsProp")]
impl TryFrom<&SchemaValue> for BlogPostsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BlogPostsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BlogPosting::try_from(v.clone()) { return Ok(BlogPostsProp::BlogPosting(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of instrument. The recipe/instructions used to perform the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecipeProp")]
pub enum RecipeProp {
Recipe(Recipe),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecipeProp")]
impl TryFrom<SchemaValue> for RecipeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Recipe::try_from(v.clone()) { return Ok(RecipeProp::Recipe(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecipeProp")]
impl TryFrom<&SchemaValue> for RecipeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Recipe::try_from(v.clone()) { return Ok(RecipeProp::Recipe(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The real estate agent involved in the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RealEstateAgentProp")]
pub enum RealEstateAgentProp {
RealEstateAgent(RealEstateAgent),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RealEstateAgentProp")]
impl TryFrom<SchemaValue> for RealEstateAgentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RealEstateAgentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RealEstateAgent::try_from(v.clone()) { return Ok(RealEstateAgentProp::RealEstateAgent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RealEstateAgentProp")]
impl TryFrom<&SchemaValue> for RealEstateAgentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RealEstateAgentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RealEstateAgent::try_from(v.clone()) { return Ok(RealEstateAgentProp::RealEstateAgent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Storage requirements (free space required).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StorageRequirementsProp")]
pub enum StorageRequirementsProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "StorageRequirementsProp")]
impl TryFrom<SchemaValue> for StorageRequirementsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StorageRequirementsProp::Text(v)),
SchemaValue::Url(v) => Ok(StorageRequirementsProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StorageRequirementsProp")]
impl TryFrom<&SchemaValue> for StorageRequirementsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StorageRequirementsProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(StorageRequirementsProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The branches that delineate from the nerve bundle. Not to be confused with [branchOf].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BranchProp")]
pub enum BranchProp {
AnatomicalStructure(AnatomicalStructure),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BranchProp")]
impl TryFrom<SchemaValue> for BranchProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BranchProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(BranchProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BranchProp")]
impl TryFrom<&SchemaValue> for BranchProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BranchProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(BranchProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Operating systems supported (Windows 7, OS X 10.6, Android 1.6).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OperatingSystemProp")]
pub enum OperatingSystemProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OperatingSystemProp")]
impl TryFrom<SchemaValue> for OperatingSystemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OperatingSystemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OperatingSystemProp")]
impl TryFrom<&SchemaValue> for OperatingSystemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OperatingSystemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The rating for the content.
///
/// Usage guidelines:
///
/// * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.
/// * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RatingValueProp")]
pub enum RatingValueProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "RatingValueProp")]
impl TryFrom<SchemaValue> for RatingValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RatingValueProp::Text(v)),
SchemaValue::Number(v) => Ok(RatingValueProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RatingValueProp")]
impl TryFrom<&SchemaValue> for RatingValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RatingValueProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(RatingValueProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the current disposition of the Action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ActionStatusProp")]
pub enum ActionStatusProp {
ActionStatusType(ActionStatusType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ActionStatusProp")]
impl TryFrom<SchemaValue> for ActionStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ActionStatusType::try_from(v.clone()) { return Ok(ActionStatusProp::ActionStatusType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ActionStatusProp")]
impl TryFrom<&SchemaValue> for ActionStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ActionStatusType::try_from(v.clone()) { return Ok(ActionStatusProp::ActionStatusType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The movement the muscle generates.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MuscleActionProp")]
pub enum MuscleActionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MuscleActionProp")]
impl TryFrom<SchemaValue> for MuscleActionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MuscleActionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MuscleActionProp")]
impl TryFrom<&SchemaValue> for MuscleActionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MuscleActionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of employees in an organization, e.g. business.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfEmployeesProp")]
pub enum NumberOfEmployeesProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfEmployeesProp")]
impl TryFrom<SchemaValue> for NumberOfEmployeesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfEmployeesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfEmployeesProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfEmployeesProp")]
impl TryFrom<&SchemaValue> for NumberOfEmployeesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfEmployeesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfEmployeesProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of calories.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CaloriesProp")]
pub enum CaloriesProp {
Energy(Energy),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CaloriesProp")]
impl TryFrom<SchemaValue> for CaloriesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CaloriesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Energy::try_from(v.clone()) { return Ok(CaloriesProp::Energy(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CaloriesProp")]
impl TryFrom<&SchemaValue> for CaloriesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CaloriesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Energy::try_from(v.clone()) { return Ok(CaloriesProp::Energy(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The permitted weight of a trailer attached to the vehicle.
///
/// Typical unit code(s): KGM for kilogram, LBR for pound
/// * Note 1: You can indicate additional information in the [name] of the [QuantitativeValue] node.
/// * Note 2: You may also link to a [QualitativeValue] node that provides additional information using [valueReference].
/// * Note 3: Note that you can use [minValue] and [maxValue] to indicate ranges.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TrailerWeightProp")]
pub enum TrailerWeightProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "TrailerWeightProp")]
impl TryFrom<SchemaValue> for TrailerWeightProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrailerWeightProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(TrailerWeightProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TrailerWeightProp")]
impl TryFrom<&SchemaValue> for TrailerWeightProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrailerWeightProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(TrailerWeightProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Assets required to secure loan or credit repayments. It may take form of third party pledge, goods, financial instruments (cash, securities, etc.)
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RequiredCollateralProp")]
pub enum RequiredCollateralProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RequiredCollateralProp")]
impl TryFrom<SchemaValue> for RequiredCollateralProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RequiredCollateralProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(RequiredCollateralProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RequiredCollateralProp")]
impl TryFrom<&SchemaValue> for RequiredCollateralProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RequiredCollateralProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(RequiredCollateralProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An associated [ClaimReview], related by specific common content, topic or claim. The expectation is that this property would be most typically used in cases where a single activity is conducting both claim reviews and media reviews, in which case [relatedMediaReview] would commonly be used on a [ClaimReview], while [relatedClaimReview] would be used on [MediaReview].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AssociatedClaimReviewProp")]
pub enum AssociatedClaimReviewProp {
Review(Review),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AssociatedClaimReviewProp")]
impl TryFrom<SchemaValue> for AssociatedClaimReviewProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedClaimReviewProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(AssociatedClaimReviewProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AssociatedClaimReviewProp")]
impl TryFrom<&SchemaValue> for AssociatedClaimReviewProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssociatedClaimReviewProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Review::try_from(v.clone()) { return Ok(AssociatedClaimReviewProp::Review(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A Global Trade Item Number ([GTIN](https://www.gs1.org/standards/id-keys/gtin)). GTINs identify trade items, including products and services, using numeric identification codes.
///
/// The GS1 [digital link specifications](https://www.gs1.org/standards/Digital-Link/) express GTINs as URLs (URIs, IRIs, etc.). Details including regular expression examples can be found in, Section 6 of the GS1 URI Syntax specification; see also [schema.org tracking issue](https://github.com/schemaorg/schemaorg/issues/3156#issuecomment-1209522809) for schema.org-specific discussion. A correct [gtin] value should be a valid GTIN, which means that it should be an all-numeric string of either 8, 12, 13 or 14 digits, or a "GS1 Digital Link" URL based on such a string. The numeric component should also have a [valid GS1 check digit](https://www.gs1.org/services/check-digit-calculator) and meet the other rules for valid GTINs. See also [GS1's GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) and [Wikipedia](https://en.wikipedia.org/wiki/Global_Trade_Item_Number) for more details. Left-padding of the gtin values is not required or encouraged. The [gtin] property generalizes the earlier [gtin8], [gtin12], [gtin13], and [gtin14] properties.
///
/// Note also that this is a definition for how to include GTINs in Schema.org data, and not a definition of GTINs in general - see the GS1 documentation for authoritative details.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GtinProp")]
pub enum GtinProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "GtinProp")]
impl TryFrom<SchemaValue> for GtinProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GtinProp::Text(v)),
SchemaValue::Url(v) => Ok(GtinProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GtinProp")]
impl TryFrom<&SchemaValue> for GtinProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GtinProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(GtinProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The location of, for example, where an event is happening, where an organization is located, or where an action takes place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LocationProp")]
pub enum LocationProp {
PostalAddress(PostalAddress),
Text(String),
Place(Place),
VirtualLocation(VirtualLocation),
}
#[automatically_derived]
#[cfg(feature = "LocationProp")]
impl TryFrom<SchemaValue> for LocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(LocationProp::PostalAddress(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(LocationProp::Place(object)) }
if let Ok(object) = VirtualLocation::try_from(v.clone()) { return Ok(LocationProp::VirtualLocation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LocationProp")]
impl TryFrom<&SchemaValue> for LocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(LocationProp::PostalAddress(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(LocationProp::Place(object)) }
if let Ok(object) = VirtualLocation::try_from(v.clone()) { return Ok(LocationProp::VirtualLocation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A possible unexpected and unfavorable evolution of a medical condition. Complications may include worsening of the signs or symptoms of the disease, extension of the condition to other organ systems, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PossibleComplicationProp")]
pub enum PossibleComplicationProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PossibleComplicationProp")]
impl TryFrom<SchemaValue> for PossibleComplicationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PossibleComplicationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PossibleComplicationProp")]
impl TryFrom<&SchemaValue> for PossibleComplicationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PossibleComplicationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The passenger's sequence number as assigned by the airline.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PassengerSequenceNumberProp")]
pub enum PassengerSequenceNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PassengerSequenceNumberProp")]
impl TryFrom<SchemaValue> for PassengerSequenceNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PassengerSequenceNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PassengerSequenceNumberProp")]
impl TryFrom<&SchemaValue> for PassengerSequenceNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PassengerSequenceNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Specifies a regular expression for testing literal values according to the HTML spec.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ValuePatternProp")]
pub enum ValuePatternProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ValuePatternProp")]
impl TryFrom<SchemaValue> for ValuePatternProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValuePatternProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ValuePatternProp")]
impl TryFrom<&SchemaValue> for ValuePatternProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ValuePatternProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The size group (also known as "size type") for a product's size. Size groups are common in the fashion industry to define size segments and suggested audiences for wearable products. Multiple values can be combined, for example "men's big and tall", "petite maternity" or "regular"
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SizeGroupProp")]
pub enum SizeGroupProp {
SizeGroupEnumeration(SizeGroupEnumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SizeGroupProp")]
impl TryFrom<SchemaValue> for SizeGroupProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SizeGroupProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SizeGroupEnumeration::try_from(v.clone()) { return Ok(SizeGroupProp::SizeGroupEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SizeGroupProp")]
impl TryFrom<&SchemaValue> for SizeGroupProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SizeGroupProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SizeGroupEnumeration::try_from(v.clone()) { return Ok(SizeGroupProp::SizeGroupEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type of procedure, for example Surgical, Noninvasive, or Percutaneous.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProcedureTypeProp")]
pub enum ProcedureTypeProp {
MedicalProcedureType(MedicalProcedureType),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProcedureTypeProp")]
impl TryFrom<SchemaValue> for ProcedureTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProcedureTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalProcedureType::try_from(v.clone()) { return Ok(ProcedureTypeProp::MedicalProcedureType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProcedureTypeProp")]
impl TryFrom<&SchemaValue> for ProcedureTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProcedureTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalProcedureType::try_from(v.clone()) { return Ok(ProcedureTypeProp::MedicalProcedureType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The currency accepted.
///
/// Use standard formats: [ISO 4217 currency format](http://en.wikipedia.org/wiki/ISO_4217), e.g. "USD"; [Ticker symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for cryptocurrencies, e.g. "BTC"; well known names for [Local Exchange Trading Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system) (LETS) and other currency types, e.g. "Ithaca HOUR".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CurrenciesAcceptedProp")]
pub enum CurrenciesAcceptedProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CurrenciesAcceptedProp")]
impl TryFrom<SchemaValue> for CurrenciesAcceptedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CurrenciesAcceptedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CurrenciesAcceptedProp")]
impl TryFrom<&SchemaValue> for CurrenciesAcceptedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CurrenciesAcceptedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The Dun & Bradstreet DUNS number for identifying an organization or business person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DunsProp")]
pub enum DunsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DunsProp")]
impl TryFrom<SchemaValue> for DunsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DunsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DunsProp")]
impl TryFrom<&SchemaValue> for DunsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DunsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A medical condition associated with this anatomy.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RelatedConditionProp")]
pub enum RelatedConditionProp {
MedicalCondition(MedicalCondition),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RelatedConditionProp")]
impl TryFrom<SchemaValue> for RelatedConditionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedConditionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCondition::try_from(v.clone()) { return Ok(RelatedConditionProp::MedicalCondition(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RelatedConditionProp")]
impl TryFrom<&SchemaValue> for RelatedConditionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelatedConditionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalCondition::try_from(v.clone()) { return Ok(RelatedConditionProp::MedicalCondition(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The units of an active ingredient's strength, e.g. mg.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "StrengthUnitProp")]
pub enum StrengthUnitProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "StrengthUnitProp")]
impl TryFrom<SchemaValue> for StrengthUnitProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StrengthUnitProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "StrengthUnitProp")]
impl TryFrom<&SchemaValue> for StrengthUnitProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(StrengthUnitProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicate how many people can play this game (minimum, maximum, or range).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfPlayersProp")]
pub enum NumberOfPlayersProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "NumberOfPlayersProp")]
impl TryFrom<SchemaValue> for NumberOfPlayersProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfPlayersProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfPlayersProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfPlayersProp")]
impl TryFrom<&SchemaValue> for NumberOfPlayersProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfPlayersProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfPlayersProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The value of the dose, e.g. 500.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DoseValueProp")]
pub enum DoseValueProp {
Text(String),
Number(f64),
QualitativeValue(QualitativeValue),
}
#[automatically_derived]
#[cfg(feature = "DoseValueProp")]
impl TryFrom<SchemaValue> for DoseValueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DoseValueProp::Text(v)),
SchemaValue::Number(v) => Ok(DoseValueProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(DoseValueProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DoseValueProp")]
impl TryFrom<&SchemaValue> for DoseValueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DoseValueProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(DoseValueProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(DoseValueProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The characteristics of associated patients, such as age, gender, race etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EpidemiologyProp")]
pub enum EpidemiologyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EpidemiologyProp")]
impl TryFrom<SchemaValue> for EpidemiologyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EpidemiologyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EpidemiologyProp")]
impl TryFrom<&SchemaValue> for EpidemiologyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EpidemiologyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Link to prescribing information for the drug.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PrescribingInfoProp")]
pub enum PrescribingInfoProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PrescribingInfoProp")]
impl TryFrom<SchemaValue> for PrescribingInfoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(PrescribingInfoProp::Url(v)),
SchemaValue::Text(v) => Ok(PrescribingInfoProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PrescribingInfoProp")]
impl TryFrom<&SchemaValue> for PrescribingInfoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(PrescribingInfoProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(PrescribingInfoProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DiagramProp")]
pub enum DiagramProp {
ImageObject(ImageObject),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DiagramProp")]
impl TryFrom<SchemaValue> for DiagramProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiagramProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(DiagramProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DiagramProp")]
impl TryFrom<&SchemaValue> for DiagramProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiagramProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(DiagramProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Nationality of the person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NationalityProp")]
pub enum NationalityProp {
Country(Country),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NationalityProp")]
impl TryFrom<SchemaValue> for NationalityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NationalityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Country::try_from(v.clone()) { return Ok(NationalityProp::Country(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NationalityProp")]
impl TryFrom<&SchemaValue> for NationalityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NationalityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Country::try_from(v.clone()) { return Ok(NationalityProp::Country(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A description of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DescriptionProp")]
pub enum DescriptionProp {
TextObject(TextObject),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DescriptionProp")]
impl TryFrom<SchemaValue> for DescriptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DescriptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TextObject::try_from(v.clone()) { return Ok(DescriptionProp::TextObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DescriptionProp")]
impl TryFrom<&SchemaValue> for DescriptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DescriptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TextObject::try_from(v.clone()) { return Ok(DescriptionProp::TextObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Responsibilities associated with this role or Occupation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ResponsibilitiesProp")]
pub enum ResponsibilitiesProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ResponsibilitiesProp")]
impl TryFrom<SchemaValue> for ResponsibilitiesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ResponsibilitiesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ResponsibilitiesProp")]
impl TryFrom<&SchemaValue> for ResponsibilitiesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ResponsibilitiesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The type of engine or engines powering the vehicle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EngineTypeProp")]
pub enum EngineTypeProp {
Text(String),
Url(String),
QualitativeValue(QualitativeValue),
}
#[automatically_derived]
#[cfg(feature = "EngineTypeProp")]
impl TryFrom<SchemaValue> for EngineTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EngineTypeProp::Text(v)),
SchemaValue::Url(v) => Ok(EngineTypeProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(EngineTypeProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EngineTypeProp")]
impl TryFrom<&SchemaValue> for EngineTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EngineTypeProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(EngineTypeProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(EngineTypeProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of location. The course where this action was taken.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CourseProp")]
pub enum CourseProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CourseProp")]
impl TryFrom<SchemaValue> for CourseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CourseProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(CourseProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CourseProp")]
impl TryFrom<&SchemaValue> for CourseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CourseProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(CourseProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The floor level for an [Accommodation] in a multi-storey building. Since counting
/// systems [vary internationally](https://en.wikipedia.org/wiki/Storey#Consecutive_number_floor_designations), the local system should be used where possible.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FloorLevelProp")]
pub enum FloorLevelProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FloorLevelProp")]
impl TryFrom<SchemaValue> for FloorLevelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FloorLevelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FloorLevelProp")]
impl TryFrom<&SchemaValue> for FloorLevelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FloorLevelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Minimal age of the child.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ChildMinAgeProp")]
pub enum ChildMinAgeProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ChildMinAgeProp")]
impl TryFrom<SchemaValue> for ChildMinAgeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(ChildMinAgeProp::Number(v)),
SchemaValue::Text(v) => Ok(ChildMinAgeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ChildMinAgeProp")]
impl TryFrom<&SchemaValue> for ChildMinAgeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(ChildMinAgeProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(ChildMinAgeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether it is allowed to smoke in the place, e.g. in the restaurant, hotel or hotel room.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SmokingAllowedProp")]
pub enum SmokingAllowedProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SmokingAllowedProp")]
impl TryFrom<SchemaValue> for SmokingAllowedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(SmokingAllowedProp::Boolean(v)),
SchemaValue::Text(v) => Ok(SmokingAllowedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SmokingAllowedProp")]
impl TryFrom<&SchemaValue> for SmokingAllowedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(SmokingAllowedProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(SmokingAllowedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Typical or recommended followup care after the procedure is performed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FollowupProp")]
pub enum FollowupProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FollowupProp")]
impl TryFrom<SchemaValue> for FollowupProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FollowupProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FollowupProp")]
impl TryFrom<&SchemaValue> for FollowupProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FollowupProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Description of what changed in this version.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReleaseNotesProp")]
pub enum ReleaseNotesProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReleaseNotesProp")]
impl TryFrom<SchemaValue> for ReleaseNotesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ReleaseNotesProp::Url(v)),
SchemaValue::Text(v) => Ok(ReleaseNotesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReleaseNotesProp")]
impl TryFrom<&SchemaValue> for ReleaseNotesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(ReleaseNotesProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(ReleaseNotesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date/time at which the message has been read by the recipient if a single recipient exists.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DateReadProp")]
pub enum DateReadProp {
Text(String),
Date(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "DateReadProp")]
impl TryFrom<SchemaValue> for DateReadProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DateReadProp::Text(v)),
SchemaValue::Date(v) => Ok(DateReadProp::Date(v)),
SchemaValue::DateTime(v) => Ok(DateReadProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DateReadProp")]
impl TryFrom<&SchemaValue> for DateReadProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DateReadProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(DateReadProp::Date(v.clone())),
SchemaValue::DateTime(v) => Ok(DateReadProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether API is managed or unmanaged.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProgrammingModelProp")]
pub enum ProgrammingModelProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProgrammingModelProp")]
impl TryFrom<SchemaValue> for ProgrammingModelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgrammingModelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProgrammingModelProp")]
impl TryFrom<&SchemaValue> for ProgrammingModelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgrammingModelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of upvotes this question, answer or comment has received from the community.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UpvoteCountProp")]
pub enum UpvoteCountProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "UpvoteCountProp")]
impl TryFrom<SchemaValue> for UpvoteCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(UpvoteCountProp::Integer(v)),
SchemaValue::Text(v) => Ok(UpvoteCountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UpvoteCountProp")]
impl TryFrom<&SchemaValue> for UpvoteCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(UpvoteCountProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(UpvoteCountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The significance associated with the superficial anatomy; as an example, how characteristics of the superficial anatomy can suggest underlying medical conditions or courses of treatment.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SignificanceProp")]
pub enum SignificanceProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SignificanceProp")]
impl TryFrom<SchemaValue> for SignificanceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SignificanceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SignificanceProp")]
impl TryFrom<&SchemaValue> for SignificanceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SignificanceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Source of the data used to formulate the guidance, e.g. RCT, consensus opinion, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EvidenceOriginProp")]
pub enum EvidenceOriginProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EvidenceOriginProp")]
impl TryFrom<SchemaValue> for EvidenceOriginProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EvidenceOriginProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EvidenceOriginProp")]
impl TryFrom<&SchemaValue> for EvidenceOriginProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EvidenceOriginProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Defines a [Date] or [DateTime] during which a scheduled [Event] will not take place. The property allows exceptions to
/// a [Schedule] to be specified. If an exception is specified as a [DateTime] then only the event that would have started at that specific date and time
/// should be excluded from the schedule. If an exception is specified as a [Date] then any event that is scheduled for that 24 hour period should be
/// excluded from the schedule. This allows a whole day to be excluded from the schedule without having to itemise every scheduled event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExceptDateProp")]
pub enum ExceptDateProp {
Text(String),
DateTime(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "ExceptDateProp")]
impl TryFrom<SchemaValue> for ExceptDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExceptDateProp::Text(v)),
SchemaValue::DateTime(v) => Ok(ExceptDateProp::DateTime(v)),
SchemaValue::Date(v) => Ok(ExceptDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExceptDateProp")]
impl TryFrom<&SchemaValue> for ExceptDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExceptDateProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(ExceptDateProp::DateTime(v.clone())),
SchemaValue::Date(v) => Ok(ExceptDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A Defined Term contained in this term set.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasDefinedTermProp")]
pub enum HasDefinedTermProp {
Text(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "HasDefinedTermProp")]
impl TryFrom<SchemaValue> for HasDefinedTermProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasDefinedTermProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(HasDefinedTermProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasDefinedTermProp")]
impl TryFrom<&SchemaValue> for HasDefinedTermProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasDefinedTermProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(HasDefinedTermProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates an OfferCatalog listing for this Organization, Person, or Service.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasOfferCatalogProp")]
pub enum HasOfferCatalogProp {
OfferCatalog(OfferCatalog),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasOfferCatalogProp")]
impl TryFrom<SchemaValue> for HasOfferCatalogProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasOfferCatalogProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OfferCatalog::try_from(v.clone()) { return Ok(HasOfferCatalogProp::OfferCatalog(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasOfferCatalogProp")]
impl TryFrom<&SchemaValue> for HasOfferCatalogProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasOfferCatalogProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OfferCatalog::try_from(v.clone()) { return Ok(HasOfferCatalogProp::OfferCatalog(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// True if this item's name is a proprietary/brand name (vs. generic name).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsProprietaryProp")]
pub enum IsProprietaryProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IsProprietaryProp")]
impl TryFrom<SchemaValue> for IsProprietaryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(IsProprietaryProp::Boolean(v)),
SchemaValue::Text(v) => Ok(IsProprietaryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsProprietaryProp")]
impl TryFrom<&SchemaValue> for IsProprietaryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(IsProprietaryProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(IsProprietaryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The unique identifier for the bus.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BusNumberProp")]
pub enum BusNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BusNumberProp")]
impl TryFrom<SchemaValue> for BusNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BusNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BusNumberProp")]
impl TryFrom<&SchemaValue> for BusNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BusNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The year an [Accommodation] was constructed. This corresponds to the [YearBuilt field in RESO](https://ddwiki.reso.org/display/DDW17/YearBuilt+Field).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "YearBuiltProp")]
pub enum YearBuiltProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "YearBuiltProp")]
impl TryFrom<SchemaValue> for YearBuiltProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(YearBuiltProp::Text(v)),
SchemaValue::Number(v) => Ok(YearBuiltProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "YearBuiltProp")]
impl TryFrom<&SchemaValue> for YearBuiltProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(YearBuiltProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(YearBuiltProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The area to which the artery supplies blood.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SupplyToProp")]
pub enum SupplyToProp {
Text(String),
AnatomicalStructure(AnatomicalStructure),
}
#[automatically_derived]
#[cfg(feature = "SupplyToProp")]
impl TryFrom<SchemaValue> for SupplyToProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SupplyToProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(SupplyToProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SupplyToProp")]
impl TryFrom<&SchemaValue> for SupplyToProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SupplyToProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(SupplyToProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Order cutoff time allows merchants to describe the time after which they will no longer process orders received on that day. For orders processed after cutoff time, one day gets added to the delivery time estimate. This property is expected to be most typically used via the [ShippingRateSettings] publication pattern. The time is indicated using the ISO-8601 Time format, e.g. "23:30:00-05:00" would represent 6:30 pm Eastern Standard Time (EST) which is 5 hours behind Coordinated Universal Time (UTC).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CutoffTimeProp")]
pub enum CutoffTimeProp {
Text(String),
Time(String),
}
#[automatically_derived]
#[cfg(feature = "CutoffTimeProp")]
impl TryFrom<SchemaValue> for CutoffTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CutoffTimeProp::Text(v)),
SchemaValue::Time(v) => Ok(CutoffTimeProp::Time(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CutoffTimeProp")]
impl TryFrom<&SchemaValue> for CutoffTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CutoffTimeProp::Text(v.clone())),
SchemaValue::Time(v) => Ok(CutoffTimeProp::Time(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Description of benefits associated with the job.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BenefitsProp")]
pub enum BenefitsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BenefitsProp")]
impl TryFrom<SchemaValue> for BenefitsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BenefitsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BenefitsProp")]
impl TryFrom<&SchemaValue> for BenefitsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BenefitsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TrackProp")]
pub enum TrackProp {
MusicRecording(MusicRecording),
ItemList(ItemList),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TrackProp")]
impl TryFrom<SchemaValue> for TrackProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrackProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicRecording::try_from(v.clone()) { return Ok(TrackProp::MusicRecording(object)) }
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(TrackProp::ItemList(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TrackProp")]
impl TryFrom<&SchemaValue> for TrackProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TrackProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicRecording::try_from(v.clone()) { return Ok(TrackProp::MusicRecording(object)) }
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(TrackProp::ItemList(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BrandProp")]
pub enum BrandProp {
Brand(Brand),
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BrandProp")]
impl TryFrom<SchemaValue> for BrandProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BrandProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Brand::try_from(v.clone()) { return Ok(BrandProp::Brand(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BrandProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BrandProp")]
impl TryFrom<&SchemaValue> for BrandProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BrandProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Brand::try_from(v.clone()) { return Ok(BrandProp::Brand(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BrandProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifies specific carrier(s) requirements for the application (e.g. an application may only work on a specific carrier network).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CarrierRequirementsProp")]
pub enum CarrierRequirementsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CarrierRequirementsProp")]
impl TryFrom<SchemaValue> for CarrierRequirementsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CarrierRequirementsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CarrierRequirementsProp")]
impl TryFrom<&SchemaValue> for CarrierRequirementsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CarrierRequirementsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The serving size, in terms of the number of volume or mass.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServingSizeProp")]
pub enum ServingSizeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ServingSizeProp")]
impl TryFrom<SchemaValue> for ServingSizeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServingSizeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServingSizeProp")]
impl TryFrom<&SchemaValue> for ServingSizeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServingSizeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The actual body of the article.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArticleBodyProp")]
pub enum ArticleBodyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArticleBodyProp")]
impl TryFrom<SchemaValue> for ArticleBodyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArticleBodyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArticleBodyProp")]
impl TryFrom<&SchemaValue> for ArticleBodyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArticleBodyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The place(s) from which the offer can be obtained (e.g. store locations).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailableAtOrFromProp")]
pub enum AvailableAtOrFromProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AvailableAtOrFromProp")]
impl TryFrom<SchemaValue> for AvailableAtOrFromProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableAtOrFromProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(AvailableAtOrFromProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailableAtOrFromProp")]
impl TryFrom<&SchemaValue> for AvailableAtOrFromProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableAtOrFromProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(AvailableAtOrFromProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The tier(s) of drugs offered by this formulary or insurance plan.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanDrugTierProp")]
pub enum HealthPlanDrugTierProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanDrugTierProp")]
impl TryFrom<SchemaValue> for HealthPlanDrugTierProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanDrugTierProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanDrugTierProp")]
impl TryFrom<&SchemaValue> for HealthPlanDrugTierProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanDrugTierProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The type of security screening the passenger is subject to.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SecurityScreeningProp")]
pub enum SecurityScreeningProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SecurityScreeningProp")]
impl TryFrom<SchemaValue> for SecurityScreeningProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SecurityScreeningProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SecurityScreeningProp")]
impl TryFrom<&SchemaValue> for SecurityScreeningProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SecurityScreeningProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An organization that this person is affiliated with. For example, a school/university, a club, or a team.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AffiliationProp")]
pub enum AffiliationProp {
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "AffiliationProp")]
impl TryFrom<SchemaValue> for AffiliationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AffiliationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AffiliationProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AffiliationProp")]
impl TryFrom<&SchemaValue> for AffiliationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AffiliationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AffiliationProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An identifier for the method of payment used (e.g. the last 4 digits of the credit card).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PaymentMethodIdProp")]
pub enum PaymentMethodIdProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PaymentMethodIdProp")]
impl TryFrom<SchemaValue> for PaymentMethodIdProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentMethodIdProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PaymentMethodIdProp")]
impl TryFrom<&SchemaValue> for PaymentMethodIdProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentMethodIdProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The CreativeWork that captured all or part of this Event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecordedInProp")]
pub enum RecordedInProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecordedInProp")]
impl TryFrom<SchemaValue> for RecordedInProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecordedInProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(RecordedInProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecordedInProp")]
impl TryFrom<&SchemaValue> for RecordedInProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecordedInProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(RecordedInProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The item being described is intended to help a person learn the competency or learning outcome defined by the referenced term.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TeachesProp")]
pub enum TeachesProp {
Text(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "TeachesProp")]
impl TryFrom<SchemaValue> for TeachesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TeachesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(TeachesProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TeachesProp")]
impl TryFrom<&SchemaValue> for TeachesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TeachesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(TeachesProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An audio recording of the work.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecordedAsProp")]
pub enum RecordedAsProp {
MusicRecording(MusicRecording),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecordedAsProp")]
impl TryFrom<SchemaValue> for RecordedAsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecordedAsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicRecording::try_from(v.clone()) { return Ok(RecordedAsProp::MusicRecording(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecordedAsProp")]
impl TryFrom<&SchemaValue> for RecordedAsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecordedAsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicRecording::try_from(v.clone()) { return Ok(RecordedAsProp::MusicRecording(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The amount of work expected of students taking the course, often provided as a figure per week or per month, and may be broken down by type. For example, "2 hours of lectures, 1 hour of lab work and 3 hours of independent study per week".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CourseWorkloadProp")]
pub enum CourseWorkloadProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CourseWorkloadProp")]
impl TryFrom<SchemaValue> for CourseWorkloadProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CourseWorkloadProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CourseWorkloadProp")]
impl TryFrom<&SchemaValue> for CourseWorkloadProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CourseWorkloadProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The framework to which the resource being described is aligned.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EducationalFrameworkProp")]
pub enum EducationalFrameworkProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EducationalFrameworkProp")]
impl TryFrom<SchemaValue> for EducationalFrameworkProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalFrameworkProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EducationalFrameworkProp")]
impl TryFrom<&SchemaValue> for EducationalFrameworkProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalFrameworkProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An update to the LiveBlog.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LiveBlogUpdateProp")]
pub enum LiveBlogUpdateProp {
BlogPosting(BlogPosting),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LiveBlogUpdateProp")]
impl TryFrom<SchemaValue> for LiveBlogUpdateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LiveBlogUpdateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BlogPosting::try_from(v.clone()) { return Ok(LiveBlogUpdateProp::BlogPosting(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LiveBlogUpdateProp")]
impl TryFrom<&SchemaValue> for LiveBlogUpdateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LiveBlogUpdateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BlogPosting::try_from(v.clone()) { return Ok(LiveBlogUpdateProp::BlogPosting(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The language of the content or performance or used in an action. Please use one of the language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also [availableLanguage].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InLanguageProp")]
pub enum InLanguageProp {
Language(Language),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InLanguageProp")]
impl TryFrom<SchemaValue> for InLanguageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InLanguageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Language::try_from(v.clone()) { return Ok(InLanguageProp::Language(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InLanguageProp")]
impl TryFrom<&SchemaValue> for InLanguageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InLanguageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Language::try_from(v.clone()) { return Ok(InLanguageProp::Language(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DepartmentProp")]
pub enum DepartmentProp {
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "DepartmentProp")]
impl TryFrom<SchemaValue> for DepartmentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartmentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(DepartmentProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DepartmentProp")]
impl TryFrom<&SchemaValue> for DepartmentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DepartmentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(DepartmentProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether this content is family friendly.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsFamilyFriendlyProp")]
pub enum IsFamilyFriendlyProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "IsFamilyFriendlyProp")]
impl TryFrom<SchemaValue> for IsFamilyFriendlyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsFamilyFriendlyProp::Text(v)),
SchemaValue::Boolean(v) => Ok(IsFamilyFriendlyProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsFamilyFriendlyProp")]
impl TryFrom<&SchemaValue> for IsFamilyFriendlyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsFamilyFriendlyProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(IsFamilyFriendlyProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An identifier for the legislation. This can be either a string-based identifier, like the CELEX at EU level or the NOR in France, or a web-based, URL/URI identifier, like an ELI (European Legislation Identifier) or an URN-Lex.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LegislationIdentifierProp")]
pub enum LegislationIdentifierProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "LegislationIdentifierProp")]
impl TryFrom<SchemaValue> for LegislationIdentifierProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationIdentifierProp::Text(v)),
SchemaValue::Url(v) => Ok(LegislationIdentifierProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LegislationIdentifierProp")]
impl TryFrom<&SchemaValue> for LegislationIdentifierProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LegislationIdentifierProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(LegislationIdentifierProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The most generic bi-directional social/work relation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "KnowsProp")]
pub enum KnowsProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "KnowsProp")]
impl TryFrom<SchemaValue> for KnowsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(KnowsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(KnowsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "KnowsProp")]
impl TryFrom<&SchemaValue> for KnowsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(KnowsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(KnowsProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// When a taxi will pick up a passenger or a rental car can be picked up.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PickupTimeProp")]
pub enum PickupTimeProp {
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PickupTimeProp")]
impl TryFrom<SchemaValue> for PickupTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(PickupTimeProp::DateTime(v)),
SchemaValue::Text(v) => Ok(PickupTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PickupTimeProp")]
impl TryFrom<&SchemaValue> for PickupTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(PickupTimeProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(PickupTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The rating given in this review. Note that reviews can themselves be rated. The ```reviewRating``` applies to rating given by the review. The [aggregateRating] property applies to the review itself, as a creative work.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReviewRatingProp")]
pub enum ReviewRatingProp {
Rating(Rating),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReviewRatingProp")]
impl TryFrom<SchemaValue> for ReviewRatingProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewRatingProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Rating::try_from(v.clone()) { return Ok(ReviewRatingProp::Rating(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReviewRatingProp")]
impl TryFrom<&SchemaValue> for ReviewRatingProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewRatingProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Rating::try_from(v.clone()) { return Ok(ReviewRatingProp::Rating(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An overdraft is an extension of credit from a lending institution when an account reaches zero. An overdraft allows the individual to continue withdrawing money even if the account has no funds in it. Basically the bank allows people to borrow a set amount of money.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccountOverdraftLimitProp")]
pub enum AccountOverdraftLimitProp {
Text(String),
MonetaryAmount(MonetaryAmount),
}
#[automatically_derived]
#[cfg(feature = "AccountOverdraftLimitProp")]
impl TryFrom<SchemaValue> for AccountOverdraftLimitProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccountOverdraftLimitProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(AccountOverdraftLimitProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccountOverdraftLimitProp")]
impl TryFrom<&SchemaValue> for AccountOverdraftLimitProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccountOverdraftLimitProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(AccountOverdraftLimitProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The reference quantity for which a certain price applies, e.g. 1 EUR per 4 kWh of electricity. This property is a replacement for unitOfMeasurement for the advanced cases where the price does not relate to a standard unit.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReferenceQuantityProp")]
pub enum ReferenceQuantityProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReferenceQuantityProp")]
impl TryFrom<SchemaValue> for ReferenceQuantityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReferenceQuantityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(ReferenceQuantityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReferenceQuantityProp")]
impl TryFrom<&SchemaValue> for ReferenceQuantityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReferenceQuantityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(ReferenceQuantityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The participant who is at the sending end of the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SenderProp")]
pub enum SenderProp {
Text(String),
Organization(Organization),
Person(Person),
Audience(Audience),
}
#[automatically_derived]
#[cfg(feature = "SenderProp")]
impl TryFrom<SchemaValue> for SenderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SenderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SenderProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SenderProp::Person(object)) }
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(SenderProp::Audience(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SenderProp")]
impl TryFrom<&SchemaValue> for SenderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SenderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SenderProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SenderProp::Person(object)) }
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(SenderProp::Audience(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The publishing division which published the comic.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PublisherImprintProp")]
pub enum PublisherImprintProp {
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "PublisherImprintProp")]
impl TryFrom<SchemaValue> for PublisherImprintProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublisherImprintProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(PublisherImprintProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PublisherImprintProp")]
impl TryFrom<&SchemaValue> for PublisherImprintProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublisherImprintProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(PublisherImprintProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Defines the week(s) of the month on which a recurring Event takes place. Specified as an Integer between 1-5. For clarity, byMonthWeek is best used in conjunction with byDay to indicate concepts like the first and third Mondays of a month.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ByMonthWeekProp")]
pub enum ByMonthWeekProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "ByMonthWeekProp")]
impl TryFrom<SchemaValue> for ByMonthWeekProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ByMonthWeekProp::Text(v)),
SchemaValue::Integer(v) => Ok(ByMonthWeekProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ByMonthWeekProp")]
impl TryFrom<&SchemaValue> for ByMonthWeekProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ByMonthWeekProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(ByMonthWeekProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Description of benefits associated with the job.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "JobBenefitsProp")]
pub enum JobBenefitsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "JobBenefitsProp")]
impl TryFrom<SchemaValue> for JobBenefitsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobBenefitsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "JobBenefitsProp")]
impl TryFrom<&SchemaValue> for JobBenefitsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobBenefitsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An organizer of an Event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OrganizerProp")]
pub enum OrganizerProp {
Text(String),
Organization(Organization),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "OrganizerProp")]
impl TryFrom<SchemaValue> for OrganizerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrganizerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(OrganizerProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(OrganizerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OrganizerProp")]
impl TryFrom<&SchemaValue> for OrganizerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrganizerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(OrganizerProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(OrganizerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// governmentBenefitsInfo provides information about government benefits associated with a SpecialAnnouncement.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GovernmentBenefitsInfoProp")]
pub enum GovernmentBenefitsInfoProp {
GovernmentService(GovernmentService),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GovernmentBenefitsInfoProp")]
impl TryFrom<SchemaValue> for GovernmentBenefitsInfoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GovernmentBenefitsInfoProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GovernmentService::try_from(v.clone()) { return Ok(GovernmentBenefitsInfoProp::GovernmentService(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GovernmentBenefitsInfoProp")]
impl TryFrom<&SchemaValue> for GovernmentBenefitsInfoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GovernmentBenefitsInfoProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GovernmentService::try_from(v.clone()) { return Ok(GovernmentBenefitsInfoProp::GovernmentService(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// This property is deprecated, alongside the UserInteraction types on which it depended.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InteractionCountProp")]
pub enum InteractionCountProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InteractionCountProp")]
impl TryFrom<SchemaValue> for InteractionCountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractionCountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InteractionCountProp")]
impl TryFrom<&SchemaValue> for InteractionCountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractionCountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The publisher of the creative work.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PublisherProp")]
pub enum PublisherProp {
Person(Person),
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PublisherProp")]
impl TryFrom<SchemaValue> for PublisherProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublisherProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(PublisherProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(PublisherProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PublisherProp")]
impl TryFrom<&SchemaValue> for PublisherProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PublisherProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(PublisherProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(PublisherProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A language someone may use with or at the item, service or place. Please use one of the language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also [inLanguage].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailableLanguageProp")]
pub enum AvailableLanguageProp {
Language(Language),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AvailableLanguageProp")]
impl TryFrom<SchemaValue> for AvailableLanguageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableLanguageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Language::try_from(v.clone()) { return Ok(AvailableLanguageProp::Language(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailableLanguageProp")]
impl TryFrom<&SchemaValue> for AvailableLanguageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableLanguageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Language::try_from(v.clone()) { return Ok(AvailableLanguageProp::Language(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Guidelines about quarantine rules, e.g. in the context of a pandemic.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "QuarantineGuidelinesProp")]
pub enum QuarantineGuidelinesProp {
WebContent(WebContent),
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "QuarantineGuidelinesProp")]
impl TryFrom<SchemaValue> for QuarantineGuidelinesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(QuarantineGuidelinesProp::Text(v)),
SchemaValue::Url(v) => Ok(QuarantineGuidelinesProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(QuarantineGuidelinesProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "QuarantineGuidelinesProp")]
impl TryFrom<&SchemaValue> for QuarantineGuidelinesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(QuarantineGuidelinesProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(QuarantineGuidelinesProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(QuarantineGuidelinesProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of object. A question.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "QuestionProp")]
pub enum QuestionProp {
Text(String),
Question(Question),
}
#[automatically_derived]
#[cfg(feature = "QuestionProp")]
impl TryFrom<SchemaValue> for QuestionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(QuestionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Question::try_from(v.clone()) { return Ok(QuestionProp::Question(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "QuestionProp")]
impl TryFrom<&SchemaValue> for QuestionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(QuestionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Question::try_from(v.clone()) { return Ok(QuestionProp::Question(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A Category code contained in this code set.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasCategoryCodeProp")]
pub enum HasCategoryCodeProp {
Text(String),
CategoryCode(CategoryCode),
}
#[automatically_derived]
#[cfg(feature = "HasCategoryCodeProp")]
impl TryFrom<SchemaValue> for HasCategoryCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasCategoryCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CategoryCode::try_from(v.clone()) { return Ok(HasCategoryCodeProp::CategoryCode(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasCategoryCodeProp")]
impl TryFrom<&SchemaValue> for HasCategoryCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasCategoryCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CategoryCode::try_from(v.clone()) { return Ok(HasCategoryCodeProp::CategoryCode(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of payments contractually required at origination to repay the loan. For monthly paying loans this is the number of months from the contractual first payment date to the maturity date.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfLoanPaymentsProp")]
pub enum NumberOfLoanPaymentsProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "NumberOfLoanPaymentsProp")]
impl TryFrom<SchemaValue> for NumberOfLoanPaymentsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfLoanPaymentsProp::Text(v)),
SchemaValue::Number(v) => Ok(NumberOfLoanPaymentsProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfLoanPaymentsProp")]
impl TryFrom<&SchemaValue> for NumberOfLoanPaymentsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfLoanPaymentsProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(NumberOfLoanPaymentsProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Other anatomical structures to which this structure is connected.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ConnectedToProp")]
pub enum ConnectedToProp {
AnatomicalStructure(AnatomicalStructure),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ConnectedToProp")]
impl TryFrom<SchemaValue> for ConnectedToProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ConnectedToProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(ConnectedToProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ConnectedToProp")]
impl TryFrom<&SchemaValue> for ConnectedToProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ConnectedToProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(ConnectedToProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The schema.org [usageInfo] property indicates further information about a [CreativeWork]. This property is applicable both to works that are freely available and to those that require payment or other transactions. It can reference additional information, e.g. community expectations on preferred linking and citation conventions, as well as purchasing details. For something that can be commercially licensed, usageInfo can provide detailed, resource-specific information about licensing options.
///
/// This property can be used alongside the license property which indicates license(s) applicable to some piece of content. The usageInfo property can provide information about other licensing options, e.g. acquiring commercial usage rights for an image that is also available under non-commercial creative commons licenses.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UsageInfoProp")]
pub enum UsageInfoProp {
Url(String),
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "UsageInfoProp")]
impl TryFrom<SchemaValue> for UsageInfoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(UsageInfoProp::Url(v)),
SchemaValue::Text(v) => Ok(UsageInfoProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(UsageInfoProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UsageInfoProp")]
impl TryFrom<&SchemaValue> for UsageInfoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(UsageInfoProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(UsageInfoProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(UsageInfoProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The region/country for which this occupational description is appropriate. Note that educational requirements and qualifications can vary between jurisdictions.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OccupationLocationProp")]
pub enum OccupationLocationProp {
AdministrativeArea(AdministrativeArea),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OccupationLocationProp")]
impl TryFrom<SchemaValue> for OccupationLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OccupationLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(OccupationLocationProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OccupationLocationProp")]
impl TryFrom<&SchemaValue> for OccupationLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OccupationLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(OccupationLocationProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The required quantity of the item(s).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RequiredQuantityProp")]
pub enum RequiredQuantityProp {
Number(f64),
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "RequiredQuantityProp")]
impl TryFrom<SchemaValue> for RequiredQuantityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(RequiredQuantityProp::Number(v)),
SchemaValue::Text(v) => Ok(RequiredQuantityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(RequiredQuantityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RequiredQuantityProp")]
impl TryFrom<&SchemaValue> for RequiredQuantityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(RequiredQuantityProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(RequiredQuantityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(RequiredQuantityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility. Values should be drawn from the [approved vocabulary](https://www.w3.org/2021/a11y-discov-vocab/latest/#accessibilityFeature-vocabulary).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccessibilityFeatureProp")]
pub enum AccessibilityFeatureProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AccessibilityFeatureProp")]
impl TryFrom<SchemaValue> for AccessibilityFeatureProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessibilityFeatureProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccessibilityFeatureProp")]
impl TryFrom<&SchemaValue> for AccessibilityFeatureProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccessibilityFeatureProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The category or type of credential being described, for example "degree”, “certificate”, “badge”, or more specific term.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CredentialCategoryProp")]
pub enum CredentialCategoryProp {
Url(String),
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CredentialCategoryProp")]
impl TryFrom<SchemaValue> for CredentialCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CredentialCategoryProp::Url(v)),
SchemaValue::Text(v) => Ok(CredentialCategoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(CredentialCategoryProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CredentialCategoryProp")]
impl TryFrom<&SchemaValue> for CredentialCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(CredentialCategoryProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(CredentialCategoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(CredentialCategoryProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A secondary title of the CreativeWork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlternativeHeadlineProp")]
pub enum AlternativeHeadlineProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AlternativeHeadlineProp")]
impl TryFrom<SchemaValue> for AlternativeHeadlineProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlternativeHeadlineProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlternativeHeadlineProp")]
impl TryFrom<&SchemaValue> for AlternativeHeadlineProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlternativeHeadlineProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The unit in which the drug is measured, e.g. '5 mg tablet'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DrugUnitProp")]
pub enum DrugUnitProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DrugUnitProp")]
impl TryFrom<SchemaValue> for DrugUnitProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DrugUnitProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DrugUnitProp")]
impl TryFrom<&SchemaValue> for DrugUnitProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DrugUnitProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A mathematical expression (e.g. 'x^2-3x=0') that may be solved for a specific variable, simplified, or transformed. This can take many formats, e.g. LaTeX, Ascii-Math, or math as you would write with a keyboard.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MathExpressionProp")]
pub enum MathExpressionProp {
Text(String),
SolveMathAction(SolveMathAction),
}
#[automatically_derived]
#[cfg(feature = "MathExpressionProp")]
impl TryFrom<SchemaValue> for MathExpressionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MathExpressionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SolveMathAction::try_from(v.clone()) { return Ok(MathExpressionProp::SolveMathAction(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MathExpressionProp")]
impl TryFrom<&SchemaValue> for MathExpressionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MathExpressionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SolveMathAction::try_from(v.clone()) { return Ok(MathExpressionProp::SolveMathAction(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A media object that encodes this CreativeWork. This property is a synonym for associatedMedia.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EncodingProp")]
pub enum EncodingProp {
Text(String),
MediaObject(MediaObject),
}
#[automatically_derived]
#[cfg(feature = "EncodingProp")]
impl TryFrom<SchemaValue> for EncodingProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EncodingProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(EncodingProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EncodingProp")]
impl TryFrom<&SchemaValue> for EncodingProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EncodingProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(EncodingProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The geographic area associated with the audience.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeographicAreaProp")]
pub enum GeographicAreaProp {
Text(String),
AdministrativeArea(AdministrativeArea),
}
#[automatically_derived]
#[cfg(feature = "GeographicAreaProp")]
impl TryFrom<SchemaValue> for GeographicAreaProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeographicAreaProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(GeographicAreaProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeographicAreaProp")]
impl TryFrom<&SchemaValue> for GeographicAreaProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeographicAreaProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(GeographicAreaProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The type/class of the seat.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SeatingTypeProp")]
pub enum SeatingTypeProp {
QualitativeValue(QualitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SeatingTypeProp")]
impl TryFrom<SchemaValue> for SeatingTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeatingTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(SeatingTypeProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SeatingTypeProp")]
impl TryFrom<&SchemaValue> for SeatingTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeatingTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(SeatingTypeProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Any discount applied (to an Order).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DiscountProp")]
pub enum DiscountProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DiscountProp")]
impl TryFrom<SchemaValue> for DiscountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(DiscountProp::Number(v)),
SchemaValue::Text(v) => Ok(DiscountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DiscountProp")]
impl TryFrom<&SchemaValue> for DiscountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(DiscountProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(DiscountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The identifier property represents any kind of identifier for any kind of [Thing], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details.
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IdentifierProp")]
pub enum IdentifierProp {
PropertyValue(PropertyValue),
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "IdentifierProp")]
impl TryFrom<SchemaValue> for IdentifierProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IdentifierProp::Text(v)),
SchemaValue::Url(v) => Ok(IdentifierProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(IdentifierProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IdentifierProp")]
impl TryFrom<&SchemaValue> for IdentifierProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IdentifierProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(IdentifierProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PropertyValue::try_from(v.clone()) { return Ok(IdentifierProp::PropertyValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a page documenting how licenses can be purchased or otherwise acquired, for the current item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AcquireLicensePageProp")]
pub enum AcquireLicensePageProp {
CreativeWork(CreativeWork),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AcquireLicensePageProp")]
impl TryFrom<SchemaValue> for AcquireLicensePageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(AcquireLicensePageProp::Url(v)),
SchemaValue::Text(v) => Ok(AcquireLicensePageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(AcquireLicensePageProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AcquireLicensePageProp")]
impl TryFrom<&SchemaValue> for AcquireLicensePageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(AcquireLicensePageProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(AcquireLicensePageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(AcquireLicensePageProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The end time of the clip expressed as the number of seconds from the beginning of the work.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EndOffsetProp")]
pub enum EndOffsetProp {
Number(f64),
HyperTocEntry(HyperTocEntry),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EndOffsetProp")]
impl TryFrom<SchemaValue> for EndOffsetProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(EndOffsetProp::Number(v)),
SchemaValue::Text(v) => Ok(EndOffsetProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HyperTocEntry::try_from(v.clone()) { return Ok(EndOffsetProp::HyperTocEntry(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EndOffsetProp")]
impl TryFrom<&SchemaValue> for EndOffsetProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(EndOffsetProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(EndOffsetProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HyperTocEntry::try_from(v.clone()) { return Ok(EndOffsetProp::HyperTocEntry(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Library file name, e.g., mscorlib.dll, system.web.dll.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AssemblyProp")]
pub enum AssemblyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AssemblyProp")]
impl TryFrom<SchemaValue> for AssemblyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssemblyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AssemblyProp")]
impl TryFrom<&SchemaValue> for AssemblyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AssemblyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The International Standard Musical Work Code for the composition.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IswcCodeProp")]
pub enum IswcCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IswcCodeProp")]
impl TryFrom<SchemaValue> for IswcCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IswcCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IswcCodeProp")]
impl TryFrom<&SchemaValue> for IswcCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IswcCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A person who founded this organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FoundersProp")]
pub enum FoundersProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "FoundersProp")]
impl TryFrom<SchemaValue> for FoundersProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoundersProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FoundersProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FoundersProp")]
impl TryFrom<&SchemaValue> for FoundersProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FoundersProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FoundersProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An HTTP method that specifies the appropriate HTTP method for a request to an HTTP EntryPoint. Values are capitalized strings as used in HTTP.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HttpMethodProp")]
pub enum HttpMethodProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HttpMethodProp")]
impl TryFrom<SchemaValue> for HttpMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HttpMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HttpMethodProp")]
impl TryFrom<&SchemaValue> for HttpMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HttpMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The suggested gender of the intended person or audience, for example "male", "female", or "unisex".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SuggestedGenderProp")]
pub enum SuggestedGenderProp {
Text(String),
GenderType(GenderType),
}
#[automatically_derived]
#[cfg(feature = "SuggestedGenderProp")]
impl TryFrom<SchemaValue> for SuggestedGenderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuggestedGenderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GenderType::try_from(v.clone()) { return Ok(SuggestedGenderProp::GenderType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SuggestedGenderProp")]
impl TryFrom<&SchemaValue> for SuggestedGenderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuggestedGenderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GenderType::try_from(v.clone()) { return Ok(SuggestedGenderProp::GenderType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Additional content for a software application.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SoftwareAddOnProp")]
pub enum SoftwareAddOnProp {
Text(String),
SoftwareApplication(SoftwareApplication),
}
#[automatically_derived]
#[cfg(feature = "SoftwareAddOnProp")]
impl TryFrom<SchemaValue> for SoftwareAddOnProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SoftwareAddOnProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SoftwareApplication::try_from(v.clone()) { return Ok(SoftwareAddOnProp::SoftwareApplication(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SoftwareAddOnProp")]
impl TryFrom<&SchemaValue> for SoftwareAddOnProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SoftwareAddOnProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SoftwareApplication::try_from(v.clone()) { return Ok(SoftwareAddOnProp::SoftwareApplication(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the GeoCoordinates at the centre of a GeoShape, e.g. GeoCircle.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoMidpointProp")]
pub enum GeoMidpointProp {
GeoCoordinates(GeoCoordinates),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GeoMidpointProp")]
impl TryFrom<SchemaValue> for GeoMidpointProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoMidpointProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeoCoordinates::try_from(v.clone()) { return Ok(GeoMidpointProp::GeoCoordinates(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoMidpointProp")]
impl TryFrom<&SchemaValue> for GeoMidpointProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoMidpointProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GeoCoordinates::try_from(v.clone()) { return Ok(GeoMidpointProp::GeoCoordinates(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a property used as a constraint. For example, in the definition of a [StatisticalVariable]. The value is a property, either from within Schema.org or from other compatible (e.g. RDF) systems such as DataCommons.org or Wikidata.org.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ConstraintPropertyProp")]
pub enum ConstraintPropertyProp {
Text(String),
Property(Property),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "ConstraintPropertyProp")]
impl TryFrom<SchemaValue> for ConstraintPropertyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ConstraintPropertyProp::Text(v)),
SchemaValue::Url(v) => Ok(ConstraintPropertyProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Property::try_from(v.clone()) { return Ok(ConstraintPropertyProp::Property(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ConstraintPropertyProp")]
impl TryFrom<&SchemaValue> for ConstraintPropertyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ConstraintPropertyProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ConstraintPropertyProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Property::try_from(v.clone()) { return Ok(ConstraintPropertyProp::Property(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// For questions that are part of learning resources (e.g. Quiz), eduQuestionType indicates the format of question being given. Example: "Multiple choice", "Open ended", "Flashcard".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EduQuestionTypeProp")]
pub enum EduQuestionTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EduQuestionTypeProp")]
impl TryFrom<SchemaValue> for EduQuestionTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EduQuestionTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EduQuestionTypeProp")]
impl TryFrom<&SchemaValue> for EduQuestionTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EduQuestionTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SellerProp")]
pub enum SellerProp {
Organization(Organization),
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SellerProp")]
impl TryFrom<SchemaValue> for SellerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SellerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SellerProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SellerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SellerProp")]
impl TryFrom<&SchemaValue> for SellerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SellerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SellerProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SellerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The organization (airline, travelers' club, etc.) the membership is made with.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HostingOrganizationProp")]
pub enum HostingOrganizationProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HostingOrganizationProp")]
impl TryFrom<SchemaValue> for HostingOrganizationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HostingOrganizationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(HostingOrganizationProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HostingOrganizationProp")]
impl TryFrom<&SchemaValue> for HostingOrganizationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HostingOrganizationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(HostingOrganizationProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The away team in a sports event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AwayTeamProp")]
pub enum AwayTeamProp {
Person(Person),
SportsTeam(SportsTeam),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AwayTeamProp")]
impl TryFrom<SchemaValue> for AwayTeamProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AwayTeamProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AwayTeamProp::Person(object)) }
if let Ok(object) = SportsTeam::try_from(v.clone()) { return Ok(AwayTeamProp::SportsTeam(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AwayTeamProp")]
impl TryFrom<&SchemaValue> for AwayTeamProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AwayTeamProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AwayTeamProp::Person(object)) }
if let Ok(object) = SportsTeam::try_from(v.clone()) { return Ok(AwayTeamProp::SportsTeam(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The median value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MedianProp")]
pub enum MedianProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MedianProp")]
impl TryFrom<SchemaValue> for MedianProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(MedianProp::Number(v)),
SchemaValue::Text(v) => Ok(MedianProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MedianProp")]
impl TryFrom<&SchemaValue> for MedianProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(MedianProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(MedianProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// For a [NewsMediaOrganization] or other news-related [Organization], a statement about public engagement activities (for news media, the newsroom’s), including involving the public - digitally or otherwise -- in coverage decisions, reporting and activities after publication.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ActionableFeedbackPolicyProp")]
pub enum ActionableFeedbackPolicyProp {
Text(String),
Url(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "ActionableFeedbackPolicyProp")]
impl TryFrom<SchemaValue> for ActionableFeedbackPolicyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionableFeedbackPolicyProp::Text(v)),
SchemaValue::Url(v) => Ok(ActionableFeedbackPolicyProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(ActionableFeedbackPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ActionableFeedbackPolicyProp")]
impl TryFrom<&SchemaValue> for ActionableFeedbackPolicyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionableFeedbackPolicyProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ActionableFeedbackPolicyProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(ActionableFeedbackPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// When a rental car can be dropped off.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DropoffTimeProp")]
pub enum DropoffTimeProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "DropoffTimeProp")]
impl TryFrom<SchemaValue> for DropoffTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DropoffTimeProp::Text(v)),
SchemaValue::DateTime(v) => Ok(DropoffTimeProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DropoffTimeProp")]
impl TryFrom<&SchemaValue> for DropoffTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DropoffTimeProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(DropoffTimeProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A description of the job location (e.g. TELECOMMUTE for telecommute jobs).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "JobLocationTypeProp")]
pub enum JobLocationTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "JobLocationTypeProp")]
impl TryFrom<SchemaValue> for JobLocationTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobLocationTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "JobLocationTypeProp")]
impl TryFrom<&SchemaValue> for JobLocationTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(JobLocationTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the populationType common to all members of a [StatisticalPopulation] or all cases within the scope of a [StatisticalVariable].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PopulationTypeProp")]
pub enum PopulationTypeProp {
Text(String),
Class(Class),
}
#[automatically_derived]
#[cfg(feature = "PopulationTypeProp")]
impl TryFrom<SchemaValue> for PopulationTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PopulationTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Class::try_from(v.clone()) { return Ok(PopulationTypeProp::Class(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PopulationTypeProp")]
impl TryFrom<&SchemaValue> for PopulationTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PopulationTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Class::try_from(v.clone()) { return Ok(PopulationTypeProp::Class(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The time at which the UserComment was made.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CommentTimeProp")]
pub enum CommentTimeProp {
Text(String),
Date(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "CommentTimeProp")]
impl TryFrom<SchemaValue> for CommentTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CommentTimeProp::Text(v)),
SchemaValue::Date(v) => Ok(CommentTimeProp::Date(v)),
SchemaValue::DateTime(v) => Ok(CommentTimeProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CommentTimeProp")]
impl TryFrom<&SchemaValue> for CommentTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CommentTimeProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(CommentTimeProp::Date(v.clone())),
SchemaValue::DateTime(v) => Ok(CommentTimeProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates an occurrence of a [Claim] in some [CreativeWork].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AppearanceProp")]
pub enum AppearanceProp {
Text(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "AppearanceProp")]
impl TryFrom<SchemaValue> for AppearanceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AppearanceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(AppearanceProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AppearanceProp")]
impl TryFrom<&SchemaValue> for AppearanceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AppearanceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(AppearanceProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The larger organization that this organization is a [subOrganization] of, if any.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ParentOrganizationProp")]
pub enum ParentOrganizationProp {
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "ParentOrganizationProp")]
impl TryFrom<SchemaValue> for ParentOrganizationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentOrganizationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ParentOrganizationProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ParentOrganizationProp")]
impl TryFrom<&SchemaValue> for ParentOrganizationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentOrganizationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ParentOrganizationProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A dataset contained in this catalog.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DatasetProp")]
pub enum DatasetProp {
Text(String),
Dataset(Dataset),
}
#[automatically_derived]
#[cfg(feature = "DatasetProp")]
impl TryFrom<SchemaValue> for DatasetProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DatasetProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Dataset::try_from(v.clone()) { return Ok(DatasetProp::Dataset(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DatasetProp")]
impl TryFrom<&SchemaValue> for DatasetProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DatasetProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Dataset::try_from(v.clone()) { return Ok(DatasetProp::Dataset(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of the item ordered. If the property is not set, assume the quantity is one.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OrderQuantityProp")]
pub enum OrderQuantityProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "OrderQuantityProp")]
impl TryFrom<SchemaValue> for OrderQuantityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderQuantityProp::Text(v)),
SchemaValue::Number(v) => Ok(OrderQuantityProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OrderQuantityProp")]
impl TryFrom<&SchemaValue> for OrderQuantityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderQuantityProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(OrderQuantityProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The category of the recipe—for example, appetizer, entree, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecipeCategoryProp")]
pub enum RecipeCategoryProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecipeCategoryProp")]
impl TryFrom<SchemaValue> for RecipeCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeCategoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecipeCategoryProp")]
impl TryFrom<&SchemaValue> for RecipeCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeCategoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Component dependency requirements for application. This includes runtime environments and shared libraries that are not included in the application distribution package, but required to run the application (examples: DirectX, Java or .NET runtime).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RequirementsProp")]
pub enum RequirementsProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "RequirementsProp")]
impl TryFrom<SchemaValue> for RequirementsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RequirementsProp::Text(v)),
SchemaValue::Url(v) => Ok(RequirementsProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RequirementsProp")]
impl TryFrom<&SchemaValue> for RequirementsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RequirementsProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(RequirementsProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "Gtin8Prop")]
pub enum Gtin8Prop {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "Gtin8Prop")]
impl TryFrom<SchemaValue> for Gtin8Prop {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Gtin8Prop::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "Gtin8Prop")]
impl TryFrom<&SchemaValue> for Gtin8Prop {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Gtin8Prop::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates a [HyperTocEntry] in a [HyperToc].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TocEntryProp")]
pub enum TocEntryProp {
Text(String),
HyperTocEntry(HyperTocEntry),
}
#[automatically_derived]
#[cfg(feature = "TocEntryProp")]
impl TryFrom<SchemaValue> for TocEntryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TocEntryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HyperTocEntry::try_from(v.clone()) { return Ok(TocEntryProp::HyperTocEntry(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TocEntryProp")]
impl TryFrom<&SchemaValue> for TocEntryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TocEntryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = HyperTocEntry::try_from(v.clone()) { return Ok(TocEntryProp::HyperTocEntry(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The telephone number.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TelephoneProp")]
pub enum TelephoneProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TelephoneProp")]
impl TryFrom<SchemaValue> for TelephoneProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TelephoneProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TelephoneProp")]
impl TryFrom<&SchemaValue> for TelephoneProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TelephoneProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Relates a term (i.e. a property, class or enumeration) to one that supersedes it.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SupersededByProp")]
pub enum SupersededByProp {
Class(Class),
Property(Property),
Enumeration(Enumeration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SupersededByProp")]
impl TryFrom<SchemaValue> for SupersededByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SupersededByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Class::try_from(v.clone()) { return Ok(SupersededByProp::Class(object)) }
if let Ok(object) = Property::try_from(v.clone()) { return Ok(SupersededByProp::Property(object)) }
if let Ok(object) = Enumeration::try_from(v.clone()) { return Ok(SupersededByProp::Enumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SupersededByProp")]
impl TryFrom<&SchemaValue> for SupersededByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SupersededByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Class::try_from(v.clone()) { return Ok(SupersededByProp::Class(object)) }
if let Ok(object) = Property::try_from(v.clone()) { return Ok(SupersededByProp::Property(object)) }
if let Ok(object) = Enumeration::try_from(v.clone()) { return Ok(SupersededByProp::Enumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Statement about ethics policy, e.g. of a [NewsMediaOrganization] regarding journalistic and publishing practices, or of a [Restaurant], a page describing food source policies. In the case of a [NewsMediaOrganization], an ethicsPolicy is typically a statement describing the personal, organizational, and corporate standards of behavior expected by the organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EthicsPolicyProp")]
pub enum EthicsPolicyProp {
CreativeWork(CreativeWork),
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "EthicsPolicyProp")]
impl TryFrom<SchemaValue> for EthicsPolicyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EthicsPolicyProp::Text(v)),
SchemaValue::Url(v) => Ok(EthicsPolicyProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(EthicsPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EthicsPolicyProp")]
impl TryFrom<&SchemaValue> for EthicsPolicyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EthicsPolicyProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(EthicsPolicyProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(EthicsPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A media object representing the circumstances after performing this direction.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AfterMediaProp")]
pub enum AfterMediaProp {
Text(String),
MediaObject(MediaObject),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "AfterMediaProp")]
impl TryFrom<SchemaValue> for AfterMediaProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AfterMediaProp::Text(v)),
SchemaValue::Url(v) => Ok(AfterMediaProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(AfterMediaProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AfterMediaProp")]
impl TryFrom<&SchemaValue> for AfterMediaProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AfterMediaProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(AfterMediaProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(AfterMediaProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date and time the reservation was modified.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ModifiedTimeProp")]
pub enum ModifiedTimeProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "ModifiedTimeProp")]
impl TryFrom<SchemaValue> for ModifiedTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ModifiedTimeProp::Text(v)),
SchemaValue::DateTime(v) => Ok(ModifiedTimeProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ModifiedTimeProp")]
impl TryFrom<&SchemaValue> for ModifiedTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ModifiedTimeProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(ModifiedTimeProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Label to match an [OfferShippingDetails] with a [DeliveryTimeSettings] (within the context of a [shippingSettingsLink] cross-reference).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TransitTimeLabelProp")]
pub enum TransitTimeLabelProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TransitTimeLabelProp")]
impl TryFrom<SchemaValue> for TransitTimeLabelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TransitTimeLabelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TransitTimeLabelProp")]
impl TryFrom<&SchemaValue> for TransitTimeLabelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TransitTimeLabelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The edition of the book.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BookEditionProp")]
pub enum BookEditionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BookEditionProp")]
impl TryFrom<SchemaValue> for BookEditionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BookEditionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BookEditionProp")]
impl TryFrom<&SchemaValue> for BookEditionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BookEditionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A link to the ListItem that follows the current one.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NextItemProp")]
pub enum NextItemProp {
Text(String),
ListItem(ListItem),
}
#[automatically_derived]
#[cfg(feature = "NextItemProp")]
impl TryFrom<SchemaValue> for NextItemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NextItemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ListItem::try_from(v.clone()) { return Ok(NextItemProp::ListItem(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NextItemProp")]
impl TryFrom<&SchemaValue> for NextItemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NextItemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ListItem::try_from(v.clone()) { return Ok(NextItemProp::ListItem(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates whether some facility (e.g. [FoodEstablishment], [CovidTestingFacility]) offers a service that can be used by driving through in a car. In the case of [CovidTestingFacility] such facilities could potentially help with social distancing from other potentially-infected users.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasDriveThroughServiceProp")]
pub enum HasDriveThroughServiceProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasDriveThroughServiceProp")]
impl TryFrom<SchemaValue> for HasDriveThroughServiceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(HasDriveThroughServiceProp::Boolean(v)),
SchemaValue::Text(v) => Ok(HasDriveThroughServiceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasDriveThroughServiceProp")]
impl TryFrom<&SchemaValue> for HasDriveThroughServiceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(HasDriveThroughServiceProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(HasDriveThroughServiceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Fictional person connected with a creative work.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CharacterProp")]
pub enum CharacterProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "CharacterProp")]
impl TryFrom<SchemaValue> for CharacterProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CharacterProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CharacterProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CharacterProp")]
impl TryFrom<&SchemaValue> for CharacterProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CharacterProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CharacterProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Genre of the creative work, broadcast channel or group.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GenreProp")]
pub enum GenreProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "GenreProp")]
impl TryFrom<SchemaValue> for GenreProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GenreProp::Text(v)),
SchemaValue::Url(v) => Ok(GenreProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GenreProp")]
impl TryFrom<&SchemaValue> for GenreProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GenreProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(GenreProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A resource from which this work is derived or from which it is a modification or adaptation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsBasedOnProp")]
pub enum IsBasedOnProp {
Product(Product),
Text(String),
Url(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "IsBasedOnProp")]
impl TryFrom<SchemaValue> for IsBasedOnProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsBasedOnProp::Text(v)),
SchemaValue::Url(v) => Ok(IsBasedOnProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsBasedOnProp::Product(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(IsBasedOnProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsBasedOnProp")]
impl TryFrom<&SchemaValue> for IsBasedOnProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsBasedOnProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(IsBasedOnProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsBasedOnProp::Product(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(IsBasedOnProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// If responding yes, the number of guests who will attend in addition to the invitee.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AdditionalNumberOfGuestsProp")]
pub enum AdditionalNumberOfGuestsProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "AdditionalNumberOfGuestsProp")]
impl TryFrom<SchemaValue> for AdditionalNumberOfGuestsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdditionalNumberOfGuestsProp::Text(v)),
SchemaValue::Number(v) => Ok(AdditionalNumberOfGuestsProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AdditionalNumberOfGuestsProp")]
impl TryFrom<&SchemaValue> for AdditionalNumberOfGuestsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdditionalNumberOfGuestsProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(AdditionalNumberOfGuestsProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the relationship type of a Web link.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LinkRelationshipProp")]
pub enum LinkRelationshipProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LinkRelationshipProp")]
impl TryFrom<SchemaValue> for LinkRelationshipProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LinkRelationshipProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LinkRelationshipProp")]
impl TryFrom<&SchemaValue> for LinkRelationshipProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LinkRelationshipProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The tier(s) for this network.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanNetworkTierProp")]
pub enum HealthPlanNetworkTierProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanNetworkTierProp")]
impl TryFrom<SchemaValue> for HealthPlanNetworkTierProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanNetworkTierProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanNetworkTierProp")]
impl TryFrom<&SchemaValue> for HealthPlanNetworkTierProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanNetworkTierProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The North American Industry Classification System (NAICS) code for a particular organization or business person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NaicsProp")]
pub enum NaicsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NaicsProp")]
impl TryFrom<SchemaValue> for NaicsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NaicsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NaicsProp")]
impl TryFrom<&SchemaValue> for NaicsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NaicsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A pointer to the organization or person making the offer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OfferedByProp")]
pub enum OfferedByProp {
Person(Person),
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OfferedByProp")]
impl TryFrom<SchemaValue> for OfferedByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OfferedByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(OfferedByProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(OfferedByProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OfferedByProp")]
impl TryFrom<&SchemaValue> for OfferedByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OfferedByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(OfferedByProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(OfferedByProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The country where the product has to be sent to for returns, for example "Ireland" using the [name] property of [Country]. You can also provide the two-letter [ISO 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1). Note that this can be different from the country where the product was originally shipped from or sent to.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReturnPolicyCountryProp")]
pub enum ReturnPolicyCountryProp {
Country(Country),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReturnPolicyCountryProp")]
impl TryFrom<SchemaValue> for ReturnPolicyCountryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnPolicyCountryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Country::try_from(v.clone()) { return Ok(ReturnPolicyCountryProp::Country(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReturnPolicyCountryProp")]
impl TryFrom<&SchemaValue> for ReturnPolicyCountryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReturnPolicyCountryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Country::try_from(v.clone()) { return Ok(ReturnPolicyCountryProp::Country(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The supported content type(s) for an EntryPoint response.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContentTypeProp")]
pub enum ContentTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ContentTypeProp")]
impl TryFrom<SchemaValue> for ContentTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContentTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContentTypeProp")]
impl TryFrom<&SchemaValue> for ContentTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContentTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The kind of release which this album is: single, EP or album.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlbumReleaseTypeProp")]
pub enum AlbumReleaseTypeProp {
Text(String),
MusicAlbumReleaseType(MusicAlbumReleaseType),
}
#[automatically_derived]
#[cfg(feature = "AlbumReleaseTypeProp")]
impl TryFrom<SchemaValue> for AlbumReleaseTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlbumReleaseTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbumReleaseType::try_from(v.clone()) { return Ok(AlbumReleaseTypeProp::MusicAlbumReleaseType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlbumReleaseTypeProp")]
impl TryFrom<&SchemaValue> for AlbumReleaseTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlbumReleaseTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbumReleaseType::try_from(v.clone()) { return Ok(AlbumReleaseTypeProp::MusicAlbumReleaseType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The vasculature that the vein drains into.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DrainsToProp")]
pub enum DrainsToProp {
Text(String),
Vessel(Vessel),
}
#[automatically_derived]
#[cfg(feature = "DrainsToProp")]
impl TryFrom<SchemaValue> for DrainsToProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DrainsToProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Vessel::try_from(v.clone()) { return Ok(DrainsToProp::Vessel(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DrainsToProp")]
impl TryFrom<&SchemaValue> for DrainsToProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DrainsToProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Vessel::try_from(v.clone()) { return Ok(DrainsToProp::Vessel(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A cardholder benefit that pays the cardholder a small percentage of their net expenditures.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CashBackProp")]
pub enum CashBackProp {
Boolean(bool),
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CashBackProp")]
impl TryFrom<SchemaValue> for CashBackProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(CashBackProp::Boolean(v)),
SchemaValue::Number(v) => Ok(CashBackProp::Number(v)),
SchemaValue::Text(v) => Ok(CashBackProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CashBackProp")]
impl TryFrom<&SchemaValue> for CashBackProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(CashBackProp::Boolean(v.clone())),
SchemaValue::Number(v) => Ok(CashBackProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(CashBackProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date that this organization was dissolved.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DissolutionDateProp")]
pub enum DissolutionDateProp {
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DissolutionDateProp")]
impl TryFrom<SchemaValue> for DissolutionDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(DissolutionDateProp::Date(v)),
SchemaValue::Text(v) => Ok(DissolutionDateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DissolutionDateProp")]
impl TryFrom<&SchemaValue> for DissolutionDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(DissolutionDateProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(DissolutionDateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// a type of payment made in cash during the onset of the purchase of an expensive good/service. The payment typically represents only a percentage of the full purchase price.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DownPaymentProp")]
pub enum DownPaymentProp {
MonetaryAmount(MonetaryAmount),
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "DownPaymentProp")]
impl TryFrom<SchemaValue> for DownPaymentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DownPaymentProp::Text(v)),
SchemaValue::Number(v) => Ok(DownPaymentProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(DownPaymentProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DownPaymentProp")]
impl TryFrom<&SchemaValue> for DownPaymentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DownPaymentProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(DownPaymentProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(DownPaymentProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The sports team that participated on this action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SportsTeamProp")]
pub enum SportsTeamProp {
SportsTeam(SportsTeam),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SportsTeamProp")]
impl TryFrom<SchemaValue> for SportsTeamProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SportsTeamProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SportsTeam::try_from(v.clone()) { return Ok(SportsTeamProp::SportsTeam(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SportsTeamProp")]
impl TryFrom<&SchemaValue> for SportsTeamProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SportsTeamProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SportsTeam::try_from(v.clone()) { return Ok(SportsTeamProp::SportsTeam(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A person or organization that supports a thing through a pledge, promise, or financial contribution. E.g. a sponsor of a Medical Study or a corporate sponsor of an event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SponsorProp")]
pub enum SponsorProp {
Text(String),
Organization(Organization),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "SponsorProp")]
impl TryFrom<SchemaValue> for SponsorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SponsorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SponsorProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SponsorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SponsorProp")]
impl TryFrom<&SchemaValue> for SponsorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SponsorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(SponsorProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(SponsorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The time interval used to compute the invoice.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BillingPeriodProp")]
pub enum BillingPeriodProp {
Text(String),
Duration(Duration),
}
#[automatically_derived]
#[cfg(feature = "BillingPeriodProp")]
impl TryFrom<SchemaValue> for BillingPeriodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BillingPeriodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(BillingPeriodProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BillingPeriodProp")]
impl TryFrom<&SchemaValue> for BillingPeriodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BillingPeriodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(BillingPeriodProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The day of the week for which these opening hours are valid.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DayOfWeekProp")]
pub enum DayOfWeekProp {
DayOfWeek(DayOfWeek),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DayOfWeekProp")]
impl TryFrom<SchemaValue> for DayOfWeekProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DayOfWeekProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DayOfWeek::try_from(v.clone()) { return Ok(DayOfWeekProp::DayOfWeek(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DayOfWeekProp")]
impl TryFrom<&SchemaValue> for DayOfWeekProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DayOfWeekProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DayOfWeek::try_from(v.clone()) { return Ok(DayOfWeekProp::DayOfWeek(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Events that are a part of this event. For example, a conference event includes many presentations, each subEvents of the conference.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SubEventsProp")]
pub enum SubEventsProp {
Text(String),
Event(Event),
}
#[automatically_derived]
#[cfg(feature = "SubEventsProp")]
impl TryFrom<SchemaValue> for SubEventsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubEventsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(SubEventsProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SubEventsProp")]
impl TryFrom<&SchemaValue> for SubEventsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SubEventsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(SubEventsProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Comments, typically from users.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CommentProp")]
pub enum CommentProp {
Text(String),
Comment(Comment),
}
#[automatically_derived]
#[cfg(feature = "CommentProp")]
impl TryFrom<SchemaValue> for CommentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CommentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Comment::try_from(v.clone()) { return Ok(CommentProp::Comment(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CommentProp")]
impl TryFrom<&SchemaValue> for CommentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CommentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Comment::try_from(v.clone()) { return Ok(CommentProp::Comment(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The page on which the work ends; for example "138" or "xvi".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PageEndProp")]
pub enum PageEndProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PageEndProp")]
impl TryFrom<SchemaValue> for PageEndProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(PageEndProp::Integer(v)),
SchemaValue::Text(v) => Ok(PageEndProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PageEndProp")]
impl TryFrom<&SchemaValue> for PageEndProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(PageEndProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(PageEndProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The high level platform(s) where the Action can be performed for the given URL. To specify a specific application or operating system instance, use actionApplication.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ActionPlatformProp")]
pub enum ActionPlatformProp {
Text(String),
DigitalPlatformEnumeration(DigitalPlatformEnumeration),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "ActionPlatformProp")]
impl TryFrom<SchemaValue> for ActionPlatformProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionPlatformProp::Text(v)),
SchemaValue::Url(v) => Ok(ActionPlatformProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DigitalPlatformEnumeration::try_from(v.clone()) { return Ok(ActionPlatformProp::DigitalPlatformEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ActionPlatformProp")]
impl TryFrom<&SchemaValue> for ActionPlatformProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionPlatformProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ActionPlatformProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DigitalPlatformEnumeration::try_from(v.clone()) { return Ok(ActionPlatformProp::DigitalPlatformEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Number of people the reservation should accommodate.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PartySizeProp")]
pub enum PartySizeProp {
Integer(i64),
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PartySizeProp")]
impl TryFrom<SchemaValue> for PartySizeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(PartySizeProp::Integer(v)),
SchemaValue::Text(v) => Ok(PartySizeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(PartySizeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PartySizeProp")]
impl TryFrom<&SchemaValue> for PartySizeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(PartySizeProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(PartySizeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(PartySizeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The taxonomic grouping of the organism that expresses, encodes, or in some way related to the BioChemEntity.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TaxonomicRangeProp")]
pub enum TaxonomicRangeProp {
Taxon(Taxon),
Text(String),
Url(String),
DefinedTerm(DefinedTerm),
}
#[automatically_derived]
#[cfg(feature = "TaxonomicRangeProp")]
impl TryFrom<SchemaValue> for TaxonomicRangeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TaxonomicRangeProp::Text(v)),
SchemaValue::Url(v) => Ok(TaxonomicRangeProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Taxon::try_from(v.clone()) { return Ok(TaxonomicRangeProp::Taxon(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(TaxonomicRangeProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TaxonomicRangeProp")]
impl TryFrom<&SchemaValue> for TaxonomicRangeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TaxonomicRangeProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(TaxonomicRangeProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Taxon::try_from(v.clone()) { return Ok(TaxonomicRangeProp::Taxon(object)) }
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(TaxonomicRangeProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The identifier of the order item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OrderItemNumberProp")]
pub enum OrderItemNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "OrderItemNumberProp")]
impl TryFrom<SchemaValue> for OrderItemNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderItemNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OrderItemNumberProp")]
impl TryFrom<&SchemaValue> for OrderItemNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderItemNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The minimum payment is the lowest amount of money that one is required to pay on a credit card statement each month.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MonthlyMinimumRepaymentAmountProp")]
pub enum MonthlyMinimumRepaymentAmountProp {
MonetaryAmount(MonetaryAmount),
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "MonthlyMinimumRepaymentAmountProp")]
impl TryFrom<SchemaValue> for MonthlyMinimumRepaymentAmountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MonthlyMinimumRepaymentAmountProp::Text(v)),
SchemaValue::Number(v) => Ok(MonthlyMinimumRepaymentAmountProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(MonthlyMinimumRepaymentAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MonthlyMinimumRepaymentAmountProp")]
impl TryFrom<&SchemaValue> for MonthlyMinimumRepaymentAmountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MonthlyMinimumRepaymentAmountProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(MonthlyMinimumRepaymentAmountProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(MonthlyMinimumRepaymentAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Relates a property to a property that is its inverse. Inverse properties relate the same pairs of items to each other, but in reversed direction. For example, the 'alumni' and 'alumniOf' properties are inverseOf each other. Some properties don't have explicit inverses; in these situations RDFa and JSON-LD syntax for reverse properties can be used.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InverseOfProp")]
pub enum InverseOfProp {
Text(String),
Property(Property),
}
#[automatically_derived]
#[cfg(feature = "InverseOfProp")]
impl TryFrom<SchemaValue> for InverseOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InverseOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Property::try_from(v.clone()) { return Ok(InverseOfProp::Property(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InverseOfProp")]
impl TryFrom<&SchemaValue> for InverseOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InverseOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Property::try_from(v.clone()) { return Ok(InverseOfProp::Property(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Runtime platform or script interpreter dependencies (example: Java v1, Python 2.3, .NET Framework 3.0).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RuntimeProp")]
pub enum RuntimeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RuntimeProp")]
impl TryFrom<SchemaValue> for RuntimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RuntimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RuntimeProp")]
impl TryFrom<&SchemaValue> for RuntimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RuntimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Represents spatial relations in which two geometries (or the places they represent) have at least one point in common. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoIntersectsProp")]
pub enum GeoIntersectsProp {
Place(Place),
GeospatialGeometry(GeospatialGeometry),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GeoIntersectsProp")]
impl TryFrom<SchemaValue> for GeoIntersectsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoIntersectsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoIntersectsProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoIntersectsProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoIntersectsProp")]
impl TryFrom<&SchemaValue> for GeoIntersectsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoIntersectsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoIntersectsProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoIntersectsProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Date on which this guideline's recommendation was made.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GuidelineDateProp")]
pub enum GuidelineDateProp {
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GuidelineDateProp")]
impl TryFrom<SchemaValue> for GuidelineDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(GuidelineDateProp::Date(v)),
SchemaValue::Text(v) => Ok(GuidelineDateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GuidelineDateProp")]
impl TryFrom<&SchemaValue> for GuidelineDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(GuidelineDateProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(GuidelineDateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// 'vendor' is an earlier term for 'seller'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VendorProp")]
pub enum VendorProp {
Organization(Organization),
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VendorProp")]
impl TryFrom<SchemaValue> for VendorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VendorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(VendorProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(VendorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VendorProp")]
impl TryFrom<&SchemaValue> for VendorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VendorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(VendorProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(VendorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Similar to courseMode, the medium or means of delivery of the program as a whole. The value may either be a text label (e.g. "online", "onsite" or "blended"; "synchronous" or "asynchronous"; "full-time" or "part-time") or a URL reference to a term from a controlled vocabulary (e.g. https://ceds.ed.gov/element/001311#Asynchronous ).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EducationalProgramModeProp")]
pub enum EducationalProgramModeProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "EducationalProgramModeProp")]
impl TryFrom<SchemaValue> for EducationalProgramModeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalProgramModeProp::Text(v)),
SchemaValue::Url(v) => Ok(EducationalProgramModeProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EducationalProgramModeProp")]
impl TryFrom<&SchemaValue> for EducationalProgramModeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EducationalProgramModeProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(EducationalProgramModeProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The server on which it is possible to play the game.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GameServerProp")]
pub enum GameServerProp {
Text(String),
GameServer(GameServer),
}
#[automatically_derived]
#[cfg(feature = "GameServerProp")]
impl TryFrom<SchemaValue> for GameServerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameServerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GameServer::try_from(v.clone()) { return Ok(GameServerProp::GameServer(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GameServerProp")]
impl TryFrom<&SchemaValue> for GameServerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GameServerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = GameServer::try_from(v.clone()) { return Ok(GameServerProp::GameServer(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The location in which the status applies.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ApplicableLocationProp")]
pub enum ApplicableLocationProp {
Text(String),
AdministrativeArea(AdministrativeArea),
}
#[automatically_derived]
#[cfg(feature = "ApplicableLocationProp")]
impl TryFrom<SchemaValue> for ApplicableLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicableLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(ApplicableLocationProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ApplicableLocationProp")]
impl TryFrom<&SchemaValue> for ApplicableLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicableLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AdministrativeArea::try_from(v.clone()) { return Ok(ApplicableLocationProp::AdministrativeArea(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A member of a music group—for example, John, Paul, George, or Ringo.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MusicGroupMemberProp")]
pub enum MusicGroupMemberProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MusicGroupMemberProp")]
impl TryFrom<SchemaValue> for MusicGroupMemberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicGroupMemberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MusicGroupMemberProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MusicGroupMemberProp")]
impl TryFrom<&SchemaValue> for MusicGroupMemberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MusicGroupMemberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MusicGroupMemberProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An estimated salary for a job posting or occupation, based on a variety of variables including, but not limited to industry, job title, and location. Estimated salaries are often computed by outside organizations rather than the hiring organization, who may not have committed to the estimated value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EstimatedSalaryProp")]
pub enum EstimatedSalaryProp {
MonetaryAmountDistribution(MonetaryAmountDistribution),
Text(String),
Number(f64),
MonetaryAmount(MonetaryAmount),
}
#[automatically_derived]
#[cfg(feature = "EstimatedSalaryProp")]
impl TryFrom<SchemaValue> for EstimatedSalaryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EstimatedSalaryProp::Text(v)),
SchemaValue::Number(v) => Ok(EstimatedSalaryProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmountDistribution::try_from(v.clone()) { return Ok(EstimatedSalaryProp::MonetaryAmountDistribution(object)) }
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(EstimatedSalaryProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EstimatedSalaryProp")]
impl TryFrom<&SchemaValue> for EstimatedSalaryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EstimatedSalaryProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(EstimatedSalaryProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmountDistribution::try_from(v.clone()) { return Ok(EstimatedSalaryProp::MonetaryAmountDistribution(object)) }
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(EstimatedSalaryProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Date the content expires and is no longer useful or available. For example a [VideoObject] or [NewsArticle] whose availability or relevance is time-limited, or a [ClaimReview] fact check whose publisher wants to indicate that it may no longer be relevant (or helpful to highlight) after some date.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExpiresProp")]
pub enum ExpiresProp {
Text(String),
DateTime(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "ExpiresProp")]
impl TryFrom<SchemaValue> for ExpiresProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpiresProp::Text(v)),
SchemaValue::DateTime(v) => Ok(ExpiresProp::DateTime(v)),
SchemaValue::Date(v) => Ok(ExpiresProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExpiresProp")]
impl TryFrom<&SchemaValue> for ExpiresProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpiresProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(ExpiresProp::DateTime(v.clone())),
SchemaValue::Date(v) => Ok(ExpiresProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A description of the qualification, award, certificate, diploma or other educational credential awarded as a consequence of successful completion of this course or program.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EducationalCredentialAwardedProp")]
pub enum EducationalCredentialAwardedProp {
Url(String),
Text(String),
EducationalOccupationalCredential(EducationalOccupationalCredential),
}
#[automatically_derived]
#[cfg(feature = "EducationalCredentialAwardedProp")]
impl TryFrom<SchemaValue> for EducationalCredentialAwardedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(EducationalCredentialAwardedProp::Url(v)),
SchemaValue::Text(v) => Ok(EducationalCredentialAwardedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(EducationalCredentialAwardedProp::EducationalOccupationalCredential(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EducationalCredentialAwardedProp")]
impl TryFrom<&SchemaValue> for EducationalCredentialAwardedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(EducationalCredentialAwardedProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(EducationalCredentialAwardedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(EducationalCredentialAwardedProp::EducationalOccupationalCredential(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of participant. The winner of the action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WinnerProp")]
pub enum WinnerProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WinnerProp")]
impl TryFrom<SchemaValue> for WinnerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WinnerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(WinnerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WinnerProp")]
impl TryFrom<&SchemaValue> for WinnerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WinnerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(WinnerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The URL that goes directly to the plan brochure for the specific standard plan or plan variation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanMarketingUrlProp")]
pub enum HealthPlanMarketingUrlProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanMarketingUrlProp")]
impl TryFrom<SchemaValue> for HealthPlanMarketingUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(HealthPlanMarketingUrlProp::Url(v)),
SchemaValue::Text(v) => Ok(HealthPlanMarketingUrlProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanMarketingUrlProp")]
impl TryFrom<&SchemaValue> for HealthPlanMarketingUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(HealthPlanMarketingUrlProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(HealthPlanMarketingUrlProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The terminal or port from which the boat arrives.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArrivalBoatTerminalProp")]
pub enum ArrivalBoatTerminalProp {
BoatTerminal(BoatTerminal),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArrivalBoatTerminalProp")]
impl TryFrom<SchemaValue> for ArrivalBoatTerminalProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalBoatTerminalProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BoatTerminal::try_from(v.clone()) { return Ok(ArrivalBoatTerminalProp::BoatTerminal(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArrivalBoatTerminalProp")]
impl TryFrom<&SchemaValue> for ArrivalBoatTerminalProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalBoatTerminalProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BoatTerminal::try_from(v.clone()) { return Ok(ArrivalBoatTerminalProp::BoatTerminal(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A single ingredient used in the recipe, e.g. sugar, flour or garlic.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IngredientsProp")]
pub enum IngredientsProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IngredientsProp")]
impl TryFrom<SchemaValue> for IngredientsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IngredientsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IngredientsProp")]
impl TryFrom<&SchemaValue> for IngredientsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IngredientsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The words in the song.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LyricsProp")]
pub enum LyricsProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LyricsProp")]
impl TryFrom<SchemaValue> for LyricsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LyricsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(LyricsProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LyricsProp")]
impl TryFrom<&SchemaValue> for LyricsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LyricsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(LyricsProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The degree of mobility the joint allows.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FunctionalClassProp")]
pub enum FunctionalClassProp {
Text(String),
MedicalEntity(MedicalEntity),
}
#[automatically_derived]
#[cfg(feature = "FunctionalClassProp")]
impl TryFrom<SchemaValue> for FunctionalClassProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FunctionalClassProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(FunctionalClassProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FunctionalClassProp")]
impl TryFrom<&SchemaValue> for FunctionalClassProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FunctionalClassProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(FunctionalClassProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The amount to be paid as a penalty in the event of early payment of the loan.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EarlyPrepaymentPenaltyProp")]
pub enum EarlyPrepaymentPenaltyProp {
MonetaryAmount(MonetaryAmount),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EarlyPrepaymentPenaltyProp")]
impl TryFrom<SchemaValue> for EarlyPrepaymentPenaltyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EarlyPrepaymentPenaltyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(EarlyPrepaymentPenaltyProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EarlyPrepaymentPenaltyProp")]
impl TryFrom<&SchemaValue> for EarlyPrepaymentPenaltyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EarlyPrepaymentPenaltyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(EarlyPrepaymentPenaltyProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The earliest date the package may arrive.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExpectedArrivalFromProp")]
pub enum ExpectedArrivalFromProp {
Text(String),
DateTime(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "ExpectedArrivalFromProp")]
impl TryFrom<SchemaValue> for ExpectedArrivalFromProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpectedArrivalFromProp::Text(v)),
SchemaValue::DateTime(v) => Ok(ExpectedArrivalFromProp::DateTime(v)),
SchemaValue::Date(v) => Ok(ExpectedArrivalFromProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExpectedArrivalFromProp")]
impl TryFrom<&SchemaValue> for ExpectedArrivalFromProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExpectedArrivalFromProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(ExpectedArrivalFromProp::DateTime(v.clone())),
SchemaValue::Date(v) => Ok(ExpectedArrivalFromProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A category of alignment between the learning resource and the framework node. Recommended values include: 'requires', 'textComplexity', 'readingLevel', and 'educationalSubject'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AlignmentTypeProp")]
pub enum AlignmentTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AlignmentTypeProp")]
impl TryFrom<SchemaValue> for AlignmentTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlignmentTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AlignmentTypeProp")]
impl TryFrom<&SchemaValue> for AlignmentTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AlignmentTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The age or age range for the intended audience or person, for example 3-12 months for infants, 1-5 years for toddlers.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SuggestedAgeProp")]
pub enum SuggestedAgeProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SuggestedAgeProp")]
impl TryFrom<SchemaValue> for SuggestedAgeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuggestedAgeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(SuggestedAgeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SuggestedAgeProp")]
impl TryFrom<&SchemaValue> for SuggestedAgeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SuggestedAgeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(SuggestedAgeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The chemical composition describes the identity and relative ratio of the chemical elements that make up the substance.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ChemicalCompositionProp")]
pub enum ChemicalCompositionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ChemicalCompositionProp")]
impl TryFrom<SchemaValue> for ChemicalCompositionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ChemicalCompositionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ChemicalCompositionProp")]
impl TryFrom<&SchemaValue> for ChemicalCompositionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ChemicalCompositionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Description of bonus and commission compensation aspects of the job.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncentivesProp")]
pub enum IncentivesProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IncentivesProp")]
impl TryFrom<SchemaValue> for IncentivesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncentivesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncentivesProp")]
impl TryFrom<&SchemaValue> for IncentivesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncentivesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The current status of the order item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OrderItemStatusProp")]
pub enum OrderItemStatusProp {
Text(String),
OrderStatus(OrderStatus),
}
#[automatically_derived]
#[cfg(feature = "OrderItemStatusProp")]
impl TryFrom<SchemaValue> for OrderItemStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderItemStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OrderStatus::try_from(v.clone()) { return Ok(OrderItemStatusProp::OrderStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OrderItemStatusProp")]
impl TryFrom<&SchemaValue> for OrderItemStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OrderItemStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = OrderStatus::try_from(v.clone()) { return Ok(OrderItemStatusProp::OrderStatus(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Proficiency needed for this content; expected values: 'Beginner', 'Expert'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProficiencyLevelProp")]
pub enum ProficiencyLevelProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProficiencyLevelProp")]
impl TryFrom<SchemaValue> for ProficiencyLevelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProficiencyLevelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProficiencyLevelProp")]
impl TryFrom<&SchemaValue> for ProficiencyLevelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProficiencyLevelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The earliest someone may check into a lodging establishment.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CheckinTimeProp")]
pub enum CheckinTimeProp {
DateTime(String),
Time(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CheckinTimeProp")]
impl TryFrom<SchemaValue> for CheckinTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(CheckinTimeProp::DateTime(v)),
SchemaValue::Time(v) => Ok(CheckinTimeProp::Time(v)),
SchemaValue::Text(v) => Ok(CheckinTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CheckinTimeProp")]
impl TryFrom<&SchemaValue> for CheckinTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(CheckinTimeProp::DateTime(v.clone())),
SchemaValue::Time(v) => Ok(CheckinTimeProp::Time(v.clone())),
SchemaValue::Text(v) => Ok(CheckinTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The airline-specific indicator of boarding order / preference.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BoardingGroupProp")]
pub enum BoardingGroupProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BoardingGroupProp")]
impl TryFrom<SchemaValue> for BoardingGroupProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BoardingGroupProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BoardingGroupProp")]
impl TryFrom<&SchemaValue> for BoardingGroupProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BoardingGroupProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The difference between the price at which a broker or other intermediary buys and sells foreign currency.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExchangeRateSpreadProp")]
pub enum ExchangeRateSpreadProp {
Text(String),
MonetaryAmount(MonetaryAmount),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "ExchangeRateSpreadProp")]
impl TryFrom<SchemaValue> for ExchangeRateSpreadProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExchangeRateSpreadProp::Text(v)),
SchemaValue::Number(v) => Ok(ExchangeRateSpreadProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(ExchangeRateSpreadProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExchangeRateSpreadProp")]
impl TryFrom<&SchemaValue> for ExchangeRateSpreadProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExchangeRateSpreadProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(ExchangeRateSpreadProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(ExchangeRateSpreadProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Type(s) of exercise or activity, such as strength training, flexibility training, aerobics, cardiac rehabilitation, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExerciseTypeProp")]
pub enum ExerciseTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ExerciseTypeProp")]
impl TryFrom<SchemaValue> for ExerciseTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExerciseTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExerciseTypeProp")]
impl TryFrom<&SchemaValue> for ExerciseTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExerciseTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Use [MonetaryAmount] to specify a fixed restocking fee for product returns, or use [Number] to specify a percentage of the product price paid by the customer.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RestockingFeeProp")]
pub enum RestockingFeeProp {
MonetaryAmount(MonetaryAmount),
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "RestockingFeeProp")]
impl TryFrom<SchemaValue> for RestockingFeeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RestockingFeeProp::Text(v)),
SchemaValue::Number(v) => Ok(RestockingFeeProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(RestockingFeeProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RestockingFeeProp")]
impl TryFrom<&SchemaValue> for RestockingFeeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RestockingFeeProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(RestockingFeeProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(RestockingFeeProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The operating organization, if different from the provider. This enables the representation of services that are provided by an organization, but operated by another organization like a subcontractor.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServiceOperatorProp")]
pub enum ServiceOperatorProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ServiceOperatorProp")]
impl TryFrom<SchemaValue> for ServiceOperatorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceOperatorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ServiceOperatorProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServiceOperatorProp")]
impl TryFrom<&SchemaValue> for ServiceOperatorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceOperatorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ServiceOperatorProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Version of the software instance.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SoftwareVersionProp")]
pub enum SoftwareVersionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SoftwareVersionProp")]
impl TryFrom<SchemaValue> for SoftwareVersionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SoftwareVersionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SoftwareVersionProp")]
impl TryFrom<&SchemaValue> for SoftwareVersionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SoftwareVersionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Another BioChemEntity encoded by this one.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EncodesBioChemEntityProp")]
pub enum EncodesBioChemEntityProp {
Text(String),
BioChemEntity(BioChemEntity),
}
#[automatically_derived]
#[cfg(feature = "EncodesBioChemEntityProp")]
impl TryFrom<SchemaValue> for EncodesBioChemEntityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EncodesBioChemEntityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(EncodesBioChemEntityProp::BioChemEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EncodesBioChemEntityProp")]
impl TryFrom<&SchemaValue> for EncodesBioChemEntityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EncodesBioChemEntityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(EncodesBioChemEntityProp::BioChemEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The estimated time the flight will take.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EstimatedFlightDurationProp")]
pub enum EstimatedFlightDurationProp {
Duration(Duration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EstimatedFlightDurationProp")]
impl TryFrom<SchemaValue> for EstimatedFlightDurationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EstimatedFlightDurationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(EstimatedFlightDurationProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EstimatedFlightDurationProp")]
impl TryFrom<&SchemaValue> for EstimatedFlightDurationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EstimatedFlightDurationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(EstimatedFlightDurationProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An embedded audio object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AudioProp")]
pub enum AudioProp {
AudioObject(AudioObject),
Text(String),
MusicRecording(MusicRecording),
Clip(Clip),
}
#[automatically_derived]
#[cfg(feature = "AudioProp")]
impl TryFrom<SchemaValue> for AudioProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AudioProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AudioObject::try_from(v.clone()) { return Ok(AudioProp::AudioObject(object)) }
if let Ok(object) = MusicRecording::try_from(v.clone()) { return Ok(AudioProp::MusicRecording(object)) }
if let Ok(object) = Clip::try_from(v.clone()) { return Ok(AudioProp::Clip(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AudioProp")]
impl TryFrom<&SchemaValue> for AudioProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AudioProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AudioObject::try_from(v.clone()) { return Ok(AudioProp::AudioObject(object)) }
if let Ok(object) = MusicRecording::try_from(v.clone()) { return Ok(AudioProp::MusicRecording(object)) }
if let Ok(object) = Clip::try_from(v.clone()) { return Ok(AudioProp::Clip(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Real or fictional location of the game (or part of game).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GameLocationProp")]
pub enum GameLocationProp {
PostalAddress(PostalAddress),
Place(Place),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GameLocationProp")]
impl TryFrom<SchemaValue> for GameLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(GameLocationProp::Url(v)),
SchemaValue::Text(v) => Ok(GameLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(GameLocationProp::PostalAddress(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GameLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GameLocationProp")]
impl TryFrom<&SchemaValue> for GameLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(GameLocationProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(GameLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PostalAddress::try_from(v.clone()) { return Ok(GameLocationProp::PostalAddress(object)) }
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GameLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Amount of shipping costs for defect product returns. Applicable when property [itemDefectReturnFees] equals [ReturnShippingFees].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItemDefectReturnShippingFeesAmountProp")]
pub enum ItemDefectReturnShippingFeesAmountProp {
MonetaryAmount(MonetaryAmount),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ItemDefectReturnShippingFeesAmountProp")]
impl TryFrom<SchemaValue> for ItemDefectReturnShippingFeesAmountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemDefectReturnShippingFeesAmountProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(ItemDefectReturnShippingFeesAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItemDefectReturnShippingFeesAmountProp")]
impl TryFrom<&SchemaValue> for ItemDefectReturnShippingFeesAmountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemDefectReturnShippingFeesAmountProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(ItemDefectReturnShippingFeesAmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The individual who traces over the pencil drawings in ink after pencils are complete.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InkerProp")]
pub enum InkerProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InkerProp")]
impl TryFrom<SchemaValue> for InkerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InkerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(InkerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InkerProp")]
impl TryFrom<&SchemaValue> for InkerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InkerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(InkerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The total time required to perform instructions or a direction (including time to prepare the supplies), in [ISO 8601 duration format](http://en.wikipedia.org/wiki/ISO_8601).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TotalTimeProp")]
pub enum TotalTimeProp {
Duration(Duration),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TotalTimeProp")]
impl TryFrom<SchemaValue> for TotalTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TotalTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(TotalTimeProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TotalTimeProp")]
impl TryFrom<&SchemaValue> for TotalTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TotalTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(TotalTimeProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The name of a node in an established educational framework.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TargetNameProp")]
pub enum TargetNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TargetNameProp")]
impl TryFrom<SchemaValue> for TargetNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TargetNameProp")]
impl TryFrom<&SchemaValue> for TargetNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A food or drink item contained in a menu or menu section.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasMenuItemProp")]
pub enum HasMenuItemProp {
MenuItem(MenuItem),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasMenuItemProp")]
impl TryFrom<SchemaValue> for HasMenuItemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMenuItemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MenuItem::try_from(v.clone()) { return Ok(HasMenuItemProp::MenuItem(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasMenuItemProp")]
impl TryFrom<&SchemaValue> for HasMenuItemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasMenuItemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MenuItem::try_from(v.clone()) { return Ok(HasMenuItemProp::MenuItem(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The result produced in the action. E.g. John wrote *a book*.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ResultTypeProp")]
pub enum ResultTypeProp {
Text(String),
Thing(Thing),
}
#[automatically_derived]
#[cfg(feature = "ResultTypeProp")]
impl TryFrom<SchemaValue> for ResultTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ResultTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ResultTypeProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ResultTypeProp")]
impl TryFrom<&SchemaValue> for ResultTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ResultTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ResultTypeProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The total integer number of bathrooms in some [Accommodation], following real estate conventions as [documented in RESO](https://ddwiki.reso.org/display/DDW17/BathroomsTotalInteger+Field): "The simple sum of the number of bathrooms. For example for a property with two Full Bathrooms and one Half Bathroom, the Bathrooms Total Integer will be 3.". See also [numberOfRooms].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfBathroomsTotalProp")]
pub enum NumberOfBathroomsTotalProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfBathroomsTotalProp")]
impl TryFrom<SchemaValue> for NumberOfBathroomsTotalProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumberOfBathroomsTotalProp::Integer(v)),
SchemaValue::Text(v) => Ok(NumberOfBathroomsTotalProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfBathroomsTotalProp")]
impl TryFrom<&SchemaValue> for NumberOfBathroomsTotalProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumberOfBathroomsTotalProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(NumberOfBathroomsTotalProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A person who founded this organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FounderProp")]
pub enum FounderProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "FounderProp")]
impl TryFrom<SchemaValue> for FounderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FounderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FounderProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FounderProp")]
impl TryFrom<&SchemaValue> for FounderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FounderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FounderProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The WebSite or SoftwareApplication where the interactions took place.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InteractionServiceProp")]
pub enum InteractionServiceProp {
Text(String),
SoftwareApplication(SoftwareApplication),
WebSite(WebSite),
}
#[automatically_derived]
#[cfg(feature = "InteractionServiceProp")]
impl TryFrom<SchemaValue> for InteractionServiceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractionServiceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SoftwareApplication::try_from(v.clone()) { return Ok(InteractionServiceProp::SoftwareApplication(object)) }
if let Ok(object) = WebSite::try_from(v.clone()) { return Ok(InteractionServiceProp::WebSite(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InteractionServiceProp")]
impl TryFrom<&SchemaValue> for InteractionServiceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InteractionServiceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SoftwareApplication::try_from(v.clone()) { return Ok(InteractionServiceProp::SoftwareApplication(object)) }
if let Ok(object) = WebSite::try_from(v.clone()) { return Ok(InteractionServiceProp::WebSite(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The [Global Location Number](http://www.gs1.org/gln) (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GlobalLocationNumberProp")]
pub enum GlobalLocationNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "GlobalLocationNumberProp")]
impl TryFrom<SchemaValue> for GlobalLocationNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GlobalLocationNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GlobalLocationNumberProp")]
impl TryFrom<&SchemaValue> for GlobalLocationNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GlobalLocationNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A material that something is made from, e.g. leather, wool, cotton, paper.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MaterialProp")]
pub enum MaterialProp {
Url(String),
Product(Product),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MaterialProp")]
impl TryFrom<SchemaValue> for MaterialProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MaterialProp::Url(v)),
SchemaValue::Text(v) => Ok(MaterialProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(MaterialProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MaterialProp")]
impl TryFrom<&SchemaValue> for MaterialProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MaterialProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(MaterialProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(MaterialProp::Product(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The country of origin of something, including products as well as creative works such as movie and TV content.
///
/// In the case of TV and movie, this would be the country of the principle offices of the production company or individual responsible for the movie. For other kinds of [CreativeWork] it is difficult to provide fully general guidance, and properties such as [contentLocation] and [locationCreated] may be more applicable.
///
/// In the case of products, the country of origin of the product. The exact interpretation of this may vary by context and product type, and cannot be fully enumerated here.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CountryOfOriginProp")]
pub enum CountryOfOriginProp {
Country(Country),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CountryOfOriginProp")]
impl TryFrom<SchemaValue> for CountryOfOriginProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CountryOfOriginProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Country::try_from(v.clone()) { return Ok(CountryOfOriginProp::Country(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CountryOfOriginProp")]
impl TryFrom<&SchemaValue> for CountryOfOriginProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CountryOfOriginProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Country::try_from(v.clone()) { return Ok(CountryOfOriginProp::Country(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The event being broadcast such as a sporting event or awards ceremony.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BroadcastOfEventProp")]
pub enum BroadcastOfEventProp {
Event(Event),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BroadcastOfEventProp")]
impl TryFrom<SchemaValue> for BroadcastOfEventProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastOfEventProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(BroadcastOfEventProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BroadcastOfEventProp")]
impl TryFrom<&SchemaValue> for BroadcastOfEventProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcastOfEventProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(BroadcastOfEventProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// numc19overflowpats - ED/OVERFLOW: Patients with suspected or confirmed COVID-19 who are in the ED or any overflow location awaiting an inpatient bed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumC19OverflowPatsProp")]
pub enum CvdNumC19OverflowPatsProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19OverflowPatsProp")]
impl TryFrom<SchemaValue> for CvdNumC19OverflowPatsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumC19OverflowPatsProp::Number(v)),
SchemaValue::Text(v) => Ok(CvdNumC19OverflowPatsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumC19OverflowPatsProp")]
impl TryFrom<&SchemaValue> for CvdNumC19OverflowPatsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumC19OverflowPatsProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(CvdNumC19OverflowPatsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of instrument. The language used on this action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LanguageProp")]
pub enum LanguageProp {
Text(String),
Language(Language),
}
#[automatically_derived]
#[cfg(feature = "LanguageProp")]
impl TryFrom<SchemaValue> for LanguageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LanguageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Language::try_from(v.clone()) { return Ok(LanguageProp::Language(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LanguageProp")]
impl TryFrom<&SchemaValue> for LanguageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LanguageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Language::try_from(v.clone()) { return Ok(LanguageProp::Language(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The computer programming language.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProgrammingLanguageProp")]
pub enum ProgrammingLanguageProp {
Text(String),
ComputerLanguage(ComputerLanguage),
}
#[automatically_derived]
#[cfg(feature = "ProgrammingLanguageProp")]
impl TryFrom<SchemaValue> for ProgrammingLanguageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgrammingLanguageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ComputerLanguage::try_from(v.clone()) { return Ok(ProgrammingLanguageProp::ComputerLanguage(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProgrammingLanguageProp")]
impl TryFrom<&SchemaValue> for ProgrammingLanguageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgrammingLanguageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ComputerLanguage::try_from(v.clone()) { return Ok(ProgrammingLanguageProp::ComputerLanguage(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The TV series to which this episode or season belongs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PartOfTVSeriesProp")]
pub enum PartOfTVSeriesProp {
TVSeries(TVSeries),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PartOfTVSeriesProp")]
impl TryFrom<SchemaValue> for PartOfTVSeriesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfTVSeriesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TVSeries::try_from(v.clone()) { return Ok(PartOfTVSeriesProp::TVSeries(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PartOfTVSeriesProp")]
impl TryFrom<&SchemaValue> for PartOfTVSeriesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfTVSeriesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TVSeries::try_from(v.clone()) { return Ok(PartOfTVSeriesProp::TVSeries(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The GTIN-14 code of the product, or the product to which the offer refers. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "Gtin14Prop")]
pub enum Gtin14Prop {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "Gtin14Prop")]
impl TryFrom<SchemaValue> for Gtin14Prop {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Gtin14Prop::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "Gtin14Prop")]
impl TryFrom<&SchemaValue> for Gtin14Prop {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Gtin14Prop::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A media object representing the circumstances before performing this direction.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BeforeMediaProp")]
pub enum BeforeMediaProp {
Text(String),
Url(String),
MediaObject(MediaObject),
}
#[automatically_derived]
#[cfg(feature = "BeforeMediaProp")]
impl TryFrom<SchemaValue> for BeforeMediaProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BeforeMediaProp::Text(v)),
SchemaValue::Url(v) => Ok(BeforeMediaProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(BeforeMediaProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BeforeMediaProp")]
impl TryFrom<&SchemaValue> for BeforeMediaProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BeforeMediaProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(BeforeMediaProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MediaObject::try_from(v.clone()) { return Ok(BeforeMediaProp::MediaObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A single ingredient used in the recipe, e.g. sugar, flour or garlic.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecipeIngredientProp")]
pub enum RecipeIngredientProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecipeIngredientProp")]
impl TryFrom<SchemaValue> for RecipeIngredientProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeIngredientProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecipeIngredientProp")]
impl TryFrom<&SchemaValue> for RecipeIngredientProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeIngredientProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates an item or CreativeWork that is part of this item, or CreativeWork (in some sense).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasPartProp")]
pub enum HasPartProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasPartProp")]
impl TryFrom<SchemaValue> for HasPartProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasPartProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(HasPartProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasPartProp")]
impl TryFrom<&SchemaValue> for HasPartProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasPartProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(HasPartProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsBasedOnUrlProp")]
pub enum IsBasedOnUrlProp {
Url(String),
Text(String),
Product(Product),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "IsBasedOnUrlProp")]
impl TryFrom<SchemaValue> for IsBasedOnUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(IsBasedOnUrlProp::Url(v)),
SchemaValue::Text(v) => Ok(IsBasedOnUrlProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsBasedOnUrlProp::Product(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(IsBasedOnUrlProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsBasedOnUrlProp")]
impl TryFrom<&SchemaValue> for IsBasedOnUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(IsBasedOnUrlProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(IsBasedOnUrlProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Product::try_from(v.clone()) { return Ok(IsBasedOnUrlProp::Product(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(IsBasedOnUrlProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CitationProp")]
pub enum CitationProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CitationProp")]
impl TryFrom<SchemaValue> for CitationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CitationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(CitationProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CitationProp")]
impl TryFrom<&SchemaValue> for CitationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CitationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(CitationProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The minimum payment required at this time.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MinimumPaymentDueProp")]
pub enum MinimumPaymentDueProp {
Text(String),
MonetaryAmount(MonetaryAmount),
PriceSpecification(PriceSpecification),
}
#[automatically_derived]
#[cfg(feature = "MinimumPaymentDueProp")]
impl TryFrom<SchemaValue> for MinimumPaymentDueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MinimumPaymentDueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(MinimumPaymentDueProp::MonetaryAmount(object)) }
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(MinimumPaymentDueProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MinimumPaymentDueProp")]
impl TryFrom<&SchemaValue> for MinimumPaymentDueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MinimumPaymentDueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(MinimumPaymentDueProp::MonetaryAmount(object)) }
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(MinimumPaymentDueProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The unique identifier for the ticket.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TicketNumberProp")]
pub enum TicketNumberProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TicketNumberProp")]
impl TryFrom<SchemaValue> for TicketNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TicketNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TicketNumberProp")]
impl TryFrom<&SchemaValue> for TicketNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TicketNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// This Review or Rating is relevant to this part or facet of the itemReviewed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReviewAspectProp")]
pub enum ReviewAspectProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ReviewAspectProp")]
impl TryFrom<SchemaValue> for ReviewAspectProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewAspectProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReviewAspectProp")]
impl TryFrom<&SchemaValue> for ReviewAspectProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReviewAspectProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Where a taxi will pick up a passenger or a rental car can be picked up.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PickupLocationProp")]
pub enum PickupLocationProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PickupLocationProp")]
impl TryFrom<SchemaValue> for PickupLocationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PickupLocationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(PickupLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PickupLocationProp")]
impl TryFrom<&SchemaValue> for PickupLocationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PickupLocationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(PickupLocationProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The date the invoice is scheduled to be paid.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ScheduledPaymentDateProp")]
pub enum ScheduledPaymentDateProp {
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ScheduledPaymentDateProp")]
impl TryFrom<SchemaValue> for ScheduledPaymentDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ScheduledPaymentDateProp::Date(v)),
SchemaValue::Text(v) => Ok(ScheduledPaymentDateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ScheduledPaymentDateProp")]
impl TryFrom<&SchemaValue> for ScheduledPaymentDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Date(v) => Ok(ScheduledPaymentDateProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(ScheduledPaymentDateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The object that helped the agent perform the action. E.g. John wrote a book with *a pen*.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InstrumentProp")]
pub enum InstrumentProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InstrumentProp")]
impl TryFrom<SchemaValue> for InstrumentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InstrumentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(InstrumentProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InstrumentProp")]
impl TryFrom<&SchemaValue> for InstrumentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InstrumentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(InstrumentProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The anatomical or organ system that the vein flows into; a larger structure that the vein connects to.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TributaryProp")]
pub enum TributaryProp {
AnatomicalStructure(AnatomicalStructure),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TributaryProp")]
impl TryFrom<SchemaValue> for TributaryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TributaryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(TributaryProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TributaryProp")]
impl TryFrom<&SchemaValue> for TributaryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TributaryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AnatomicalStructure::try_from(v.clone()) { return Ok(TributaryProp::AnatomicalStructure(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The maximum virtual attendee capacity of an [Event] whose [eventAttendanceMode] is [OnlineEventAttendanceMode] (or the online aspects, in the case of a [MixedEventAttendanceMode]).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MaximumVirtualAttendeeCapacityProp")]
pub enum MaximumVirtualAttendeeCapacityProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MaximumVirtualAttendeeCapacityProp")]
impl TryFrom<SchemaValue> for MaximumVirtualAttendeeCapacityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(MaximumVirtualAttendeeCapacityProp::Integer(v)),
SchemaValue::Text(v) => Ok(MaximumVirtualAttendeeCapacityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MaximumVirtualAttendeeCapacityProp")]
impl TryFrom<&SchemaValue> for MaximumVirtualAttendeeCapacityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(MaximumVirtualAttendeeCapacityProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(MaximumVirtualAttendeeCapacityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// This property specifies the minimal quantity and rounding increment that will be the basis for the billing. The unit of measurement is specified by the unitCode property.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BillingIncrementProp")]
pub enum BillingIncrementProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BillingIncrementProp")]
impl TryFrom<SchemaValue> for BillingIncrementProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(BillingIncrementProp::Number(v)),
SchemaValue::Text(v) => Ok(BillingIncrementProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BillingIncrementProp")]
impl TryFrom<&SchemaValue> for BillingIncrementProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(BillingIncrementProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(BillingIncrementProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Intended use of the BioChemEntity by humans.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PotentialUseProp")]
pub enum PotentialUseProp {
DefinedTerm(DefinedTerm),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PotentialUseProp")]
impl TryFrom<SchemaValue> for PotentialUseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PotentialUseProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(PotentialUseProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PotentialUseProp")]
impl TryFrom<&SchemaValue> for PotentialUseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PotentialUseProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedTerm::try_from(v.clone()) { return Ok(PotentialUseProp::DefinedTerm(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Used to indicate a specific claim contained, implied, translated or refined from the content of a [MediaObject] or other [CreativeWork]. The interpreting party can be indicated using [claimInterpreter].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InterpretedAsClaimProp")]
pub enum InterpretedAsClaimProp {
Text(String),
Claim(Claim),
}
#[automatically_derived]
#[cfg(feature = "InterpretedAsClaimProp")]
impl TryFrom<SchemaValue> for InterpretedAsClaimProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InterpretedAsClaimProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Claim::try_from(v.clone()) { return Ok(InterpretedAsClaimProp::Claim(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InterpretedAsClaimProp")]
impl TryFrom<&SchemaValue> for InterpretedAsClaimProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InterpretedAsClaimProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Claim::try_from(v.clone()) { return Ok(InterpretedAsClaimProp::Claim(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The 75th percentile value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "Percentile75Prop")]
pub enum Percentile75Prop {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "Percentile75Prop")]
impl TryFrom<SchemaValue> for Percentile75Prop {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Percentile75Prop::Text(v)),
SchemaValue::Number(v) => Ok(Percentile75Prop::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "Percentile75Prop")]
impl TryFrom<&SchemaValue> for Percentile75Prop {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(Percentile75Prop::Text(v.clone())),
SchemaValue::Number(v) => Ok(Percentile75Prop::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A commonly used identifier for the characteristic represented by the property, e.g. a manufacturer or a standard code for a property. propertyID can be
/// (1) a prefixed string, mainly meant to be used with standards for product properties; (2) a site-specific, non-prefixed string (e.g. the primary key of the property or the vendor-specific ID of the property), or (3)
/// a URL indicating the type of the property, either pointing to an external vocabulary, or a Web resource that describes the property (e.g. a glossary entry).
/// Standards bodies should promote a standard prefix for the identifiers of properties from their standards.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PropertyIDProp")]
pub enum PropertyIDProp {
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PropertyIDProp")]
impl TryFrom<SchemaValue> for PropertyIDProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(PropertyIDProp::Url(v)),
SchemaValue::Text(v) => Ok(PropertyIDProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PropertyIDProp")]
impl TryFrom<&SchemaValue> for PropertyIDProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(PropertyIDProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(PropertyIDProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The description of a node in an established educational framework.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TargetDescriptionProp")]
pub enum TargetDescriptionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TargetDescriptionProp")]
impl TryFrom<SchemaValue> for TargetDescriptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetDescriptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TargetDescriptionProp")]
impl TryFrom<&SchemaValue> for TargetDescriptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TargetDescriptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// [ArchiveOrganization] that holds, keeps or maintains the [ArchiveComponent].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HoldingArchiveProp")]
pub enum HoldingArchiveProp {
ArchiveOrganization(ArchiveOrganization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HoldingArchiveProp")]
impl TryFrom<SchemaValue> for HoldingArchiveProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HoldingArchiveProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ArchiveOrganization::try_from(v.clone()) { return Ok(HoldingArchiveProp::ArchiveOrganization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HoldingArchiveProp")]
impl TryFrom<&SchemaValue> for HoldingArchiveProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HoldingArchiveProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ArchiveOrganization::try_from(v.clone()) { return Ok(HoldingArchiveProp::ArchiveOrganization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The season to which this episode belongs.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PartOfSeasonProp")]
pub enum PartOfSeasonProp {
CreativeWorkSeason(CreativeWorkSeason),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PartOfSeasonProp")]
impl TryFrom<SchemaValue> for PartOfSeasonProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfSeasonProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWorkSeason::try_from(v.clone()) { return Ok(PartOfSeasonProp::CreativeWorkSeason(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PartOfSeasonProp")]
impl TryFrom<&SchemaValue> for PartOfSeasonProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PartOfSeasonProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWorkSeason::try_from(v.clone()) { return Ok(PartOfSeasonProp::CreativeWorkSeason(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The category of cost, such as wholesale, retail, reimbursement cap, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CostCategoryProp")]
pub enum CostCategoryProp {
Text(String),
DrugCostCategory(DrugCostCategory),
}
#[automatically_derived]
#[cfg(feature = "CostCategoryProp")]
impl TryFrom<SchemaValue> for CostCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CostCategoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugCostCategory::try_from(v.clone()) { return Ok(CostCategoryProp::DrugCostCategory(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CostCategoryProp")]
impl TryFrom<&SchemaValue> for CostCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CostCategoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugCostCategory::try_from(v.clone()) { return Ok(CostCategoryProp::DrugCostCategory(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Type of software application, e.g. 'Game, Multimedia'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ApplicationCategoryProp")]
pub enum ApplicationCategoryProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "ApplicationCategoryProp")]
impl TryFrom<SchemaValue> for ApplicationCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationCategoryProp::Text(v)),
SchemaValue::Url(v) => Ok(ApplicationCategoryProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ApplicationCategoryProp")]
impl TryFrom<&SchemaValue> for ApplicationCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationCategoryProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ApplicationCategoryProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Date when this media object was uploaded to this site.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "UploadDateProp")]
pub enum UploadDateProp {
Text(String),
Date(String),
}
#[automatically_derived]
#[cfg(feature = "UploadDateProp")]
impl TryFrom<SchemaValue> for UploadDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UploadDateProp::Text(v)),
SchemaValue::Date(v) => Ok(UploadDateProp::Date(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "UploadDateProp")]
impl TryFrom<&SchemaValue> for UploadDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(UploadDateProp::Text(v.clone())),
SchemaValue::Date(v) => Ok(UploadDateProp::Date(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Of a [Person], and less typically of an [Organization], to indicate a known language. We do not distinguish skill levels or reading/writing/speaking/signing here. Use language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "KnowsLanguageProp")]
pub enum KnowsLanguageProp {
Language(Language),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "KnowsLanguageProp")]
impl TryFrom<SchemaValue> for KnowsLanguageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(KnowsLanguageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Language::try_from(v.clone()) { return Ok(KnowsLanguageProp::Language(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "KnowsLanguageProp")]
impl TryFrom<&SchemaValue> for KnowsLanguageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(KnowsLanguageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Language::try_from(v.clone()) { return Ok(KnowsLanguageProp::Language(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A form of paying back money previously borrowed from a lender. Repayment usually takes the form of periodic payments that normally include part principal plus interest in each payment.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LoanRepaymentFormProp")]
pub enum LoanRepaymentFormProp {
Text(String),
RepaymentSpecification(RepaymentSpecification),
}
#[automatically_derived]
#[cfg(feature = "LoanRepaymentFormProp")]
impl TryFrom<SchemaValue> for LoanRepaymentFormProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LoanRepaymentFormProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RepaymentSpecification::try_from(v.clone()) { return Ok(LoanRepaymentFormProp::RepaymentSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LoanRepaymentFormProp")]
impl TryFrom<&SchemaValue> for LoanRepaymentFormProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LoanRepaymentFormProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = RepaymentSpecification::try_from(v.clone()) { return Ok(LoanRepaymentFormProp::RepaymentSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// nonprofitStatus indicates the legal status of a non-profit organization in its primary place of business.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NonprofitStatusProp")]
pub enum NonprofitStatusProp {
Text(String),
NonprofitType(NonprofitType),
}
#[automatically_derived]
#[cfg(feature = "NonprofitStatusProp")]
impl TryFrom<SchemaValue> for NonprofitStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NonprofitStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = NonprofitType::try_from(v.clone()) { return Ok(NonprofitStatusProp::NonprofitType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NonprofitStatusProp")]
impl TryFrom<&SchemaValue> for NonprofitStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NonprofitStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = NonprofitType::try_from(v.clone()) { return Ok(NonprofitStatusProp::NonprofitType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A physical examination that can identify this sign.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IdentifyingExamProp")]
pub enum IdentifyingExamProp {
PhysicalExam(PhysicalExam),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IdentifyingExamProp")]
impl TryFrom<SchemaValue> for IdentifyingExamProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IdentifyingExamProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PhysicalExam::try_from(v.clone()) { return Ok(IdentifyingExamProp::PhysicalExam(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IdentifyingExamProp")]
impl TryFrom<&SchemaValue> for IdentifyingExamProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IdentifyingExamProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = PhysicalExam::try_from(v.clone()) { return Ok(IdentifyingExamProp::PhysicalExam(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Represents a relationship between two geometries (or the places they represent), relating a geometry to another that covers it. As defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoCoveredByProp")]
pub enum GeoCoveredByProp {
Place(Place),
Text(String),
GeospatialGeometry(GeospatialGeometry),
}
#[automatically_derived]
#[cfg(feature = "GeoCoveredByProp")]
impl TryFrom<SchemaValue> for GeoCoveredByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoCoveredByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoCoveredByProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoCoveredByProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoCoveredByProp")]
impl TryFrom<&SchemaValue> for GeoCoveredByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoCoveredByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoCoveredByProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoCoveredByProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An [EIDR](https://eidr.org/) (Entertainment Identifier Registry) [identifier] representing at the most general/abstract level, a work of film or television.
///
/// For example, the motion picture known as "Ghostbusters" has a titleEIDR of "10.5240/7EC7-228A-510A-053E-CBB8-J". This title (or work) may have several variants, which EIDR calls "edits". See [editEIDR].
///
/// Since schema.org types like [Movie], [TVEpisode], [TVSeason], and [TVSeries] can be used for both works and their multiple expressions, it is possible to use [titleEIDR] alone (for a general description), or alongside [editEIDR] for a more edit-specific description.
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TitleEIDRProp")]
pub enum TitleEIDRProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "TitleEIDRProp")]
impl TryFrom<SchemaValue> for TitleEIDRProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TitleEIDRProp::Text(v)),
SchemaValue::Url(v) => Ok(TitleEIDRProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TitleEIDRProp")]
impl TryFrom<&SchemaValue> for TitleEIDRProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TitleEIDRProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(TitleEIDRProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Name of the County of the NHSN facility that this data record applies to. Use [cvdFacilityId] to identify the facility. To provide other details, [healthcareReportingData] can be used on a [Hospital] entry.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdFacilityCountyProp")]
pub enum CvdFacilityCountyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CvdFacilityCountyProp")]
impl TryFrom<SchemaValue> for CvdFacilityCountyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdFacilityCountyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdFacilityCountyProp")]
impl TryFrom<&SchemaValue> for CvdFacilityCountyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CvdFacilityCountyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Any potential safety concern associated with the supplement. May include interactions with other drugs and foods, pregnancy, breastfeeding, known adverse reactions, and documented efficacy of the supplement.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SafetyConsiderationProp")]
pub enum SafetyConsiderationProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SafetyConsiderationProp")]
impl TryFrom<SchemaValue> for SafetyConsiderationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SafetyConsiderationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SafetyConsiderationProp")]
impl TryFrom<&SchemaValue> for SafetyConsiderationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SafetyConsiderationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of times terms of study are offered per year. Semesters and quarters are common units for term. For example, if the student can only take 2 semesters for the program in one year, then termsPerYear should be 2.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TermsPerYearProp")]
pub enum TermsPerYearProp {
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "TermsPerYearProp")]
impl TryFrom<SchemaValue> for TermsPerYearProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TermsPerYearProp::Text(v)),
SchemaValue::Number(v) => Ok(TermsPerYearProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TermsPerYearProp")]
impl TryFrom<&SchemaValue> for TermsPerYearProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TermsPerYearProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(TermsPerYearProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MentionsProp")]
pub enum MentionsProp {
Text(String),
Thing(Thing),
}
#[automatically_derived]
#[cfg(feature = "MentionsProp")]
impl TryFrom<SchemaValue> for MentionsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MentionsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(MentionsProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MentionsProp")]
impl TryFrom<&SchemaValue> for MentionsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MentionsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(MentionsProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A description of the postoperative procedures, care, and/or followups for this device.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PostOpProp")]
pub enum PostOpProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PostOpProp")]
impl TryFrom<SchemaValue> for PostOpProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostOpProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PostOpProp")]
impl TryFrom<&SchemaValue> for PostOpProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostOpProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A description of the qualification, award, certificate, diploma or other occupational credential awarded as a consequence of successful completion of this course or program.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OccupationalCredentialAwardedProp")]
pub enum OccupationalCredentialAwardedProp {
EducationalOccupationalCredential(EducationalOccupationalCredential),
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "OccupationalCredentialAwardedProp")]
impl TryFrom<SchemaValue> for OccupationalCredentialAwardedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OccupationalCredentialAwardedProp::Text(v)),
SchemaValue::Url(v) => Ok(OccupationalCredentialAwardedProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(OccupationalCredentialAwardedProp::EducationalOccupationalCredential(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OccupationalCredentialAwardedProp")]
impl TryFrom<&SchemaValue> for OccupationalCredentialAwardedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OccupationalCredentialAwardedProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(OccupationalCredentialAwardedProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EducationalOccupationalCredential::try_from(v.clone()) { return Ok(OccupationalCredentialAwardedProp::EducationalOccupationalCredential(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The current approximate inventory level for the item or items.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InventoryLevelProp")]
pub enum InventoryLevelProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "InventoryLevelProp")]
impl TryFrom<SchemaValue> for InventoryLevelProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InventoryLevelProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(InventoryLevelProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InventoryLevelProp")]
impl TryFrom<&SchemaValue> for InventoryLevelProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InventoryLevelProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(InventoryLevelProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The costs to the patient for services under this network or formulary.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HealthPlanCostSharingProp")]
pub enum HealthPlanCostSharingProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "HealthPlanCostSharingProp")]
impl TryFrom<SchemaValue> for HealthPlanCostSharingProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanCostSharingProp::Text(v)),
SchemaValue::Boolean(v) => Ok(HealthPlanCostSharingProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HealthPlanCostSharingProp")]
impl TryFrom<&SchemaValue> for HealthPlanCostSharingProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HealthPlanCostSharingProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(HealthPlanCostSharingProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of episodes in this season or series.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfEpisodesProp")]
pub enum NumberOfEpisodesProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NumberOfEpisodesProp")]
impl TryFrom<SchemaValue> for NumberOfEpisodesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumberOfEpisodesProp::Integer(v)),
SchemaValue::Text(v) => Ok(NumberOfEpisodesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfEpisodesProp")]
impl TryFrom<&SchemaValue> for NumberOfEpisodesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(NumberOfEpisodesProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(NumberOfEpisodesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The class of infectious agent (bacteria, prion, etc.) that causes the disease.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InfectiousAgentClassProp")]
pub enum InfectiousAgentClassProp {
Text(String),
InfectiousAgentClass(InfectiousAgentClass),
}
#[automatically_derived]
#[cfg(feature = "InfectiousAgentClassProp")]
impl TryFrom<SchemaValue> for InfectiousAgentClassProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InfectiousAgentClassProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = InfectiousAgentClass::try_from(v.clone()) { return Ok(InfectiousAgentClassProp::InfectiousAgentClass(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InfectiousAgentClassProp")]
impl TryFrom<&SchemaValue> for InfectiousAgentClassProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InfectiousAgentClassProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = InfectiousAgentClass::try_from(v.clone()) { return Ok(InfectiousAgentClassProp::InfectiousAgentClass(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Organization or Person offering the job position.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HiringOrganizationProp")]
pub enum HiringOrganizationProp {
Organization(Organization),
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HiringOrganizationProp")]
impl TryFrom<SchemaValue> for HiringOrganizationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HiringOrganizationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(HiringOrganizationProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(HiringOrganizationProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HiringOrganizationProp")]
impl TryFrom<&SchemaValue> for HiringOrganizationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HiringOrganizationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(HiringOrganizationProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(HiringOrganizationProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A member of this organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MembersProp")]
pub enum MembersProp {
Organization(Organization),
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "MembersProp")]
impl TryFrom<SchemaValue> for MembersProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MembersProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(MembersProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MembersProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MembersProp")]
impl TryFrom<&SchemaValue> for MembersProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MembersProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(MembersProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MembersProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A maintainer of a [Dataset], software package ([SoftwareApplication]), or other [Project]. A maintainer is a [Person] or [Organization] that manages contributions to, and/or publication of, some (typically complex) artifact. It is common for distributions of software and data to be based on "upstream" sources. When [maintainer] is applied to a specific version of something e.g. a particular version or packaging of a [Dataset], it is always possible that the upstream source has a different maintainer. The [isBasedOn] property can be used to indicate such relationships between datasets to make the different maintenance roles clear. Similarly in the case of software, a package may have dedicated maintainers working on integration into software distributions such as Ubuntu, as well as upstream maintainers of the underlying work.
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MaintainerProp")]
pub enum MaintainerProp {
Person(Person),
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "MaintainerProp")]
impl TryFrom<SchemaValue> for MaintainerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MaintainerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MaintainerProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(MaintainerProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MaintainerProp")]
impl TryFrom<&SchemaValue> for MaintainerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MaintainerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(MaintainerProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(MaintainerProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// InChIKey is a hashed version of the full InChI (using the SHA-256 algorithm).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InChIKeyProp")]
pub enum InChIKeyProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InChIKeyProp")]
impl TryFrom<SchemaValue> for InChIKeyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InChIKeyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InChIKeyProp")]
impl TryFrom<&SchemaValue> for InChIKeyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InChIKeyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The type of a bank account.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BankAccountTypeProp")]
pub enum BankAccountTypeProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "BankAccountTypeProp")]
impl TryFrom<SchemaValue> for BankAccountTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BankAccountTypeProp::Text(v)),
SchemaValue::Url(v) => Ok(BankAccountTypeProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BankAccountTypeProp")]
impl TryFrom<&SchemaValue> for BankAccountTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BankAccountTypeProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(BankAccountTypeProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A symbolic representation of a BioChemEntity. For example, a nucleotide sequence of a Gene or an amino acid sequence of a Protein.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasBioPolymerSequenceProp")]
pub enum HasBioPolymerSequenceProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HasBioPolymerSequenceProp")]
impl TryFrom<SchemaValue> for HasBioPolymerSequenceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasBioPolymerSequenceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasBioPolymerSequenceProp")]
impl TryFrom<&SchemaValue> for HasBioPolymerSequenceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasBioPolymerSequenceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The size of the accommodation, e.g. in square meter or squarefoot.
/// Typical unit code(s): MTK for square meter, FTK for square foot, or YDK for square yard
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FloorSizeProp")]
pub enum FloorSizeProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FloorSizeProp")]
impl TryFrom<SchemaValue> for FloorSizeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FloorSizeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(FloorSizeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FloorSizeProp")]
impl TryFrom<&SchemaValue> for FloorSizeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FloorSizeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(FloorSizeProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The typical working hours for this job (e.g. 1st shift, night shift, 8am-5pm).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WorkHoursProp")]
pub enum WorkHoursProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WorkHoursProp")]
impl TryFrom<SchemaValue> for WorkHoursProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkHoursProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WorkHoursProp")]
impl TryFrom<&SchemaValue> for WorkHoursProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkHoursProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The size of the business in annual revenue.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "YearlyRevenueProp")]
pub enum YearlyRevenueProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "YearlyRevenueProp")]
impl TryFrom<SchemaValue> for YearlyRevenueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(YearlyRevenueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(YearlyRevenueProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "YearlyRevenueProp")]
impl TryFrom<&SchemaValue> for YearlyRevenueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(YearlyRevenueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(YearlyRevenueProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Associates an [Event] with a [Schedule]. There are circumstances where it is preferable to share a schedule for a series of
/// repeating events rather than data on the individual events themselves. For example, a website or application might prefer to publish a schedule for a weekly
/// gym class rather than provide data on every event. A schedule could be processed by applications to add forthcoming events to a calendar. An [Event] that
/// is associated with a [Schedule] using this property should not have [startDate] or [endDate] properties. These are instead defined within the associated
/// [Schedule], this avoids any ambiguity for clients using the data. The property might have repeated values to specify different schedules, e.g. for different months
/// or seasons.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EventScheduleProp")]
pub enum EventScheduleProp {
Text(String),
Schedule(Schedule),
}
#[automatically_derived]
#[cfg(feature = "EventScheduleProp")]
impl TryFrom<SchemaValue> for EventScheduleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EventScheduleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Schedule::try_from(v.clone()) { return Ok(EventScheduleProp::Schedule(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EventScheduleProp")]
impl TryFrom<&SchemaValue> for EventScheduleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EventScheduleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Schedule::try_from(v.clone()) { return Ok(EventScheduleProp::Schedule(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Countries for which the application is not supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CountriesNotSupportedProp")]
pub enum CountriesNotSupportedProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CountriesNotSupportedProp")]
impl TryFrom<SchemaValue> for CountriesNotSupportedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CountriesNotSupportedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CountriesNotSupportedProp")]
impl TryFrom<&SchemaValue> for CountriesNotSupportedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CountriesNotSupportedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The number of persons that can be seated (e.g. in a vehicle), both in terms of the physical space available, and in terms of limitations set by law.
///
/// Typical unit code(s): C62 for persons
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SeatingCapacityProp")]
pub enum SeatingCapacityProp {
QuantitativeValue(QuantitativeValue),
Text(String),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "SeatingCapacityProp")]
impl TryFrom<SchemaValue> for SeatingCapacityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeatingCapacityProp::Text(v)),
SchemaValue::Number(v) => Ok(SeatingCapacityProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(SeatingCapacityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SeatingCapacityProp")]
impl TryFrom<&SchemaValue> for SeatingCapacityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeatingCapacityProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(SeatingCapacityProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(SeatingCapacityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Closest parent taxon of the taxon in question.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ParentTaxonProp")]
pub enum ParentTaxonProp {
Text(String),
Url(String),
Taxon(Taxon),
}
#[automatically_derived]
#[cfg(feature = "ParentTaxonProp")]
impl TryFrom<SchemaValue> for ParentTaxonProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentTaxonProp::Text(v)),
SchemaValue::Url(v) => Ok(ParentTaxonProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Taxon::try_from(v.clone()) { return Ok(ParentTaxonProp::Taxon(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ParentTaxonProp")]
impl TryFrom<&SchemaValue> for ParentTaxonProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ParentTaxonProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ParentTaxonProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Taxon::try_from(v.clone()) { return Ok(ParentTaxonProp::Taxon(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The kind of aircraft (e.g., "Boeing 747").
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AircraftProp")]
pub enum AircraftProp {
Text(String),
Vehicle(Vehicle),
}
#[automatically_derived]
#[cfg(feature = "AircraftProp")]
impl TryFrom<SchemaValue> for AircraftProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AircraftProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Vehicle::try_from(v.clone()) { return Ok(AircraftProp::Vehicle(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AircraftProp")]
impl TryFrom<&SchemaValue> for AircraftProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AircraftProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Vehicle::try_from(v.clone()) { return Ok(AircraftProp::Vehicle(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The ACRISS Car Classification Code is a code used by many car rental companies, for classifying vehicles. ACRISS stands for Association of Car Rental Industry Systems and Standards.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AcrissCodeProp")]
pub enum AcrissCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AcrissCodeProp")]
impl TryFrom<SchemaValue> for AcrissCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcrissCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AcrissCodeProp")]
impl TryFrom<&SchemaValue> for AcrissCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AcrissCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// New entry added as the package passes through each leg of its journey (from shipment to final delivery).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DeliveryStatusProp")]
pub enum DeliveryStatusProp {
DeliveryEvent(DeliveryEvent),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DeliveryStatusProp")]
impl TryFrom<SchemaValue> for DeliveryStatusProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeliveryStatusProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryEvent::try_from(v.clone()) { return Ok(DeliveryStatusProp::DeliveryEvent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DeliveryStatusProp")]
impl TryFrom<&SchemaValue> for DeliveryStatusProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeliveryStatusProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DeliveryEvent::try_from(v.clone()) { return Ok(DeliveryStatusProp::DeliveryEvent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of object. The options subject to this action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ActionOptionProp")]
pub enum ActionOptionProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ActionOptionProp")]
impl TryFrom<SchemaValue> for ActionOptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionOptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ActionOptionProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ActionOptionProp")]
impl TryFrom<&SchemaValue> for ActionOptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActionOptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ActionOptionProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of recipient. The recipient blind copied on a message.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BccRecipientProp")]
pub enum BccRecipientProp {
ContactPoint(ContactPoint),
Text(String),
Organization(Organization),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "BccRecipientProp")]
impl TryFrom<SchemaValue> for BccRecipientProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BccRecipientProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(BccRecipientProp::ContactPoint(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BccRecipientProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(BccRecipientProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BccRecipientProp")]
impl TryFrom<&SchemaValue> for BccRecipientProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BccRecipientProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(BccRecipientProp::ContactPoint(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BccRecipientProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(BccRecipientProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A contact point for a person or organization.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContactPointProp")]
pub enum ContactPointProp {
Text(String),
ContactPoint(ContactPoint),
}
#[automatically_derived]
#[cfg(feature = "ContactPointProp")]
impl TryFrom<SchemaValue> for ContactPointProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContactPointProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ContactPointProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContactPointProp")]
impl TryFrom<&SchemaValue> for ContactPointProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContactPointProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ContactPointProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A data catalog which contains this dataset.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CatalogProp")]
pub enum CatalogProp {
Text(String),
DataCatalog(DataCatalog),
}
#[automatically_derived]
#[cfg(feature = "CatalogProp")]
impl TryFrom<SchemaValue> for CatalogProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CatalogProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataCatalog::try_from(v.clone()) { return Ok(CatalogProp::DataCatalog(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CatalogProp")]
impl TryFrom<&SchemaValue> for CatalogProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CatalogProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataCatalog::try_from(v.clone()) { return Ok(CatalogProp::DataCatalog(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Collection, [fonds](https://en.wikipedia.org/wiki/Fonds), or item held, kept or maintained by an [ArchiveOrganization].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArchiveHeldProp")]
pub enum ArchiveHeldProp {
Text(String),
ArchiveComponent(ArchiveComponent),
}
#[automatically_derived]
#[cfg(feature = "ArchiveHeldProp")]
impl TryFrom<SchemaValue> for ArchiveHeldProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArchiveHeldProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ArchiveComponent::try_from(v.clone()) { return Ok(ArchiveHeldProp::ArchiveComponent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArchiveHeldProp")]
impl TryFrom<&SchemaValue> for ArchiveHeldProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArchiveHeldProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ArchiveComponent::try_from(v.clone()) { return Ok(ArchiveHeldProp::ArchiveComponent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An available dosage strength for the drug.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailableStrengthProp")]
pub enum AvailableStrengthProp {
DrugStrength(DrugStrength),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AvailableStrengthProp")]
impl TryFrom<SchemaValue> for AvailableStrengthProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableStrengthProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugStrength::try_from(v.clone()) { return Ok(AvailableStrengthProp::DrugStrength(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailableStrengthProp")]
impl TryFrom<&SchemaValue> for AvailableStrengthProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AvailableStrengthProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugStrength::try_from(v.clone()) { return Ok(AvailableStrengthProp::DrugStrength(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Pregnancy category of this drug.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PregnancyCategoryProp")]
pub enum PregnancyCategoryProp {
DrugPregnancyCategory(DrugPregnancyCategory),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PregnancyCategoryProp")]
impl TryFrom<SchemaValue> for PregnancyCategoryProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PregnancyCategoryProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugPregnancyCategory::try_from(v.clone()) { return Ok(PregnancyCategoryProp::DrugPregnancyCategory(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PregnancyCategoryProp")]
impl TryFrom<&SchemaValue> for PregnancyCategoryProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PregnancyCategoryProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DrugPregnancyCategory::try_from(v.clone()) { return Ok(PregnancyCategoryProp::DrugPregnancyCategory(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A person or organization that supports (sponsors) something through some kind of financial contribution.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FunderProp")]
pub enum FunderProp {
Person(Person),
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "FunderProp")]
impl TryFrom<SchemaValue> for FunderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FunderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FunderProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(FunderProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FunderProp")]
impl TryFrom<&SchemaValue> for FunderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FunderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(FunderProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(FunderProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the kind of Map, from the MapCategoryType Enumeration.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MapTypeProp")]
pub enum MapTypeProp {
Text(String),
MapCategoryType(MapCategoryType),
}
#[automatically_derived]
#[cfg(feature = "MapTypeProp")]
impl TryFrom<SchemaValue> for MapTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MapTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MapCategoryType::try_from(v.clone()) { return Ok(MapTypeProp::MapCategoryType(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MapTypeProp")]
impl TryFrom<&SchemaValue> for MapTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MapTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MapCategoryType::try_from(v.clone()) { return Ok(MapTypeProp::MapCategoryType(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of instrument. The diet used in this action.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DietProp")]
pub enum DietProp {
Diet(Diet),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DietProp")]
impl TryFrom<SchemaValue> for DietProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DietProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Diet::try_from(v.clone()) { return Ok(DietProp::Diet(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DietProp")]
impl TryFrom<&SchemaValue> for DietProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DietProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Diet::try_from(v.clone()) { return Ok(DietProp::Diet(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The basic containment relation between a place and another that it contains.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContainsPlaceProp")]
pub enum ContainsPlaceProp {
Text(String),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "ContainsPlaceProp")]
impl TryFrom<SchemaValue> for ContainsPlaceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContainsPlaceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ContainsPlaceProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContainsPlaceProp")]
impl TryFrom<&SchemaValue> for ContainsPlaceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContainsPlaceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ContainsPlaceProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The weight of the product or person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WeightProp")]
pub enum WeightProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "WeightProp")]
impl TryFrom<SchemaValue> for WeightProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WeightProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(WeightProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WeightProp")]
impl TryFrom<&SchemaValue> for WeightProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WeightProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(WeightProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The condition, complication, or symptom whose risk is being estimated.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EstimatesRiskOfProp")]
pub enum EstimatesRiskOfProp {
MedicalEntity(MedicalEntity),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EstimatesRiskOfProp")]
impl TryFrom<SchemaValue> for EstimatesRiskOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EstimatesRiskOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(EstimatesRiskOfProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EstimatesRiskOfProp")]
impl TryFrom<&SchemaValue> for EstimatesRiskOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EstimatesRiskOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalEntity::try_from(v.clone()) { return Ok(EstimatesRiskOfProp::MedicalEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A secure method for consumers to purchase products or services via debit, credit or smartcards by using RFID or NFC technology.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ContactlessPaymentProp")]
pub enum ContactlessPaymentProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "ContactlessPaymentProp")]
impl TryFrom<SchemaValue> for ContactlessPaymentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContactlessPaymentProp::Text(v)),
SchemaValue::Boolean(v) => Ok(ContactlessPaymentProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ContactlessPaymentProp")]
impl TryFrom<&SchemaValue> for ContactlessPaymentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ContactlessPaymentProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(ContactlessPaymentProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Link to the drug's label details.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LabelDetailsProp")]
pub enum LabelDetailsProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "LabelDetailsProp")]
impl TryFrom<SchemaValue> for LabelDetailsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LabelDetailsProp::Text(v)),
SchemaValue::Url(v) => Ok(LabelDetailsProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LabelDetailsProp")]
impl TryFrom<&SchemaValue> for LabelDetailsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LabelDetailsProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(LabelDetailsProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// First postal code in a range (included).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PostalCodeBeginProp")]
pub enum PostalCodeBeginProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PostalCodeBeginProp")]
impl TryFrom<SchemaValue> for PostalCodeBeginProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostalCodeBeginProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PostalCodeBeginProp")]
impl TryFrom<&SchemaValue> for PostalCodeBeginProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PostalCodeBeginProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A person who reads (performs) the audiobook.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReadByProp")]
pub enum ReadByProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "ReadByProp")]
impl TryFrom<SchemaValue> for ReadByProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReadByProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ReadByProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReadByProp")]
impl TryFrom<&SchemaValue> for ReadByProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReadByProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ReadByProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An embedded video object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VideoProp")]
pub enum VideoProp {
Text(String),
VideoObject(VideoObject),
Clip(Clip),
}
#[automatically_derived]
#[cfg(feature = "VideoProp")]
impl TryFrom<SchemaValue> for VideoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VideoProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = VideoObject::try_from(v.clone()) { return Ok(VideoProp::VideoObject(object)) }
if let Ok(object) = Clip::try_from(v.clone()) { return Ok(VideoProp::Clip(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VideoProp")]
impl TryFrom<&SchemaValue> for VideoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VideoProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = VideoObject::try_from(v.clone()) { return Ok(VideoProp::VideoObject(object)) }
if let Ok(object) = Clip::try_from(v.clone()) { return Ok(VideoProp::Clip(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Represents textual captioning from a [MediaObject], e.g. text of a 'meme'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EmbeddedTextCaptionProp")]
pub enum EmbeddedTextCaptionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EmbeddedTextCaptionProp")]
impl TryFrom<SchemaValue> for EmbeddedTextCaptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmbeddedTextCaptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EmbeddedTextCaptionProp")]
impl TryFrom<&SchemaValue> for EmbeddedTextCaptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EmbeddedTextCaptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Whether the terms for payment of interest can be renegotiated during the life of the loan.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RenegotiableLoanProp")]
pub enum RenegotiableLoanProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "RenegotiableLoanProp")]
impl TryFrom<SchemaValue> for RenegotiableLoanProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RenegotiableLoanProp::Text(v)),
SchemaValue::Boolean(v) => Ok(RenegotiableLoanProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RenegotiableLoanProp")]
impl TryFrom<&SchemaValue> for RenegotiableLoanProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RenegotiableLoanProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(RenegotiableLoanProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// When the item is available for pickup from the store, locker, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AvailableFromProp")]
pub enum AvailableFromProp {
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AvailableFromProp")]
impl TryFrom<SchemaValue> for AvailableFromProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(AvailableFromProp::DateTime(v)),
SchemaValue::Text(v) => Ok(AvailableFromProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AvailableFromProp")]
impl TryFrom<&SchemaValue> for AvailableFromProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(AvailableFromProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(AvailableFromProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The expected salary upon completing the training.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SalaryUponCompletionProp")]
pub enum SalaryUponCompletionProp {
MonetaryAmountDistribution(MonetaryAmountDistribution),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SalaryUponCompletionProp")]
impl TryFrom<SchemaValue> for SalaryUponCompletionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SalaryUponCompletionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmountDistribution::try_from(v.clone()) { return Ok(SalaryUponCompletionProp::MonetaryAmountDistribution(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SalaryUponCompletionProp")]
impl TryFrom<&SchemaValue> for SalaryUponCompletionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SalaryUponCompletionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmountDistribution::try_from(v.clone()) { return Ok(SalaryUponCompletionProp::MonetaryAmountDistribution(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of axles.
///
/// Typical unit code(s): C62
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfAxlesProp")]
pub enum NumberOfAxlesProp {
Text(String),
QuantitativeValue(QuantitativeValue),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "NumberOfAxlesProp")]
impl TryFrom<SchemaValue> for NumberOfAxlesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfAxlesProp::Text(v)),
SchemaValue::Number(v) => Ok(NumberOfAxlesProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfAxlesProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfAxlesProp")]
impl TryFrom<&SchemaValue> for NumberOfAxlesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfAxlesProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(NumberOfAxlesProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfAxlesProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number to access the service by text message.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ServiceSmsNumberProp")]
pub enum ServiceSmsNumberProp {
Text(String),
ContactPoint(ContactPoint),
}
#[automatically_derived]
#[cfg(feature = "ServiceSmsNumberProp")]
impl TryFrom<SchemaValue> for ServiceSmsNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceSmsNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ServiceSmsNumberProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ServiceSmsNumberProp")]
impl TryFrom<&SchemaValue> for ServiceSmsNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ServiceSmsNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ContactPoint::try_from(v.clone()) { return Ok(ServiceSmsNumberProp::ContactPoint(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Identifies the issue of publication; for example, "iii" or "2".
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IssueNumberProp")]
pub enum IssueNumberProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "IssueNumberProp")]
impl TryFrom<SchemaValue> for IssueNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IssueNumberProp::Text(v)),
SchemaValue::Integer(v) => Ok(IssueNumberProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IssueNumberProp")]
impl TryFrom<&SchemaValue> for IssueNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IssueNumberProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(IssueNumberProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// For a [NewsMediaOrganization], a statement on coverage priorities, including any public agenda or stance on issues.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MissionCoveragePrioritiesPolicyProp")]
pub enum MissionCoveragePrioritiesPolicyProp {
Url(String),
Text(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "MissionCoveragePrioritiesPolicyProp")]
impl TryFrom<SchemaValue> for MissionCoveragePrioritiesPolicyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MissionCoveragePrioritiesPolicyProp::Url(v)),
SchemaValue::Text(v) => Ok(MissionCoveragePrioritiesPolicyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(MissionCoveragePrioritiesPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MissionCoveragePrioritiesPolicyProp")]
impl TryFrom<&SchemaValue> for MissionCoveragePrioritiesPolicyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(MissionCoveragePrioritiesPolicyProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(MissionCoveragePrioritiesPolicyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(MissionCoveragePrioritiesPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The empirical formula is the simplest whole number ratio of all the atoms in a molecule.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MolecularFormulaProp")]
pub enum MolecularFormulaProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MolecularFormulaProp")]
impl TryFrom<SchemaValue> for MolecularFormulaProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MolecularFormulaProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MolecularFormulaProp")]
impl TryFrom<&SchemaValue> for MolecularFormulaProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MolecularFormulaProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Defines the energy efficiency Category (also known as "class" or "rating") for a product according to an international energy efficiency standard.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HasEnergyConsumptionDetailsProp")]
pub enum HasEnergyConsumptionDetailsProp {
Text(String),
EnergyConsumptionDetails(EnergyConsumptionDetails),
}
#[automatically_derived]
#[cfg(feature = "HasEnergyConsumptionDetailsProp")]
impl TryFrom<SchemaValue> for HasEnergyConsumptionDetailsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasEnergyConsumptionDetailsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EnergyConsumptionDetails::try_from(v.clone()) { return Ok(HasEnergyConsumptionDetailsProp::EnergyConsumptionDetails(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HasEnergyConsumptionDetailsProp")]
impl TryFrom<&SchemaValue> for HasEnergyConsumptionDetailsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HasEnergyConsumptionDetailsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EnergyConsumptionDetails::try_from(v.clone()) { return Ok(HasEnergyConsumptionDetailsProp::EnergyConsumptionDetails(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The distance of the flight.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FlightDistanceProp")]
pub enum FlightDistanceProp {
Text(String),
Distance(Distance),
}
#[automatically_derived]
#[cfg(feature = "FlightDistanceProp")]
impl TryFrom<SchemaValue> for FlightDistanceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FlightDistanceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(FlightDistanceProp::Distance(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FlightDistanceProp")]
impl TryFrom<&SchemaValue> for FlightDistanceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FlightDistanceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Distance::try_from(v.clone()) { return Ok(FlightDistanceProp::Distance(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The method of cooking, such as Frying, Steaming, ...
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CookingMethodProp")]
pub enum CookingMethodProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CookingMethodProp")]
impl TryFrom<SchemaValue> for CookingMethodProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CookingMethodProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CookingMethodProp")]
impl TryFrom<&SchemaValue> for CookingMethodProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CookingMethodProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A person or organization attending the event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AttendeeProp")]
pub enum AttendeeProp {
Organization(Organization),
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "AttendeeProp")]
impl TryFrom<SchemaValue> for AttendeeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AttendeeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AttendeeProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AttendeeProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AttendeeProp")]
impl TryFrom<&SchemaValue> for AttendeeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AttendeeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(AttendeeProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AttendeeProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The allowed total occupancy for the accommodation in persons (including infants etc). For individual accommodations, this is not necessarily the legal maximum but defines the permitted usage as per the contractual agreement (e.g. a double room used by a single person).
/// Typical unit code(s): C62 for person
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OccupancyProp")]
pub enum OccupancyProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "OccupancyProp")]
impl TryFrom<SchemaValue> for OccupancyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OccupancyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(OccupancyProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OccupancyProp")]
impl TryFrom<&SchemaValue> for OccupancyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OccupancyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(OccupancyProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Identifier of the flight's arrival gate.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArrivalGateProp")]
pub enum ArrivalGateProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArrivalGateProp")]
impl TryFrom<SchemaValue> for ArrivalGateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalGateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArrivalGateProp")]
impl TryFrom<&SchemaValue> for ArrivalGateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArrivalGateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The textual content of this CreativeWork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TextProp")]
pub enum TextProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TextProp")]
impl TryFrom<SchemaValue> for TextProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TextProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TextProp")]
impl TryFrom<&SchemaValue> for TextProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TextProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The URL at which a reply may be posted to the specified UserComment.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReplyToUrlProp")]
pub enum ReplyToUrlProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "ReplyToUrlProp")]
impl TryFrom<SchemaValue> for ReplyToUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReplyToUrlProp::Text(v)),
SchemaValue::Url(v) => Ok(ReplyToUrlProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReplyToUrlProp")]
impl TryFrom<&SchemaValue> for ReplyToUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReplyToUrlProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ReplyToUrlProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The home team in a sports event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HomeTeamProp")]
pub enum HomeTeamProp {
Person(Person),
SportsTeam(SportsTeam),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HomeTeamProp")]
impl TryFrom<SchemaValue> for HomeTeamProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HomeTeamProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(HomeTeamProp::Person(object)) }
if let Ok(object) = SportsTeam::try_from(v.clone()) { return Ok(HomeTeamProp::SportsTeam(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HomeTeamProp")]
impl TryFrom<&SchemaValue> for HomeTeamProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HomeTeamProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(HomeTeamProp::Person(object)) }
if let Ok(object) = SportsTeam::try_from(v.clone()) { return Ok(HomeTeamProp::SportsTeam(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// This links to a node or nodes indicating the exact quantity of the products included in an [Offer] or [ProductCollection].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncludesObjectProp")]
pub enum IncludesObjectProp {
Text(String),
TypeAndQuantityNode(TypeAndQuantityNode),
}
#[automatically_derived]
#[cfg(feature = "IncludesObjectProp")]
impl TryFrom<SchemaValue> for IncludesObjectProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludesObjectProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TypeAndQuantityNode::try_from(v.clone()) { return Ok(IncludesObjectProp::TypeAndQuantityNode(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncludesObjectProp")]
impl TryFrom<&SchemaValue> for IncludesObjectProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludesObjectProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = TypeAndQuantityNode::try_from(v.clone()) { return Ok(IncludesObjectProp::TypeAndQuantityNode(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The Value-added Tax ID of the organization or person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VatIDProp")]
pub enum VatIDProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "VatIDProp")]
impl TryFrom<SchemaValue> for VatIDProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VatIDProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VatIDProp")]
impl TryFrom<&SchemaValue> for VatIDProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VatIDProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The quantity produced by the recipe (for example, number of people served, number of servings, etc).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecipeYieldProp")]
pub enum RecipeYieldProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecipeYieldProp")]
impl TryFrom<SchemaValue> for RecipeYieldProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeYieldProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(RecipeYieldProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecipeYieldProp")]
impl TryFrom<&SchemaValue> for RecipeYieldProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeYieldProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(RecipeYieldProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The supported encoding type(s) for an EntryPoint request.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EncodingTypeProp")]
pub enum EncodingTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EncodingTypeProp")]
impl TryFrom<SchemaValue> for EncodingTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EncodingTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EncodingTypeProp")]
impl TryFrom<&SchemaValue> for EncodingTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EncodingTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Component dependency requirements for application. This includes runtime environments and shared libraries that are not included in the application distribution package, but required to run the application (examples: DirectX, Java or .NET runtime).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SoftwareRequirementsProp")]
pub enum SoftwareRequirementsProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "SoftwareRequirementsProp")]
impl TryFrom<SchemaValue> for SoftwareRequirementsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SoftwareRequirementsProp::Text(v)),
SchemaValue::Url(v) => Ok(SoftwareRequirementsProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SoftwareRequirementsProp")]
impl TryFrom<&SchemaValue> for SoftwareRequirementsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SoftwareRequirementsProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(SoftwareRequirementsProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A competitor in a sports event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CompetitorProp")]
pub enum CompetitorProp {
Person(Person),
Text(String),
SportsTeam(SportsTeam),
}
#[automatically_derived]
#[cfg(feature = "CompetitorProp")]
impl TryFrom<SchemaValue> for CompetitorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CompetitorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CompetitorProp::Person(object)) }
if let Ok(object) = SportsTeam::try_from(v.clone()) { return Ok(CompetitorProp::SportsTeam(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CompetitorProp")]
impl TryFrom<&SchemaValue> for CompetitorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CompetitorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CompetitorProp::Person(object)) }
if let Ok(object) = SportsTeam::try_from(v.clone()) { return Ok(CompetitorProp::SportsTeam(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Description of bonus and commission compensation aspects of the job.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncentiveCompensationProp")]
pub enum IncentiveCompensationProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IncentiveCompensationProp")]
impl TryFrom<SchemaValue> for IncentiveCompensationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncentiveCompensationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncentiveCompensationProp")]
impl TryFrom<&SchemaValue> for IncentiveCompensationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncentiveCompensationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.
///
/// Usage guidelines:
///
/// * Use the [priceCurrency] property (with standard formats: [ISO 4217 currency format](http://en.wikipedia.org/wiki/ISO_4217), e.g. "USD"; [Ticker symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for cryptocurrencies, e.g. "BTC"; well known names for [Local Exchange Trading Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system) (LETS) and other currency types, e.g. "Ithaca HOUR") instead of including [ambiguous symbols](http://en.wikipedia.org/wiki/Dollar_sign#Currencies_that_use_the_dollar_or_peso_sign) such as '$' in the value.
/// * Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
/// * Note that both [RDFa](http://www.w3.org/TR/xhtml-rdfa-primer/#using-the-content-attribute) and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.
/// * Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PriceProp")]
pub enum PriceProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PriceProp")]
impl TryFrom<SchemaValue> for PriceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(PriceProp::Number(v)),
SchemaValue::Text(v) => Ok(PriceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PriceProp")]
impl TryFrom<&SchemaValue> for PriceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(PriceProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(PriceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Player type required—for example, Flash or Silverlight.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PlayerTypeProp")]
pub enum PlayerTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PlayerTypeProp")]
impl TryFrom<SchemaValue> for PlayerTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PlayerTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PlayerTypeProp")]
impl TryFrom<&SchemaValue> for PlayerTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PlayerTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Example/instance/realization/derivation of the concept of this creative work. E.g. the paperback edition, first edition, or e-book.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WorkExampleProp")]
pub enum WorkExampleProp {
CreativeWork(CreativeWork),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WorkExampleProp")]
impl TryFrom<SchemaValue> for WorkExampleProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkExampleProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(WorkExampleProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WorkExampleProp")]
impl TryFrom<&SchemaValue> for WorkExampleProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkExampleProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(WorkExampleProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifies the Person that is legally accountable for the CreativeWork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AccountablePersonProp")]
pub enum AccountablePersonProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AccountablePersonProp")]
impl TryFrom<SchemaValue> for AccountablePersonProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccountablePersonProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AccountablePersonProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AccountablePersonProp")]
impl TryFrom<&SchemaValue> for AccountablePersonProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AccountablePersonProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(AccountablePersonProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An honorific suffix following a Person's name such as M.D./PhD/MSCSW.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HonorificSuffixProp")]
pub enum HonorificSuffixProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HonorificSuffixProp")]
impl TryFrom<SchemaValue> for HonorificSuffixProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HonorificSuffixProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HonorificSuffixProp")]
impl TryFrom<&SchemaValue> for HonorificSuffixProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HonorificSuffixProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Disclosure about verification and fact-checking processes for a [NewsMediaOrganization] or other fact-checking [Organization].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "VerificationFactCheckingPolicyProp")]
pub enum VerificationFactCheckingPolicyProp {
Text(String),
Url(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "VerificationFactCheckingPolicyProp")]
impl TryFrom<SchemaValue> for VerificationFactCheckingPolicyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VerificationFactCheckingPolicyProp::Text(v)),
SchemaValue::Url(v) => Ok(VerificationFactCheckingPolicyProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(VerificationFactCheckingPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "VerificationFactCheckingPolicyProp")]
impl TryFrom<&SchemaValue> for VerificationFactCheckingPolicyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(VerificationFactCheckingPolicyProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(VerificationFactCheckingPolicyProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(VerificationFactCheckingPolicyProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Specifies the most energy efficient class on the regulated EU energy consumption scale for the product category a product belongs to. For example, energy consumption for televisions placed on the market after January 1, 2020 is scaled from D to A+++.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EnergyEfficiencyScaleMaxProp")]
pub enum EnergyEfficiencyScaleMaxProp {
Text(String),
EUEnergyEfficiencyEnumeration(EUEnergyEfficiencyEnumeration),
}
#[automatically_derived]
#[cfg(feature = "EnergyEfficiencyScaleMaxProp")]
impl TryFrom<SchemaValue> for EnergyEfficiencyScaleMaxProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EnergyEfficiencyScaleMaxProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EUEnergyEfficiencyEnumeration::try_from(v.clone()) { return Ok(EnergyEfficiencyScaleMaxProp::EUEnergyEfficiencyEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EnergyEfficiencyScaleMaxProp")]
impl TryFrom<&SchemaValue> for EnergyEfficiencyScaleMaxProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EnergyEfficiencyScaleMaxProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = EUEnergyEfficiencyEnumeration::try_from(v.clone()) { return Ok(EnergyEfficiencyScaleMaxProp::EUEnergyEfficiencyEnumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The distance between the centers of the front and rear wheels.
///
/// Typical unit code(s): CMT for centimeters, MTR for meters, INH for inches, FOT for foot/feet
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WheelbaseProp")]
pub enum WheelbaseProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WheelbaseProp")]
impl TryFrom<SchemaValue> for WheelbaseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WheelbaseProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(WheelbaseProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WheelbaseProp")]
impl TryFrom<&SchemaValue> for WheelbaseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WheelbaseProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(WheelbaseProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// If this MediaObject is an AudioObject or VideoObject, the transcript of that object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TranscriptProp")]
pub enum TranscriptProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TranscriptProp")]
impl TryFrom<SchemaValue> for TranscriptProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TranscriptProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TranscriptProp")]
impl TryFrom<&SchemaValue> for TranscriptProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TranscriptProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An application that can complete the request.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ApplicationProp")]
pub enum ApplicationProp {
Text(String),
SoftwareApplication(SoftwareApplication),
}
#[automatically_derived]
#[cfg(feature = "ApplicationProp")]
impl TryFrom<SchemaValue> for ApplicationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SoftwareApplication::try_from(v.clone()) { return Ok(ApplicationProp::SoftwareApplication(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ApplicationProp")]
impl TryFrom<&SchemaValue> for ApplicationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ApplicationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = SoftwareApplication::try_from(v.clone()) { return Ok(ApplicationProp::SoftwareApplication(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The person or organization who wrote a composition, or who is the composer of a work performed at some event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ComposerProp")]
pub enum ComposerProp {
Text(String),
Organization(Organization),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "ComposerProp")]
impl TryFrom<SchemaValue> for ComposerProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ComposerProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ComposerProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ComposerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ComposerProp")]
impl TryFrom<&SchemaValue> for ComposerProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ComposerProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ComposerProp::Organization(object)) }
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ComposerProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Information about travel bans, e.g. in the context of a pandemic.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TravelBansProp")]
pub enum TravelBansProp {
Text(String),
Url(String),
WebContent(WebContent),
}
#[automatically_derived]
#[cfg(feature = "TravelBansProp")]
impl TryFrom<SchemaValue> for TravelBansProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TravelBansProp::Text(v)),
SchemaValue::Url(v) => Ok(TravelBansProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(TravelBansProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TravelBansProp")]
impl TryFrom<&SchemaValue> for TravelBansProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TravelBansProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(TravelBansProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(TravelBansProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An additional name for a Person, can be used for a middle name.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AdditionalNameProp")]
pub enum AdditionalNameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "AdditionalNameProp")]
impl TryFrom<SchemaValue> for AdditionalNameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdditionalNameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AdditionalNameProp")]
impl TryFrom<&SchemaValue> for AdditionalNameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdditionalNameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A colleague of the person.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ColleaguesProp")]
pub enum ColleaguesProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ColleaguesProp")]
impl TryFrom<SchemaValue> for ColleaguesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ColleaguesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ColleaguesProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ColleaguesProp")]
impl TryFrom<&SchemaValue> for ColleaguesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ColleaguesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ColleaguesProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The duration for which the given offer is valid.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EligibleDurationProp")]
pub enum EligibleDurationProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EligibleDurationProp")]
impl TryFrom<SchemaValue> for EligibleDurationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibleDurationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(EligibleDurationProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EligibleDurationProp")]
impl TryFrom<&SchemaValue> for EligibleDurationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibleDurationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(EligibleDurationProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The party holding the legal copyright to the CreativeWork.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CopyrightHolderProp")]
pub enum CopyrightHolderProp {
Text(String),
Person(Person),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "CopyrightHolderProp")]
impl TryFrom<SchemaValue> for CopyrightHolderProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CopyrightHolderProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CopyrightHolderProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CopyrightHolderProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CopyrightHolderProp")]
impl TryFrom<&SchemaValue> for CopyrightHolderProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CopyrightHolderProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(CopyrightHolderProp::Person(object)) }
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(CopyrightHolderProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Strength of the guideline's recommendation (e.g. 'class I').
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecommendationStrengthProp")]
pub enum RecommendationStrengthProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RecommendationStrengthProp")]
impl TryFrom<SchemaValue> for RecommendationStrengthProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecommendationStrengthProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecommendationStrengthProp")]
impl TryFrom<&SchemaValue> for RecommendationStrengthProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecommendationStrengthProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The coding system, e.g. 'ICD-10'.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CodingSystemProp")]
pub enum CodingSystemProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CodingSystemProp")]
impl TryFrom<SchemaValue> for CodingSystemProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CodingSystemProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CodingSystemProp")]
impl TryFrom<&SchemaValue> for CodingSystemProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CodingSystemProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The URL for sending a payment.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PaymentUrlProp")]
pub enum PaymentUrlProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "PaymentUrlProp")]
impl TryFrom<SchemaValue> for PaymentUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentUrlProp::Text(v)),
SchemaValue::Url(v) => Ok(PaymentUrlProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PaymentUrlProp")]
impl TryFrom<&SchemaValue> for PaymentUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PaymentUrlProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(PaymentUrlProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A set of links that can help a user understand and navigate a website hierarchy.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BreadcrumbProp")]
pub enum BreadcrumbProp {
BreadcrumbList(BreadcrumbList),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BreadcrumbProp")]
impl TryFrom<SchemaValue> for BreadcrumbProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BreadcrumbProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BreadcrumbList::try_from(v.clone()) { return Ok(BreadcrumbProp::BreadcrumbList(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BreadcrumbProp")]
impl TryFrom<&SchemaValue> for BreadcrumbProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BreadcrumbProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BreadcrumbList::try_from(v.clone()) { return Ok(BreadcrumbProp::BreadcrumbList(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The position of an item in a series or sequence of items.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PositionProp")]
pub enum PositionProp {
Text(String),
Integer(i64),
}
#[automatically_derived]
#[cfg(feature = "PositionProp")]
impl TryFrom<SchemaValue> for PositionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PositionProp::Text(v)),
SchemaValue::Integer(v) => Ok(PositionProp::Integer(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PositionProp")]
impl TryFrom<&SchemaValue> for PositionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(PositionProp::Text(v.clone())),
SchemaValue::Integer(v) => Ok(PositionProp::Integer(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A person assigned to instruct or provide instructional assistance for the [CourseInstance].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "InstructorProp")]
pub enum InstructorProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "InstructorProp")]
impl TryFrom<SchemaValue> for InstructorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InstructorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(InstructorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "InstructorProp")]
impl TryFrom<&SchemaValue> for InstructorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(InstructorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(InstructorProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The amount of money.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AmountProp")]
pub enum AmountProp {
Text(String),
MonetaryAmount(MonetaryAmount),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "AmountProp")]
impl TryFrom<SchemaValue> for AmountProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AmountProp::Text(v)),
SchemaValue::Number(v) => Ok(AmountProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(AmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AmountProp")]
impl TryFrom<&SchemaValue> for AmountProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AmountProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(AmountProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(AmountProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A flag to signal that the [Place] is open to public visitors. If this property is omitted there is no assumed default boolean value
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "PublicAccessProp")]
pub enum PublicAccessProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "PublicAccessProp")]
impl TryFrom<SchemaValue> for PublicAccessProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(PublicAccessProp::Boolean(v)),
SchemaValue::Text(v) => Ok(PublicAccessProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "PublicAccessProp")]
impl TryFrom<&SchemaValue> for PublicAccessProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(PublicAccessProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(PublicAccessProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A sub property of location. The course where this action was taken.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ExerciseCourseProp")]
pub enum ExerciseCourseProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ExerciseCourseProp")]
impl TryFrom<SchemaValue> for ExerciseCourseProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExerciseCourseProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ExerciseCourseProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ExerciseCourseProp")]
impl TryFrom<&SchemaValue> for ExerciseCourseProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ExerciseCourseProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(ExerciseCourseProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Position of the clip within an ordered group of clips.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ClipNumberProp")]
pub enum ClipNumberProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ClipNumberProp")]
impl TryFrom<SchemaValue> for ClipNumberProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(ClipNumberProp::Integer(v)),
SchemaValue::Text(v) => Ok(ClipNumberProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ClipNumberProp")]
impl TryFrom<&SchemaValue> for ClipNumberProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(ClipNumberProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(ClipNumberProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Identifies the denominator variable when an observation represents a ratio or percentage.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MeasurementDenominatorProp")]
pub enum MeasurementDenominatorProp {
Text(String),
StatisticalVariable(StatisticalVariable),
}
#[automatically_derived]
#[cfg(feature = "MeasurementDenominatorProp")]
impl TryFrom<SchemaValue> for MeasurementDenominatorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MeasurementDenominatorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = StatisticalVariable::try_from(v.clone()) { return Ok(MeasurementDenominatorProp::StatisticalVariable(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MeasurementDenominatorProp")]
impl TryFrom<&SchemaValue> for MeasurementDenominatorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MeasurementDenominatorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = StatisticalVariable::try_from(v.clone()) { return Ok(MeasurementDenominatorProp::StatisticalVariable(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The International Standard Serial Number (ISSN) that identifies this serial publication. You can repeat this property to identify different formats of, or the linking ISSN (ISSN-L) for, this serial publication.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IssnProp")]
pub enum IssnProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IssnProp")]
impl TryFrom<SchemaValue> for IssnProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IssnProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IssnProp")]
impl TryFrom<&SchemaValue> for IssnProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IssnProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The scope of the warranty promise.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WarrantyScopeProp")]
pub enum WarrantyScopeProp {
WarrantyScope(WarrantyScope),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WarrantyScopeProp")]
impl TryFrom<SchemaValue> for WarrantyScopeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WarrantyScopeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WarrantyScope::try_from(v.clone()) { return Ok(WarrantyScopeProp::WarrantyScope(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WarrantyScopeProp")]
impl TryFrom<&SchemaValue> for WarrantyScopeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WarrantyScopeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = WarrantyScope::try_from(v.clone()) { return Ok(WarrantyScopeProp::WarrantyScope(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Provides additional qualification to an observation. For example, a GDP observation measures the Nominal value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MeasurementQualifierProp")]
pub enum MeasurementQualifierProp {
Text(String),
Enumeration(Enumeration),
}
#[automatically_derived]
#[cfg(feature = "MeasurementQualifierProp")]
impl TryFrom<SchemaValue> for MeasurementQualifierProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MeasurementQualifierProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Enumeration::try_from(v.clone()) { return Ok(MeasurementQualifierProp::Enumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MeasurementQualifierProp")]
impl TryFrom<&SchemaValue> for MeasurementQualifierProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MeasurementQualifierProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Enumeration::try_from(v.clone()) { return Ok(MeasurementQualifierProp::Enumeration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The Occupation for the JobPosting.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RelevantOccupationProp")]
pub enum RelevantOccupationProp {
Occupation(Occupation),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "RelevantOccupationProp")]
impl TryFrom<SchemaValue> for RelevantOccupationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelevantOccupationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Occupation::try_from(v.clone()) { return Ok(RelevantOccupationProp::Occupation(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RelevantOccupationProp")]
impl TryFrom<&SchemaValue> for RelevantOccupationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RelevantOccupationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Occupation::try_from(v.clone()) { return Ok(RelevantOccupationProp::Occupation(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Represents spatial relations in which two geometries (or the places they represent) are topologically equal, as defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM). "Two geometries are topologically equal if their interiors intersect and no part of the interior or boundary of one geometry intersects the exterior of the other" (a symmetric relationship).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GeoEqualsProp")]
pub enum GeoEqualsProp {
Text(String),
Place(Place),
GeospatialGeometry(GeospatialGeometry),
}
#[automatically_derived]
#[cfg(feature = "GeoEqualsProp")]
impl TryFrom<SchemaValue> for GeoEqualsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoEqualsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoEqualsProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoEqualsProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GeoEqualsProp")]
impl TryFrom<&SchemaValue> for GeoEqualsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GeoEqualsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(GeoEqualsProp::Place(object)) }
if let Ok(object) = GeospatialGeometry::try_from(v.clone()) { return Ok(GeoEqualsProp::GeospatialGeometry(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A step in making the recipe, in the form of a single item (document, video, etc.) or an ordered list with HowToStep and/or HowToSection items.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RecipeInstructionsProp")]
pub enum RecipeInstructionsProp {
ItemList(ItemList),
Text(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "RecipeInstructionsProp")]
impl TryFrom<SchemaValue> for RecipeInstructionsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeInstructionsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(RecipeInstructionsProp::ItemList(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(RecipeInstructionsProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RecipeInstructionsProp")]
impl TryFrom<&SchemaValue> for RecipeInstructionsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RecipeInstructionsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(RecipeInstructionsProp::ItemList(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(RecipeInstructionsProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The location of origin of the trip, prior to any destination(s).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TripOriginProp")]
pub enum TripOriginProp {
Place(Place),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TripOriginProp")]
impl TryFrom<SchemaValue> for TripOriginProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TripOriginProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(TripOriginProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TripOriginProp")]
impl TryFrom<&SchemaValue> for TripOriginProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TripOriginProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(TripOriginProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A data catalog which contains this dataset.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IncludedInDataCatalogProp")]
pub enum IncludedInDataCatalogProp {
DataCatalog(DataCatalog),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IncludedInDataCatalogProp")]
impl TryFrom<SchemaValue> for IncludedInDataCatalogProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludedInDataCatalogProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataCatalog::try_from(v.clone()) { return Ok(IncludedInDataCatalogProp::DataCatalog(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IncludedInDataCatalogProp")]
impl TryFrom<&SchemaValue> for IncludedInDataCatalogProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IncludedInDataCatalogProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DataCatalog::try_from(v.clone()) { return Ok(IncludedInDataCatalogProp::DataCatalog(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The name of the item.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NameProp")]
pub enum NameProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "NameProp")]
impl TryFrom<SchemaValue> for NameProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NameProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NameProp")]
impl TryFrom<&SchemaValue> for NameProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NameProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The supporting materials for the artwork, e.g. Canvas, Paper, Wood, Board, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArtworkSurfaceProp")]
pub enum ArtworkSurfaceProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "ArtworkSurfaceProp")]
impl TryFrom<SchemaValue> for ArtworkSurfaceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArtworkSurfaceProp::Text(v)),
SchemaValue::Url(v) => Ok(ArtworkSurfaceProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArtworkSurfaceProp")]
impl TryFrom<&SchemaValue> for ArtworkSurfaceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArtworkSurfaceProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(ArtworkSurfaceProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// For failed actions, more information on the cause of the failure.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ErrorProp")]
pub enum ErrorProp {
Thing(Thing),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ErrorProp")]
impl TryFrom<SchemaValue> for ErrorProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ErrorProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ErrorProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ErrorProp")]
impl TryFrom<&SchemaValue> for ErrorProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ErrorProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ErrorProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Indicates the mobility of a provided service (e.g. 'static', 'dynamic').
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProviderMobilityProp")]
pub enum ProviderMobilityProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProviderMobilityProp")]
impl TryFrom<SchemaValue> for ProviderMobilityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProviderMobilityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProviderMobilityProp")]
impl TryFrom<&SchemaValue> for ProviderMobilityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProviderMobilityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The place where the person died.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DeathPlaceProp")]
pub enum DeathPlaceProp {
Text(String),
Place(Place),
}
#[automatically_derived]
#[cfg(feature = "DeathPlaceProp")]
impl TryFrom<SchemaValue> for DeathPlaceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeathPlaceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(DeathPlaceProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DeathPlaceProp")]
impl TryFrom<&SchemaValue> for DeathPlaceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DeathPlaceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Place::try_from(v.clone()) { return Ok(DeathPlaceProp::Place(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The amount of fuel consumed for traveling a particular distance or temporal duration with the given vehicle (e.g. liters per 100 km).
///
/// * Note 1: There are unfortunately no standard unit codes for liters per 100 km. Use [unitText] to indicate the unit of measurement, e.g. L/100 km.
/// * Note 2: There are two ways of indicating the fuel consumption, [fuelConsumption] (e.g. 8 liters per 100 km) and [fuelEfficiency] (e.g. 30 miles per gallon). They are reciprocal.
/// * Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use [valueReference] to link the value for the fuel consumption to another value.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FuelConsumptionProp")]
pub enum FuelConsumptionProp {
Text(String),
QuantitativeValue(QuantitativeValue),
}
#[automatically_derived]
#[cfg(feature = "FuelConsumptionProp")]
impl TryFrom<SchemaValue> for FuelConsumptionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FuelConsumptionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(FuelConsumptionProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FuelConsumptionProp")]
impl TryFrom<&SchemaValue> for FuelConsumptionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FuelConsumptionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(FuelConsumptionProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The total number of individuals that may attend an event or venue.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MaximumAttendeeCapacityProp")]
pub enum MaximumAttendeeCapacityProp {
Integer(i64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MaximumAttendeeCapacityProp")]
impl TryFrom<SchemaValue> for MaximumAttendeeCapacityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(MaximumAttendeeCapacityProp::Integer(v)),
SchemaValue::Text(v) => Ok(MaximumAttendeeCapacityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MaximumAttendeeCapacityProp")]
impl TryFrom<&SchemaValue> for MaximumAttendeeCapacityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Integer(v) => Ok(MaximumAttendeeCapacityProp::Integer(v.clone())),
SchemaValue::Text(v) => Ok(MaximumAttendeeCapacityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The time admission will commence.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DoorTimeProp")]
pub enum DoorTimeProp {
DateTime(String),
Time(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DoorTimeProp")]
impl TryFrom<SchemaValue> for DoorTimeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(DoorTimeProp::DateTime(v)),
SchemaValue::Time(v) => Ok(DoorTimeProp::Time(v)),
SchemaValue::Text(v) => Ok(DoorTimeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DoorTimeProp")]
impl TryFrom<&SchemaValue> for DoorTimeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(DoorTimeProp::DateTime(v.clone())),
SchemaValue::Time(v) => Ok(DoorTimeProp::Time(v.clone())),
SchemaValue::Text(v) => Ok(DoorTimeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The [mobileUrl] property is provided for specific situations in which data consumers need to determine whether one of several provided URLs is a dedicated 'mobile site'.
///
/// To discourage over-use, and reflecting intial usecases, the property is expected only on [Product] and [Offer], rather than [Thing]. The general trend in web technology is towards [responsive design](https://en.wikipedia.org/wiki/Responsive_web_design) in which content can be flexibly adapted to a wide range of browsing environments. Pages and sites referenced with the long-established [url] property should ideally also be usable on a wide variety of devices, including mobile phones. In most cases, it would be pointless and counter productive to attempt to update all [url] markup to use [mobileUrl] for more mobile-oriented pages. The property is intended for the case when items (primarily [Product] and [Offer]) have extra URLs hosted on an additional "mobile site" alongside the main one. It should not be taken as an endorsement of this publication style.
///
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MobileUrlProp")]
pub enum MobileUrlProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "MobileUrlProp")]
impl TryFrom<SchemaValue> for MobileUrlProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MobileUrlProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MobileUrlProp")]
impl TryFrom<&SchemaValue> for MobileUrlProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MobileUrlProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The shipping rate is the cost of shipping to the specified destination. Typically, the maxValue and currency values (of the [MonetaryAmount]) are most appropriate.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ShippingRateProp")]
pub enum ShippingRateProp {
Text(String),
MonetaryAmount(MonetaryAmount),
}
#[automatically_derived]
#[cfg(feature = "ShippingRateProp")]
impl TryFrom<SchemaValue> for ShippingRateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ShippingRateProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(ShippingRateProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ShippingRateProp")]
impl TryFrom<&SchemaValue> for ShippingRateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ShippingRateProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(ShippingRateProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Provides negative considerations regarding something, most typically in pro/con lists for reviews (alongside [positiveNotes]). For symmetry
///
/// In the case of a [Review], the property describes the [itemReviewed] from the perspective of the review; in the case of a [Product], the product itself is being described. Since product descriptions
/// tend to emphasise positive claims, it may be relatively unusual to find [negativeNotes] used in this way. Nevertheless for the sake of symmetry, [negativeNotes] can be used on [Product].
///
/// The property values can be expressed either as unstructured text (repeated as necessary), or if ordered, as a list (in which case the most negative is at the beginning of the list).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NegativeNotesProp")]
pub enum NegativeNotesProp {
Text(String),
ListItem(ListItem),
ItemList(ItemList),
WebContent(WebContent),
}
#[automatically_derived]
#[cfg(feature = "NegativeNotesProp")]
impl TryFrom<SchemaValue> for NegativeNotesProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NegativeNotesProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ListItem::try_from(v.clone()) { return Ok(NegativeNotesProp::ListItem(object)) }
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(NegativeNotesProp::ItemList(object)) }
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(NegativeNotesProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NegativeNotesProp")]
impl TryFrom<&SchemaValue> for NegativeNotesProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NegativeNotesProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ListItem::try_from(v.clone()) { return Ok(NegativeNotesProp::ListItem(object)) }
if let Ok(object) = ItemList::try_from(v.clone()) { return Ok(NegativeNotesProp::ItemList(object)) }
if let Ok(object) = WebContent::try_from(v.clone()) { return Ok(NegativeNotesProp::WebContent(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Attraction suitable for type(s) of tourist. E.g. children, visitors from a particular country, etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TouristTypeProp")]
pub enum TouristTypeProp {
Audience(Audience),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TouristTypeProp")]
impl TryFrom<SchemaValue> for TouristTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TouristTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(TouristTypeProp::Audience(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TouristTypeProp")]
impl TryFrom<&SchemaValue> for TouristTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TouristTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Audience::try_from(v.clone()) { return Ok(TouristTypeProp::Audience(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// What type of code sample: full (compile ready) solution, code snippet, inline code, scripts, template.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CodeSampleTypeProp")]
pub enum CodeSampleTypeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CodeSampleTypeProp")]
impl TryFrom<SchemaValue> for CodeSampleTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CodeSampleTypeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CodeSampleTypeProp")]
impl TryFrom<&SchemaValue> for CodeSampleTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CodeSampleTypeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date and place the work was first performed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FirstPerformanceProp")]
pub enum FirstPerformanceProp {
Event(Event),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "FirstPerformanceProp")]
impl TryFrom<SchemaValue> for FirstPerformanceProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FirstPerformanceProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(FirstPerformanceProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FirstPerformanceProp")]
impl TryFrom<&SchemaValue> for FirstPerformanceProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FirstPerformanceProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Event::try_from(v.clone()) { return Ok(FirstPerformanceProp::Event(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The person who wrote the words.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LyricistProp")]
pub enum LyricistProp {
Text(String),
Person(Person),
}
#[automatically_derived]
#[cfg(feature = "LyricistProp")]
impl TryFrom<SchemaValue> for LyricistProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LyricistProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LyricistProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LyricistProp")]
impl TryFrom<&SchemaValue> for LyricistProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(LyricistProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(LyricistProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProgramMembershipUsedProp")]
pub enum ProgramMembershipUsedProp {
ProgramMembership(ProgramMembership),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ProgramMembershipUsedProp")]
impl TryFrom<SchemaValue> for ProgramMembershipUsedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgramMembershipUsedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProgramMembership::try_from(v.clone()) { return Ok(ProgramMembershipUsedProp::ProgramMembership(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProgramMembershipUsedProp")]
impl TryFrom<&SchemaValue> for ProgramMembershipUsedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProgramMembershipUsedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ProgramMembership::try_from(v.clone()) { return Ok(ProgramMembershipUsedProp::ProgramMembership(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A CreativeWork such as an image, video, or audio clip shared as part of this posting.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SharedContentProp")]
pub enum SharedContentProp {
Text(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "SharedContentProp")]
impl TryFrom<SchemaValue> for SharedContentProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SharedContentProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(SharedContentProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SharedContentProp")]
impl TryFrom<&SchemaValue> for SharedContentProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SharedContentProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(SharedContentProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// An honorific prefix preceding a Person's name such as Dr/Mrs/Mr.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HonorificPrefixProp")]
pub enum HonorificPrefixProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HonorificPrefixProp")]
impl TryFrom<SchemaValue> for HonorificPrefixProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HonorificPrefixProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HonorificPrefixProp")]
impl TryFrom<&SchemaValue> for HonorificPrefixProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HonorificPrefixProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Number of times one should repeat the activity.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "RepetitionsProp")]
pub enum RepetitionsProp {
Text(String),
QuantitativeValue(QuantitativeValue),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "RepetitionsProp")]
impl TryFrom<SchemaValue> for RepetitionsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RepetitionsProp::Text(v)),
SchemaValue::Number(v) => Ok(RepetitionsProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(RepetitionsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "RepetitionsProp")]
impl TryFrom<&SchemaValue> for RepetitionsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(RepetitionsProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(RepetitionsProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(RepetitionsProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The organization owning or operating the broadcast service.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BroadcasterProp")]
pub enum BroadcasterProp {
Organization(Organization),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "BroadcasterProp")]
impl TryFrom<SchemaValue> for BroadcasterProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcasterProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BroadcasterProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BroadcasterProp")]
impl TryFrom<&SchemaValue> for BroadcasterProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BroadcasterProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(BroadcasterProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A floor limit is the amount of money above which credit card transactions must be authorized.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "FloorLimitProp")]
pub enum FloorLimitProp {
Text(String),
MonetaryAmount(MonetaryAmount),
}
#[automatically_derived]
#[cfg(feature = "FloorLimitProp")]
impl TryFrom<SchemaValue> for FloorLimitProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FloorLimitProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(FloorLimitProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "FloorLimitProp")]
impl TryFrom<&SchemaValue> for FloorLimitProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(FloorLimitProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(FloorLimitProp::MonetaryAmount(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The observationDate of an [Observation].
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ObservationDateProp")]
pub enum ObservationDateProp {
Text(String),
DateTime(String),
}
#[automatically_derived]
#[cfg(feature = "ObservationDateProp")]
impl TryFrom<SchemaValue> for ObservationDateProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ObservationDateProp::Text(v)),
SchemaValue::DateTime(v) => Ok(ObservationDateProp::DateTime(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ObservationDateProp")]
impl TryFrom<&SchemaValue> for ObservationDateProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ObservationDateProp::Text(v.clone())),
SchemaValue::DateTime(v) => Ok(ObservationDateProp::DateTime(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A schematic image showing the floorplan layout.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "LayoutImageProp")]
pub enum LayoutImageProp {
ImageObject(ImageObject),
Url(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "LayoutImageProp")]
impl TryFrom<SchemaValue> for LayoutImageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(LayoutImageProp::Url(v)),
SchemaValue::Text(v) => Ok(LayoutImageProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(LayoutImageProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "LayoutImageProp")]
impl TryFrom<&SchemaValue> for LayoutImageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Url(v) => Ok(LayoutImageProp::Url(v.clone())),
SchemaValue::Text(v) => Ok(LayoutImageProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = ImageObject::try_from(v.clone()) { return Ok(LayoutImageProp::ImageObject(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The album this is a release of.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ReleaseOfProp")]
pub enum ReleaseOfProp {
Text(String),
MusicAlbum(MusicAlbum),
}
#[automatically_derived]
#[cfg(feature = "ReleaseOfProp")]
impl TryFrom<SchemaValue> for ReleaseOfProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReleaseOfProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbum::try_from(v.clone()) { return Ok(ReleaseOfProp::MusicAlbum(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ReleaseOfProp")]
impl TryFrom<&SchemaValue> for ReleaseOfProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ReleaseOfProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MusicAlbum::try_from(v.clone()) { return Ok(ReleaseOfProp::MusicAlbum(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Headline of the article.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "HeadlineProp")]
pub enum HeadlineProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "HeadlineProp")]
impl TryFrom<SchemaValue> for HeadlineProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HeadlineProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "HeadlineProp")]
impl TryFrom<&SchemaValue> for HeadlineProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(HeadlineProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A therapy that duplicates or overlaps this one.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DuplicateTherapyProp")]
pub enum DuplicateTherapyProp {
MedicalTherapy(MedicalTherapy),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DuplicateTherapyProp")]
impl TryFrom<SchemaValue> for DuplicateTherapyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DuplicateTherapyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(DuplicateTherapyProp::MedicalTherapy(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DuplicateTherapyProp")]
impl TryFrom<&SchemaValue> for DuplicateTherapyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DuplicateTherapyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MedicalTherapy::try_from(v.clone()) { return Ok(DuplicateTherapyProp::MedicalTherapy(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Whether borrower is a resident of the jurisdiction where the property is located.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DomiciledMortgageProp")]
pub enum DomiciledMortgageProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "DomiciledMortgageProp")]
impl TryFrom<SchemaValue> for DomiciledMortgageProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DomiciledMortgageProp::Text(v)),
SchemaValue::Boolean(v) => Ok(DomiciledMortgageProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DomiciledMortgageProp")]
impl TryFrom<&SchemaValue> for DomiciledMortgageProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DomiciledMortgageProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(DomiciledMortgageProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Quantitative measure of the physiologic output of the exercise; also referred to as energy expenditure.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "WorkloadProp")]
pub enum WorkloadProp {
QuantitativeValue(QuantitativeValue),
Energy(Energy),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "WorkloadProp")]
impl TryFrom<SchemaValue> for WorkloadProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkloadProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(WorkloadProp::QuantitativeValue(object)) }
if let Ok(object) = Energy::try_from(v.clone()) { return Ok(WorkloadProp::Energy(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "WorkloadProp")]
impl TryFrom<&SchemaValue> for WorkloadProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(WorkloadProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(WorkloadProp::QuantitativeValue(object)) }
if let Ok(object) = Energy::try_from(v.clone()) { return Ok(WorkloadProp::Energy(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The identifier for the [Course] used by the course [provider] (e.g. CS101 or 6.001).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CourseCodeProp")]
pub enum CourseCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CourseCodeProp")]
impl TryFrom<SchemaValue> for CourseCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CourseCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CourseCodeProp")]
impl TryFrom<&SchemaValue> for CourseCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(CourseCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// True if the broadcast is of a live event.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsLiveBroadcastProp")]
pub enum IsLiveBroadcastProp {
Text(String),
Boolean(bool),
}
#[automatically_derived]
#[cfg(feature = "IsLiveBroadcastProp")]
impl TryFrom<SchemaValue> for IsLiveBroadcastProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsLiveBroadcastProp::Text(v)),
SchemaValue::Boolean(v) => Ok(IsLiveBroadcastProp::Boolean(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsLiveBroadcastProp")]
impl TryFrom<&SchemaValue> for IsLiveBroadcastProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(IsLiveBroadcastProp::Text(v.clone())),
SchemaValue::Boolean(v) => Ok(IsLiveBroadcastProp::Boolean(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// Recommended intake of this supplement for a given population as defined by a specific recommending authority.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "MaximumIntakeProp")]
pub enum MaximumIntakeProp {
Text(String),
MaximumDoseSchedule(MaximumDoseSchedule),
}
#[automatically_derived]
#[cfg(feature = "MaximumIntakeProp")]
impl TryFrom<SchemaValue> for MaximumIntakeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MaximumIntakeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MaximumDoseSchedule::try_from(v.clone()) { return Ok(MaximumIntakeProp::MaximumDoseSchedule(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "MaximumIntakeProp")]
impl TryFrom<&SchemaValue> for MaximumIntakeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(MaximumIntakeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MaximumDoseSchedule::try_from(v.clone()) { return Ok(MaximumIntakeProp::MaximumDoseSchedule(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Of a [Person], and less typically of an [Organization], to indicate a topic that is known about - suggesting possible expertise but not implying it. We do not distinguish skill levels here, or relate this to educational content, events, objectives or [JobPosting] descriptions.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "KnowsAboutProp")]
pub enum KnowsAboutProp {
Text(String),
Thing(Thing),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "KnowsAboutProp")]
impl TryFrom<SchemaValue> for KnowsAboutProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(KnowsAboutProp::Text(v)),
SchemaValue::Url(v) => Ok(KnowsAboutProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(KnowsAboutProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "KnowsAboutProp")]
impl TryFrom<&SchemaValue> for KnowsAboutProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(KnowsAboutProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(KnowsAboutProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(KnowsAboutProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Whether the provider is accepting new patients.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsAcceptingNewPatientsProp")]
pub enum IsAcceptingNewPatientsProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IsAcceptingNewPatientsProp")]
impl TryFrom<SchemaValue> for IsAcceptingNewPatientsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(IsAcceptingNewPatientsProp::Boolean(v)),
SchemaValue::Text(v) => Ok(IsAcceptingNewPatientsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsAcceptingNewPatientsProp")]
impl TryFrom<&SchemaValue> for IsAcceptingNewPatientsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(IsAcceptingNewPatientsProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(IsAcceptingNewPatientsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// This ordering relation for qualitative values indicates that the subject is greater than the object.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "GreaterProp")]
pub enum GreaterProp {
Text(String),
QualitativeValue(QualitativeValue),
}
#[automatically_derived]
#[cfg(feature = "GreaterProp")]
impl TryFrom<SchemaValue> for GreaterProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GreaterProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(GreaterProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "GreaterProp")]
impl TryFrom<&SchemaValue> for GreaterProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(GreaterProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QualitativeValue::try_from(v.clone()) { return Ok(GreaterProp::QualitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A flag to signal that the item, event, or place is accessible for free.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "IsAccessibleForFreeProp")]
pub enum IsAccessibleForFreeProp {
Boolean(bool),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "IsAccessibleForFreeProp")]
impl TryFrom<SchemaValue> for IsAccessibleForFreeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(IsAccessibleForFreeProp::Boolean(v)),
SchemaValue::Text(v) => Ok(IsAccessibleForFreeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "IsAccessibleForFreeProp")]
impl TryFrom<&SchemaValue> for IsAccessibleForFreeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Boolean(v) => Ok(IsAccessibleForFreeProp::Boolean(v.clone())),
SchemaValue::Text(v) => Ok(IsAccessibleForFreeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The date on which the CreativeWork was created or the item was added to a DataFeed.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DateCreatedProp")]
pub enum DateCreatedProp {
DateTime(String),
Date(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DateCreatedProp")]
impl TryFrom<SchemaValue> for DateCreatedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(DateCreatedProp::DateTime(v)),
SchemaValue::Date(v) => Ok(DateCreatedProp::Date(v)),
SchemaValue::Text(v) => Ok(DateCreatedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DateCreatedProp")]
impl TryFrom<&SchemaValue> for DateCreatedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(DateCreatedProp::DateTime(v.clone())),
SchemaValue::Date(v) => Ok(DateCreatedProp::Date(v.clone())),
SchemaValue::Text(v) => Ok(DateCreatedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The section location of the reserved seat (e.g. Orchestra).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SeatSectionProp")]
pub enum SeatSectionProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SeatSectionProp")]
impl TryFrom<SchemaValue> for SeatSectionProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeatSectionProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SeatSectionProp")]
impl TryFrom<&SchemaValue> for SeatSectionProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeatSectionProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// numicubeds - ICU BEDS: Total number of staffed inpatient intensive care unit (ICU) beds.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "CvdNumICUBedsProp")]
pub enum CvdNumICUBedsProp {
Number(f64),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "CvdNumICUBedsProp")]
impl TryFrom<SchemaValue> for CvdNumICUBedsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumICUBedsProp::Number(v)),
SchemaValue::Text(v) => Ok(CvdNumICUBedsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "CvdNumICUBedsProp")]
impl TryFrom<&SchemaValue> for CvdNumICUBedsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Number(v) => Ok(CvdNumICUBedsProp::Number(v.clone())),
SchemaValue::Text(v) => Ok(CvdNumICUBedsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The production company or studio responsible for the item, e.g. series, video game, episode etc.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ProductionCompanyProp")]
pub enum ProductionCompanyProp {
Text(String),
Organization(Organization),
}
#[automatically_derived]
#[cfg(feature = "ProductionCompanyProp")]
impl TryFrom<SchemaValue> for ProductionCompanyProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProductionCompanyProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ProductionCompanyProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ProductionCompanyProp")]
impl TryFrom<&SchemaValue> for ProductionCompanyProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ProductionCompanyProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Organization::try_from(v.clone()) { return Ok(ProductionCompanyProp::Organization(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The primary artist for a work
/// in a medium other than pencils or digital line art--for example, if the
/// primary artwork is done in watercolors or digital paints.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ArtistProp")]
pub enum ArtistProp {
Person(Person),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ArtistProp")]
impl TryFrom<SchemaValue> for ArtistProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArtistProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ArtistProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ArtistProp")]
impl TryFrom<&SchemaValue> for ArtistProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ArtistProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Person::try_from(v.clone()) { return Ok(ArtistProp::Person(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The total amount due.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "TotalPaymentDueProp")]
pub enum TotalPaymentDueProp {
MonetaryAmount(MonetaryAmount),
PriceSpecification(PriceSpecification),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "TotalPaymentDueProp")]
impl TryFrom<SchemaValue> for TotalPaymentDueProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TotalPaymentDueProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(TotalPaymentDueProp::MonetaryAmount(object)) }
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(TotalPaymentDueProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "TotalPaymentDueProp")]
impl TryFrom<&SchemaValue> for TotalPaymentDueProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(TotalPaymentDueProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = MonetaryAmount::try_from(v.clone()) { return Ok(TotalPaymentDueProp::MonetaryAmount(object)) }
if let Ok(object) = PriceSpecification::try_from(v.clone()) { return Ok(TotalPaymentDueProp::PriceSpecification(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Length of time to engage in the activity.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ActivityDurationProp")]
pub enum ActivityDurationProp {
Text(String),
QuantitativeValue(QuantitativeValue),
Duration(Duration),
}
#[automatically_derived]
#[cfg(feature = "ActivityDurationProp")]
impl TryFrom<SchemaValue> for ActivityDurationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActivityDurationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(ActivityDurationProp::QuantitativeValue(object)) }
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(ActivityDurationProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ActivityDurationProp")]
impl TryFrom<&SchemaValue> for ActivityDurationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ActivityDurationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(ActivityDurationProp::QuantitativeValue(object)) }
if let Ok(object) = Duration::try_from(v.clone()) { return Ok(ActivityDurationProp::Duration(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// A season in a media series.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "SeasonsProp")]
pub enum SeasonsProp {
CreativeWorkSeason(CreativeWorkSeason),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "SeasonsProp")]
impl TryFrom<SchemaValue> for SeasonsProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeasonsProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWorkSeason::try_from(v.clone()) { return Ok(SeasonsProp::CreativeWorkSeason(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "SeasonsProp")]
impl TryFrom<&SchemaValue> for SeasonsProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(SeasonsProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = CreativeWorkSeason::try_from(v.clone()) { return Ok(SeasonsProp::CreativeWorkSeason(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// indicates (possibly multiple) shipping destinations. These can be defined in several ways, e.g. postalCode ranges.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ShippingDestinationProp")]
pub enum ShippingDestinationProp {
DefinedRegion(DefinedRegion),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "ShippingDestinationProp")]
impl TryFrom<SchemaValue> for ShippingDestinationProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ShippingDestinationProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedRegion::try_from(v.clone()) { return Ok(ShippingDestinationProp::DefinedRegion(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ShippingDestinationProp")]
impl TryFrom<&SchemaValue> for ShippingDestinationProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ShippingDestinationProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = DefinedRegion::try_from(v.clone()) { return Ok(ShippingDestinationProp::DefinedRegion(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// For an [Organization] (often but not necessarily a [NewsMediaOrganization]), a description of organizational ownership structure; funding and grants. In a news/media setting, this is with particular reference to editorial independence. Note that the [funder] is also available and can be used to make basic funder information machine-readable.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "OwnershipFundingInfoProp")]
pub enum OwnershipFundingInfoProp {
AboutPage(AboutPage),
Text(String),
Url(String),
CreativeWork(CreativeWork),
}
#[automatically_derived]
#[cfg(feature = "OwnershipFundingInfoProp")]
impl TryFrom<SchemaValue> for OwnershipFundingInfoProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OwnershipFundingInfoProp::Text(v)),
SchemaValue::Url(v) => Ok(OwnershipFundingInfoProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AboutPage::try_from(v.clone()) { return Ok(OwnershipFundingInfoProp::AboutPage(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(OwnershipFundingInfoProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "OwnershipFundingInfoProp")]
impl TryFrom<&SchemaValue> for OwnershipFundingInfoProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(OwnershipFundingInfoProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(OwnershipFundingInfoProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = AboutPage::try_from(v.clone()) { return Ok(OwnershipFundingInfoProp::AboutPage(object)) }
if let Ok(object) = CreativeWork::try_from(v.clone()) { return Ok(OwnershipFundingInfoProp::CreativeWork(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The item that is being reviewed/rated.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "ItemReviewedProp")]
pub enum ItemReviewedProp {
Text(String),
Thing(Thing),
}
#[automatically_derived]
#[cfg(feature = "ItemReviewedProp")]
impl TryFrom<SchemaValue> for ItemReviewedProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemReviewedProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ItemReviewedProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "ItemReviewedProp")]
impl TryFrom<&SchemaValue> for ItemReviewedProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(ItemReviewedProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = Thing::try_from(v.clone()) { return Ok(ItemReviewedProp::Thing(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// Code used to redeem a discount.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DiscountCodeProp")]
pub enum DiscountCodeProp {
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DiscountCodeProp")]
impl TryFrom<SchemaValue> for DiscountCodeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiscountCodeProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DiscountCodeProp")]
impl TryFrom<&SchemaValue> for DiscountCodeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(DiscountCodeProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// A similar BioChemEntity, e.g., obtained by fingerprint similarity algorithms.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "BioChemSimilarityProp")]
pub enum BioChemSimilarityProp {
Text(String),
BioChemEntity(BioChemEntity),
}
#[automatically_derived]
#[cfg(feature = "BioChemSimilarityProp")]
impl TryFrom<SchemaValue> for BioChemSimilarityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BioChemSimilarityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(BioChemSimilarityProp::BioChemEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "BioChemSimilarityProp")]
impl TryFrom<&SchemaValue> for BioChemSimilarityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(BioChemSimilarityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = BioChemEntity::try_from(v.clone()) { return Ok(BioChemSimilarityProp::BioChemEntity(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The range of temporal applicability of a dataset, e.g. for a 2011 census dataset, the year 2011 (in ISO 8601 time interval format).
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "DatasetTimeIntervalProp")]
pub enum DatasetTimeIntervalProp {
DateTime(String),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "DatasetTimeIntervalProp")]
impl TryFrom<SchemaValue> for DatasetTimeIntervalProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(DatasetTimeIntervalProp::DateTime(v)),
SchemaValue::Text(v) => Ok(DatasetTimeIntervalProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "DatasetTimeIntervalProp")]
impl TryFrom<&SchemaValue> for DatasetTimeIntervalProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::DateTime(v) => Ok(DatasetTimeIntervalProp::DateTime(v.clone())),
SchemaValue::Text(v) => Ok(DatasetTimeIntervalProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. Typically the value is a URI-identified RDF class, and in this case corresponds to the
/// use of rdf:type in RDF. Text values can be used sparingly, for cases where useful information can be added without their being an appropriate schema to reference. In the case of text values, the class label should follow the schema.org <a href="https://schema.org/docs/styleguide.html">style guide</a>
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "AdditionalTypeProp")]
pub enum AdditionalTypeProp {
Text(String),
Url(String),
}
#[automatically_derived]
#[cfg(feature = "AdditionalTypeProp")]
impl TryFrom<SchemaValue> for AdditionalTypeProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdditionalTypeProp::Text(v)),
SchemaValue::Url(v) => Ok(AdditionalTypeProp::Url(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "AdditionalTypeProp")]
impl TryFrom<&SchemaValue> for AdditionalTypeProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(AdditionalTypeProp::Text(v.clone())),
SchemaValue::Url(v) => Ok(AdditionalTypeProp::Url(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
Err(())
},
_ => Err(()),
}
}
}
/// The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity.
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "EligibleQuantityProp")]
pub enum EligibleQuantityProp {
QuantitativeValue(QuantitativeValue),
Text(String),
}
#[automatically_derived]
#[cfg(feature = "EligibleQuantityProp")]
impl TryFrom<SchemaValue> for EligibleQuantityProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibleQuantityProp::Text(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(EligibleQuantityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "EligibleQuantityProp")]
impl TryFrom<&SchemaValue> for EligibleQuantityProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(EligibleQuantityProp::Text(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(EligibleQuantityProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
/// The number of owners of the vehicle, including the current one.
///
/// Typical unit code(s): C62
#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg(feature = "NumberOfPreviousOwnersProp")]
pub enum NumberOfPreviousOwnersProp {
Text(String),
QuantitativeValue(QuantitativeValue),
Number(f64),
}
#[automatically_derived]
#[cfg(feature = "NumberOfPreviousOwnersProp")]
impl TryFrom<SchemaValue> for NumberOfPreviousOwnersProp {
type Error = ();
fn try_from(value: SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfPreviousOwnersProp::Text(v)),
SchemaValue::Number(v) => Ok(NumberOfPreviousOwnersProp::Number(v)),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfPreviousOwnersProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}
#[automatically_derived]
#[cfg(feature = "NumberOfPreviousOwnersProp")]
impl TryFrom<&SchemaValue> for NumberOfPreviousOwnersProp {
type Error = ();
fn try_from(value: &SchemaValue) -> Result<Self, Self::Error> {
match value {
SchemaValue::Text(v) => Ok(NumberOfPreviousOwnersProp::Text(v.clone())),
SchemaValue::Number(v) => Ok(NumberOfPreviousOwnersProp::Number(v.clone())),
SchemaValue::Object(v) => {
// TODO: move clone away
if let Ok(object) = QuantitativeValue::try_from(v.clone()) { return Ok(NumberOfPreviousOwnersProp::QuantitativeValue(object)) }
Err(())
},
_ => Err(()),
}
}
}