Skip to content

Commit

Permalink
Move facilityType out of beta (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
openactive-bot authored Dec 8, 2021
1 parent 4bf211e commit dc4514c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 24 deletions.
2 changes: 2 additions & 0 deletions OpenActive.NET/enums/PropertyEnumeration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public enum PropertyEnumeration
EntitlementType,
[EnumMember(Value = "https://openactive.io/evidenceRequestAction")]
EvidenceRequestAction,
[EnumMember(Value = "https://openactive.io/facilityType")]
FacilityType,
[EnumMember(Value = "https://openactive.io/facilityUse")]
FacilityUse,
[EnumMember(Value = "https://openactive.io/genderRestriction")]
Expand Down
60 changes: 36 additions & 24 deletions OpenActive.NET/models/FacilityUse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public override string ToString()
public virtual List<Concept> AccessibilitySupport { get; set; }

/// <summary>
/// [DEPRECATED: Use `facilityType` instead of `activity` within `FacilityUse` and `IndividualFacilityUse`, as the `facilityType` controlled vocabulary has been designed specifically for facilities.]
/// Specifies the physical activity or activities that will take place during a facility use.
/// </summary>
/// <example>
Expand All @@ -128,6 +129,7 @@ public override string ToString()
/// </example>
[DataMember(Name = "activity", EmitDefaultValue = false, Order = 12)]
[JsonConverter(typeof(ValuesConverter))]
[Obsolete("Use `facilityType` instead of `activity` within `FacilityUse` and `IndividualFacilityUse`, as the `facilityType` controlled vocabulary has been designed specifically for facilities.", false)]
public virtual List<Concept> Activity { get; set; }

/// <summary>
Expand Down Expand Up @@ -214,10 +216,30 @@ public override string ToString()
[JsonConverter(typeof(ValuesConverter))]
public new virtual List<Slot> Event { get; set; }

/// <summary>
/// Specifies the types of facility being described.
/// NOTE: this property has been added to tooling and documentation ahead of inclusion in the next point release of the OpenActive Modelling Opportunity Data specification, as agreed on [the W3C call 2021-06-02](https://github.com/openactive/facility-types/issues/1#issuecomment-853759213).
/// </summary>
/// <example>
/// <code>
/// "facilityType": [
/// {
/// "@type": "Concept",
/// "@id": "https://openactive.io/facility-types#bba8ae59-d152-40bc-85cc-88c5375696d4",
/// "prefLabel": "Tennis Court",
/// "inScheme": "https://openactive.io/facility-types"
/// }
/// ]
/// </code>
/// </example>
[DataMember(Name = "facilityType", EmitDefaultValue = false, Order = 18)]
[JsonConverter(typeof(ValuesConverter))]
public virtual List<Concept> FacilityType { get; set; }

/// <summary>
/// The times the facility use is available
/// </summary>
[DataMember(Name = "hoursAvailable", EmitDefaultValue = false, Order = 18)]
[DataMember(Name = "hoursAvailable", EmitDefaultValue = false, Order = 19)]
[JsonConverter(typeof(ValuesConverter))]
public new virtual List<OpeningHoursSpecification> HoursAvailable { get; set; }

Expand All @@ -235,7 +257,7 @@ public override string ToString()
/// ]
/// </code>
/// </example>
[DataMember(Name = "image", EmitDefaultValue = false, Order = 19)]
[DataMember(Name = "image", EmitDefaultValue = false, Order = 20)]
[JsonConverter(typeof(ValuesConverter))]
public new virtual List<ImageObject> Image { get; set; }

Expand All @@ -247,13 +269,13 @@ public override string ToString()
/// "individualFacilityUse": [
/// {
/// "@type": "IndividualFacilityUse",
/// "@id": "http://www.example.org/facility-uses/1",
/// "@id": "http://www.example.org/facility-uses/1/individual-facility-uses/1",
/// "name": "Tennis Court 1"
/// }
/// ]
/// </code>
/// </example>
[DataMember(Name = "individualFacilityUse", EmitDefaultValue = false, Order = 20)]
[DataMember(Name = "individualFacilityUse", EmitDefaultValue = false, Order = 21)]
[JsonConverter(typeof(ValuesConverter))]
public virtual List<IndividualFacilityUse> IndividualFacilityUse { get; set; }

Expand All @@ -266,7 +288,7 @@ public override string ToString()
/// "isOpenBookingWithCustomerAccountAllowed": "true"
/// </code>
/// </example>
[DataMember(Name = "isOpenBookingWithCustomerAccountAllowed", EmitDefaultValue = false, Order = 21)]
[DataMember(Name = "isOpenBookingWithCustomerAccountAllowed", EmitDefaultValue = false, Order = 22)]
[JsonConverter(typeof(ValuesConverter))]
public virtual bool? IsOpenBookingWithCustomerAccountAllowed { get; set; }

Expand Down Expand Up @@ -297,7 +319,7 @@ public override string ToString()
/// }
/// </code>
/// </example>
[DataMember(Name = "location", EmitDefaultValue = false, Order = 22)]
[DataMember(Name = "location", EmitDefaultValue = false, Order = 23)]
[JsonConverter(typeof(ValuesConverter))]
public new virtual Place Location { get; set; }

Expand All @@ -316,7 +338,7 @@ public override string ToString()
/// }
/// </code>
/// </example>
[DataMember(Name = "offers", EmitDefaultValue = false, Order = 23)]
[DataMember(Name = "offers", EmitDefaultValue = false, Order = 24)]
[JsonConverter(typeof(ValuesConverter))]
public new virtual List<Offer> Offers { get; set; }

Expand All @@ -332,7 +354,7 @@ public override string ToString()
/// }
/// </code>
/// </example>
[DataMember(Name = "provider", EmitDefaultValue = false, Order = 24)]
[DataMember(Name = "provider", EmitDefaultValue = false, Order = 25)]
[JsonConverter(typeof(ValuesConverter))]
public new virtual Organization Provider { get; set; }

Expand All @@ -344,7 +366,7 @@ public override string ToString()
/// "url": "https://example.com/facility-use/1234"
/// </code>
/// </example>
[DataMember(Name = "url", EmitDefaultValue = false, Order = 25)]
[DataMember(Name = "url", EmitDefaultValue = false, Order = 26)]
[JsonConverter(typeof(ValuesConverter))]
public new virtual Uri Url { get; set; }

Expand All @@ -354,7 +376,7 @@ public override string ToString()
///
/// If you are using this property, please join the discussion at proposal [#276](https://github.com/openactive/modelling-opportunity-data/issues/276).
/// </summary>
[DataMember(Name = "beta:formattedDescription", EmitDefaultValue = false, Order = 1026)]
[DataMember(Name = "beta:formattedDescription", EmitDefaultValue = false, Order = 1027)]
[JsonConverter(typeof(ValuesConverter))]
public virtual string FormattedDescription { get; set; }

Expand All @@ -364,7 +386,7 @@ public override string ToString()
///
/// If you are using this property, please join the discussion at proposal [#166](https://github.com/openactive/modelling-opportunity-data/issues/166).
/// </summary>
[DataMember(Name = "beta:isWheelchairAccessible", EmitDefaultValue = false, Order = 1027)]
[DataMember(Name = "beta:isWheelchairAccessible", EmitDefaultValue = false, Order = 1028)]
[JsonConverter(typeof(ValuesConverter))]
public virtual bool? IsWheelchairAccessible { get; set; }

Expand All @@ -374,7 +396,7 @@ public override string ToString()
///
/// If you are using this property, please join the discussion at proposal [#88](https://github.com/openactive/modelling-opportunity-data/issues/88).
/// </summary>
[DataMember(Name = "beta:video", EmitDefaultValue = false, Order = 1028)]
[DataMember(Name = "beta:video", EmitDefaultValue = false, Order = 1029)]
[JsonConverter(typeof(ValuesConverter))]
public virtual List<VideoObject> Video { get; set; }

Expand All @@ -384,7 +406,7 @@ public override string ToString()
///
/// If you are using this property, please join the discussion at proposal [#110](https://github.com/openactive/modelling-opportunity-data/issues/110).
/// </summary>
[DataMember(Name = "beta:sportsActivityLocation", EmitDefaultValue = false, Order = 1029)]
[DataMember(Name = "beta:sportsActivityLocation", EmitDefaultValue = false, Order = 1030)]
[JsonConverter(typeof(ValuesConverter))]
public virtual List<Schema.NET.SportsActivityLocation> SportsActivityLocation { get; set; }

Expand All @@ -394,20 +416,10 @@ public override string ToString()
///
/// If you are using this property, please join the discussion at proposal [#204](https://github.com/openactive/modelling-opportunity-data/issues/204).
/// </summary>
[DataMember(Name = "beta:offerValidityPeriod", EmitDefaultValue = false, Order = 1030)]
[DataMember(Name = "beta:offerValidityPeriod", EmitDefaultValue = false, Order = 1031)]
[JsonConverter(typeof(OpenActiveTimeSpanToISO8601DurationValuesConverter))]
public virtual TimeSpan? OfferValidityPeriod { get; set; }

/// <summary>
/// [NOTICE: This is a beta property, and is highly likely to change in future versions of this library.]
/// The type of facility in use. See https://openactive.io/facility-types/.
///
/// If you are using this property, please join the discussion at proposal [#1](https://github.com/openactive/facility-types/issues/1).
/// </summary>
[DataMember(Name = "beta:facilityType", EmitDefaultValue = false, Order = 1031)]
[JsonConverter(typeof(ValuesConverter))]
public virtual List<Concept> FacilityType { get; set; }

/// <summary>
/// [NOTICE: This is a beta property, and is highly likely to change in future versions of this library.]
/// Whether the event or facility is indoor or outdoor.
Expand Down

0 comments on commit dc4514c

Please sign in to comment.