Skip to content

Commit

Permalink
Merge pull request #348 from jayendranarumugam/feature/supportforison…
Browse files Browse the repository at this point in the history
…line

Support for isonline
  • Loading branch information
guythetechie authored Aug 8, 2023
2 parents 32595ba + d81e713 commit 8f38404
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/code/common/Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public sealed record ApiCreateOrUpdateProperties
public string? DisplayName { get; init; }
public ApiFormatOption? Format { get; init; }
public bool? IsCurrent { get; init; }
public bool? IsOnline { get; init; }
public ApiLicenseInformation? License { get; init; }
public string? Path { get; init; }
public ProtocolOption[]? Protocols { get; init; }
Expand Down Expand Up @@ -135,6 +136,7 @@ public JsonObject Serialize() =>
.AddPropertyIfNotNull("displayName", DisplayName)
.AddPropertyIfNotNull("format", Format?.Serialize())
.AddPropertyIfNotNull("isCurrent", IsCurrent)
.AddPropertyIfNotNull("isOnline", IsOnline)
.AddPropertyIfNotNull("license", License?.Serialize())
.AddPropertyIfNotNull("path", Path)
.AddPropertyIfNotNull("protocols", Protocols?.Select(protocol => protocol.Serialize())
Expand Down Expand Up @@ -169,6 +171,7 @@ public static ApiCreateOrUpdateProperties Deserialize(JsonObject jsonObject) =>
Format = jsonObject.TryGetProperty("format")
.Map(ApiFormatOption.Deserialize),
IsCurrent = jsonObject.TryGetBoolProperty("isCurrent"),
IsOnline = jsonObject.TryGetBoolProperty("isOnline"),
License = jsonObject.TryGetJsonObjectProperty("license")
.Map(ApiLicenseInformation.Deserialize),
Path = jsonObject.TryGetStringProperty("path"),
Expand Down

0 comments on commit 8f38404

Please sign in to comment.