Skip to content

Commit

Permalink
Update data models (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: openactive-bot <[email protected]>
  • Loading branch information
openactive-bot and openactive-bot authored Feb 15, 2021
1 parent 7da4cf4 commit 0def13e
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 9 deletions.
6 changes: 3 additions & 3 deletions OpenActive.NET.Generator/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion OpenActive.NET.Generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "Nick Evans",
"license": "MIT",
"dependencies": {
"@openactive/data-models": "^2.0.166",
"@openactive/data-models": "^2.0.170",
"fs-extra": "^7.0.1",
"sync-request": "^6.0.0"
}
Expand Down
51 changes: 51 additions & 0 deletions OpenActive.NET/models/ChangeOfLogisticsLocationSimulateAction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace OpenActive.NET
{
/// <summary>
/// [NOTICE: This class is part of the Open Booking API Test Interface, and MUST NOT be used in production.]
/// This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used.
/// </summary>
[DataContract]
public partial class ChangeOfLogisticsLocationSimulateAction : OpenBookingSimulateAction
{
/// <summary>
/// Returns the JSON-LD representation of this instance.
/// This method overrides Schema.NET ToString() to serialise using OpenActiveSerializer.
/// </summary>
/// <returns>A <see cref="string" /> that represents the JSON-LD representation of this instance.</returns>
public override string ToString()
{
return OpenActiveSerializer.Serialize(this);
}

/// <summary>
/// Returns the JSON-LD representation of this instance, including "https://schema.org" in the "@context".
///
/// This method must be used when you want to embed the output raw (as-is) into a web
/// page. It uses serializer settings with HTML escaping to avoid Cross-Site Scripting (XSS)
/// vulnerabilities if the object was constructed from an untrusted source.
///
/// This method overrides Schema.NET ToHtmlEscapedString() to serialise using OpenActiveSerializer.
/// </summary>
/// <returns>
/// A <see cref="string" /> that represents the JSON-LD representation of this instance.
/// </returns>
public new string ToHtmlEscapedString()
{
return OpenActiveSerializer.SerializeToHtmlEmbeddableString(this);
}

/// <summary>
/// Gets the name of the type as specified by schema.org.
/// </summary>
[DataMember(Name = "@type", Order = 1)]
public override string Type => "test:ChangeOfLogisticsLocationSimulateAction";


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace OpenActive.NET
/// This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used.
/// </summary>
[DataContract]
public partial class ChangeOfLogisticsSimulateAction : OpenBookingSimulateAction
public partial class ChangeOfLogisticsNameSimulateAction : OpenBookingSimulateAction
{
/// <summary>
/// Returns the JSON-LD representation of this instance.
Expand Down Expand Up @@ -44,7 +44,7 @@ public override string ToString()
/// Gets the name of the type as specified by schema.org.
/// </summary>
[DataMember(Name = "@type", Order = 1)]
public override string Type => "test:ChangeOfLogisticsSimulateAction";
public override string Type => "test:ChangeOfLogisticsNameSimulateAction";


}
Expand Down
51 changes: 51 additions & 0 deletions OpenActive.NET/models/ChangeOfLogisticsTimeSimulateAction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace OpenActive.NET
{
/// <summary>
/// [NOTICE: This class is part of the Open Booking API Test Interface, and MUST NOT be used in production.]
/// This type is derived from https://schema.org/Action, which means that any of this type's properties within schema.org may also be used.
/// </summary>
[DataContract]
public partial class ChangeOfLogisticsTimeSimulateAction : OpenBookingSimulateAction
{
/// <summary>
/// Returns the JSON-LD representation of this instance.
/// This method overrides Schema.NET ToString() to serialise using OpenActiveSerializer.
/// </summary>
/// <returns>A <see cref="string" /> that represents the JSON-LD representation of this instance.</returns>
public override string ToString()
{
return OpenActiveSerializer.Serialize(this);
}

/// <summary>
/// Returns the JSON-LD representation of this instance, including "https://schema.org" in the "@context".
///
/// This method must be used when you want to embed the output raw (as-is) into a web
/// page. It uses serializer settings with HTML escaping to avoid Cross-Site Scripting (XSS)
/// vulnerabilities if the object was constructed from an untrusted source.
///
/// This method overrides Schema.NET ToHtmlEscapedString() to serialise using OpenActiveSerializer.
/// </summary>
/// <returns>
/// A <see cref="string" /> that represents the JSON-LD representation of this instance.
/// </returns>
public new string ToHtmlEscapedString()
{
return OpenActiveSerializer.SerializeToHtmlEmbeddableString(this);
}

/// <summary>
/// Gets the name of the type as specified by schema.org.
/// </summary>
[DataMember(Name = "@type", Order = 1)]
public override string Type => "test:ChangeOfLogisticsTimeSimulateAction";


}
}
6 changes: 3 additions & 3 deletions OpenActive.NET/models/OpeningHoursSpecification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public override string ToString()


/// <summary>
/// Defines the days of the week upon which the `opens` and `closes` values are specified.
/// Defines the days of the week upon which the `opens` and `closes` values are specified. Note this property is optional when used within `specialOpeningHoursSpecification`.
/// </summary>
/// <example>
/// <code>
Expand Down Expand Up @@ -90,7 +90,7 @@ public override string ToString()


/// <summary>
/// The date when the item becomes valid. The item will be valid at the beginning of the specified day.
/// The date when the item becomes valid. The item will be valid at the beginning of the specified day. Note this property is required when used within `specialOpeningHoursSpecification`.
/// </summary>
/// <example>
/// <code>
Expand All @@ -103,7 +103,7 @@ public override string ToString()


/// <summary>
/// The date after which the item is no longer valid. The item will cease to be valid at the end of the specified day.
/// The date after which the item is no longer valid. The item will cease to be valid at the end of the specified day. Note this property is required when used within `specialOpeningHoursSpecification`.
/// </summary>
/// <example>
/// <code>
Expand Down

0 comments on commit 0def13e

Please sign in to comment.