Skip to content

Commit dd55185

Browse files
Update data models (#59)
1 parent dc4514c commit dd55185

File tree

8 files changed

+88
-15
lines changed

8 files changed

+88
-15
lines changed

OpenActive.NET/enums/PropertyEnumeration.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ public enum PropertyEnumeration
153153
UnitTaxSpecification,
154154
[EnumMember(Value = "https://openactive.io/validFromBeforeStartDate")]
155155
ValidFromBeforeStartDate,
156+
[EnumMember(Value = "https://openactive.io/validThroughBeforeStartDate")]
157+
ValidThroughBeforeStartDate,
156158
[EnumMember(Value = "https://openactive.io/valueOption")]
157159
ValueOption,
158160
[EnumMember(Value = "https://schema.org/about")]
@@ -309,6 +311,8 @@ public enum PropertyEnumeration
309311
Antagonist,
310312
[EnumMember(Value = "https://schema.org/appearance")]
311313
Appearance,
314+
[EnumMember(Value = "https://schema.org/applicableCountry")]
315+
ApplicableCountry,
312316
[EnumMember(Value = "https://schema.org/applicableLocation")]
313317
ApplicableLocation,
314318
[EnumMember(Value = "https://schema.org/applicantLocationRequirements")]
@@ -1231,8 +1235,14 @@ public enum PropertyEnumeration
12311235
FundedItem,
12321236
[EnumMember(Value = "https://schema.org/funder")]
12331237
Funder,
1238+
[EnumMember(Value = "https://schema.org/funding")]
1239+
Funding,
12341240
[EnumMember(Value = "https://schema.org/game")]
12351241
Game,
1242+
[EnumMember(Value = "https://schema.org/gameAvailabilityType")]
1243+
GameAvailabilityType,
1244+
[EnumMember(Value = "https://schema.org/gameEdition")]
1245+
GameEdition,
12361246
[EnumMember(Value = "https://schema.org/gameItem")]
12371247
GameItem,
12381248
[EnumMember(Value = "https://schema.org/gameLocation")]
@@ -1309,6 +1319,8 @@ public enum PropertyEnumeration
13091319
GuidelineSubject,
13101320
[EnumMember(Value = "https://schema.org/handlingTime")]
13111321
HandlingTime,
1322+
[EnumMember(Value = "https://schema.org/hasAdultConsideration")]
1323+
HasAdultConsideration,
13121324
[EnumMember(Value = "https://schema.org/hasBioChemEntityPart")]
13131325
HasBioChemEntityPart,
13141326
[EnumMember(Value = "https://schema.org/hasBioPolymerSequence")]
@@ -1571,6 +1583,8 @@ public enum PropertyEnumeration
15711583
Isbn,
15721584
[EnumMember(Value = "https://schema.org/isicV4")]
15731585
IsicV4,
1586+
[EnumMember(Value = "https://schema.org/iso6523Code")]
1587+
Iso6523Code,
15741588
[EnumMember(Value = "https://schema.org/isrcCode")]
15751589
IsrcCode,
15761590
[EnumMember(Value = "https://schema.org/issn")]

OpenActive.NET/models/Entitlement.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ public override string ToString()
7575
/// The date the entitlement becomes valid. This must be in the past.
7676
/// </summary>
7777
[DataMember(Name = "validFrom", EmitDefaultValue = false, Order = 9)]
78-
[JsonConverter(typeof(OpenActiveDateTimeOffsetToISO8601DateTimeValuesConverter))]
79-
public new virtual DateTimeOffset? ValidFrom { get; set; }
78+
[JsonConverter(typeof(OpenActiveDateTimeValuesConverter))]
79+
public new virtual DateValue ValidFrom { get; set; }
8080

8181
/// <summary>
8282
/// The date that the entitlement is no longer valid. This must be in the future.
8383
/// </summary>
8484
[DataMember(Name = "validUntil", EmitDefaultValue = false, Order = 10)]
85-
[JsonConverter(typeof(OpenActiveDateTimeOffsetToISO8601DateTimeValuesConverter))]
86-
public new virtual DateTimeOffset? ValidUntil { get; set; }
85+
[JsonConverter(typeof(OpenActiveDateTimeValuesConverter))]
86+
public new virtual DateValue ValidUntil { get; set; }
8787
}
8888
}

OpenActive.NET/models/Event.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,13 +749,23 @@ public override string ToString()
749749
[JsonConverter(typeof(ValuesConverter))]
750750
public virtual bool? IsFirstSessionAccessibleForFree { get; set; }
751751

752+
/// <summary>
753+
/// [NOTICE: This is a beta property, and is highly likely to change in future versions of this library.]
754+
/// A property that indicates whether the event contains a high frequency of occurrences. Intended as a UI hint for interfaces that represent these occurrences.
755+
///
756+
/// If you are using this property, please join the discussion at proposal [#301](https://github.com/openactive/modelling-opportunity-data/issues/301).
757+
/// </summary>
758+
[DataMember(Name = "beta:isScheduledAsSlots", EmitDefaultValue = false, Order = 1061)]
759+
[JsonConverter(typeof(ValuesConverter))]
760+
public virtual bool? IsScheduledAsSlots { get; set; }
761+
752762
/// <summary>
753763
/// [NOTICE: This is a beta property, and is highly likely to change in future versions of this library.]
754764
/// Contact details for an Event, where they are not specifically related to the `organizer` or `leader`.
755765
///
756766
/// If you are using this property, please join the discussion at proposal [#113](https://github.com/openactive/modelling-opportunity-data/issues/113).
757767
/// </summary>
758-
[DataMember(Name = "beta:contactPoint", EmitDefaultValue = false, Order = 1061)]
768+
[DataMember(Name = "beta:contactPoint", EmitDefaultValue = false, Order = 1062)]
759769
[JsonConverter(typeof(ValuesConverter))]
760770
public virtual Schema.NET.ContactPoint ContactPoint { get; set; }
761771

@@ -765,22 +775,22 @@ public override string ToString()
765775
///
766776
/// If you are using this property, please join the discussion at proposal [#161](https://github.com/openactive/modelling-opportunity-data/issues/161).
767777
/// </summary>
768-
[DataMember(Name = "beta:bookingChannel", EmitDefaultValue = false, Order = 1062)]
778+
[DataMember(Name = "beta:bookingChannel", EmitDefaultValue = false, Order = 1063)]
769779
[JsonConverter(typeof(ValuesConverter))]
770780
public virtual List<BookingChannelType> BookingChannel { get; set; }
771781

772782
/// <summary>
773783
/// [NOTICE: This property is part of the Open Booking API Test Interface, and MUST NOT be used in production.]
774784
/// </summary>
775-
[DataMember(Name = "test:testOpenBookingFlow", EmitDefaultValue = false, Order = 1063)]
785+
[DataMember(Name = "test:testOpenBookingFlow", EmitDefaultValue = false, Order = 1064)]
776786
[JsonConverter(typeof(ValuesConverter))]
777787
public virtual TestOpenBookingFlowEnumeration? TestOpenBookingFlow { get; set; }
778788

779789
/// <summary>
780790
/// [NOTICE: This property is part of the Open Booking API Test Interface, and MUST NOT be used in production.]
781791
/// The opportunity criteria which the Event conforms to.
782792
/// </summary>
783-
[DataMember(Name = "test:testOpportunityCriteria", EmitDefaultValue = false, Order = 1064)]
793+
[DataMember(Name = "test:testOpportunityCriteria", EmitDefaultValue = false, Order = 1065)]
784794
[JsonConverter(typeof(ValuesConverter))]
785795
public virtual TestOpportunityCriteriaEnumeration? TestOpportunityCriteria { get; set; }
786796
}

OpenActive.NET/models/FacilityUse.cs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ public override string ToString()
356356
/// </example>
357357
[DataMember(Name = "provider", EmitDefaultValue = false, Order = 25)]
358358
[JsonConverter(typeof(ValuesConverter))]
359-
public new virtual Organization Provider { get; set; }
359+
public virtual Organization Provider { get; set; }
360360

361361
/// <summary>
362362
/// A URL to a web page (or section of a page) that describes the facility use.
@@ -420,13 +420,23 @@ public override string ToString()
420420
[JsonConverter(typeof(OpenActiveTimeSpanToISO8601DurationValuesConverter))]
421421
public virtual TimeSpan? OfferValidityPeriod { get; set; }
422422

423+
/// <summary>
424+
/// [NOTICE: This is a beta property, and is highly likely to change in future versions of this library.]
425+
/// Attributes associated with the facility in use. See https://openactive.io/facility-attribute-list/.
426+
///
427+
/// If you are using this property, please join the discussion at proposal [#1](https://github.com/openactive/facility-types/issues/1).
428+
/// </summary>
429+
[DataMember(Name = "beta:facilityAttribute", EmitDefaultValue = false, Order = 1032)]
430+
[JsonConverter(typeof(ValuesConverter))]
431+
public virtual List<Concept> FacilityAttribute { get; set; }
432+
423433
/// <summary>
424434
/// [NOTICE: This is a beta property, and is highly likely to change in future versions of this library.]
425435
/// Whether the event or facility is indoor or outdoor.
426436
///
427437
/// If you are using this property, please join the discussion at proposal [#1](https://github.com/openactive/facility-types/issues/1).
428438
/// </summary>
429-
[DataMember(Name = "beta:facilitySetting", EmitDefaultValue = false, Order = 1032)]
439+
[DataMember(Name = "beta:facilitySetting", EmitDefaultValue = false, Order = 1033)]
430440
[JsonConverter(typeof(ValuesConverter))]
431441
public virtual FacilitySettingType? FacilitySetting { get; set; }
432442

@@ -436,7 +446,7 @@ public override string ToString()
436446
///
437447
/// If you are using this property, please join the discussion at proposal [#161](https://github.com/openactive/modelling-opportunity-data/issues/161).
438448
/// </summary>
439-
[DataMember(Name = "beta:bookingChannel", EmitDefaultValue = false, Order = 1033)]
449+
[DataMember(Name = "beta:bookingChannel", EmitDefaultValue = false, Order = 1034)]
440450
[JsonConverter(typeof(ValuesConverter))]
441451
public virtual List<BookingChannelType> BookingChannel { get; set; }
442452
}

OpenActive.NET/models/Offer.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,19 +225,26 @@ public override string ToString()
225225
public new virtual Uri Url { get; set; }
226226

227227
/// <summary>
228-
/// The duration before the startDate for which this Offer is valid, given in ISO 8601 format. This is a relatively-defined equivalent of schema:validFrom, to allow for Offer inheritance.
228+
/// The duration before the `startDate` for which this `Offer` is valid, given in ISO 8601 format. This is a relatively-defined equivalent of `schema:validFrom`, to allow for `Offer` inheritance.
229229
/// </summary>
230230
[DataMember(Name = "validFromBeforeStartDate", EmitDefaultValue = false, Order = 22)]
231231
[JsonConverter(typeof(OpenActiveTimeSpanToISO8601DurationValuesConverter))]
232232
public virtual TimeSpan? ValidFromBeforeStartDate { get; set; }
233233

234+
/// <summary>
235+
/// The duration before the `startDate` after which the `Offer` is no longer valid, given in ISO 8601 format. This is a relatively-defined equivalent of `schema:validThrough`, to allow for `Offer` inheritance.
236+
/// </summary>
237+
[DataMember(Name = "validThroughBeforeStartDate", EmitDefaultValue = false, Order = 23)]
238+
[JsonConverter(typeof(OpenActiveTimeSpanToISO8601DurationValuesConverter))]
239+
public virtual TimeSpan? ValidThroughBeforeStartDate { get; set; }
240+
234241
/// <summary>
235242
/// [NOTICE: This is a beta property, and is highly likely to change in future versions of this library.]
236243
/// Number of people the reservation should accommodate.
237244
///
238245
/// If you are using this property, please join the discussion at proposal [#250](https://github.com/openactive/modelling-opportunity-data/issues/250).
239246
/// </summary>
240-
[DataMember(Name = "beta:partySize", EmitDefaultValue = false, Order = 1023)]
247+
[DataMember(Name = "beta:partySize", EmitDefaultValue = false, Order = 1024)]
241248
[JsonConverter(typeof(ValuesConverter))]
242249
public virtual QuantitativeValue PartySize { get; set; }
243250
}

OpenActive.NET/models/OfferOverride.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,8 @@ public override string ToString()
6767

6868
[Obsolete("This property is disinherited in this type, and must not be used.", true)]
6969
public override TimeSpan? ValidFromBeforeStartDate { get; set; }
70+
71+
[Obsolete("This property is disinherited in this type, and must not be used.", true)]
72+
public override TimeSpan? ValidThroughBeforeStartDate { get; set; }
7073
}
7174
}

OpenActive.NET/models/Place.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public override string ToString()
157157
/// </example>
158158
[DataMember(Name = "containedInPlace", EmitDefaultValue = false, Order = 12)]
159159
[JsonConverter(typeof(ValuesConverter))]
160-
public new virtual Place ContainedInPlace { get; set; }
160+
public new virtual ReferenceValue<Place> ContainedInPlace { get; set; }
161161

162162
/// <summary>
163163
/// Places that exist within this place
@@ -256,5 +256,25 @@ public override string ToString()
256256
[DataMember(Name = "beta:formattedDescription", EmitDefaultValue = false, Order = 1020)]
257257
[JsonConverter(typeof(ValuesConverter))]
258258
public virtual string FormattedDescription { get; set; }
259+
260+
/// <summary>
261+
/// [NOTICE: This is a beta property, and is highly likely to change in future versions of this library.]
262+
/// A related video object.
263+
///
264+
/// If you are using this property, please join the discussion at proposal [#88](https://github.com/openactive/modelling-opportunity-data/issues/88).
265+
/// </summary>
266+
[DataMember(Name = "beta:video", EmitDefaultValue = false, Order = 1021)]
267+
[JsonConverter(typeof(ValuesConverter))]
268+
public virtual List<VideoObject> Video { get; set; }
269+
270+
/// <summary>
271+
/// [NOTICE: This is a beta property, and is highly likely to change in future versions of this library.]
272+
/// The type of Place. See https://openactive.io/place-types/.
273+
///
274+
/// If you are using this property, please join the discussion at proposal [#1](https://github.com/openactive/place-types/issues/1).
275+
/// </summary>
276+
[DataMember(Name = "beta:placeType", EmitDefaultValue = false, Order = 1022)]
277+
[JsonConverter(typeof(ValuesConverter))]
278+
public virtual List<Concept> PlaceType { get; set; }
259279
}
260280
}

OpenActive.NET/models/Slot.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,16 @@ public override string ToString()
229229
[Obsolete("This property is disinherited in this type, and must not be used.", true)]
230230
public override Event SuperEvent { get; set; }
231231

232-
[Obsolete("This property is disinherited in this type, and must not be used.", true)]
232+
/// <summary>
233+
/// A URL to a web page (or section of a page) that describes the specific Slot.
234+
/// </summary>
235+
/// <example>
236+
/// <code>
237+
/// "url": "https://example.com/slots/1234"
238+
/// </code>
239+
/// </example>
240+
[DataMember(Name = "url", EmitDefaultValue = false, Order = 42)]
241+
[JsonConverter(typeof(ValuesConverter))]
233242
public override Uri Url { get; set; }
234243

235244
/// <summary>

0 commit comments

Comments
 (0)