Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion src/FishyFlip/Lexicon/App/Bsky/Draft/Draft.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public partial class Draft : ATObject, ICBOREncodable<Draft>, IJsonEncodable<Dra
/// <summary>
/// Initializes a new instance of the <see cref="Draft"/> class.
/// </summary>
/// <param name="deviceId">UUIDv4 identifier of the device that created this draft.</param>
/// <param name="deviceName">The device and/or platform on which the draft was created.</param>
/// <param name="posts">Array of draft posts that compose this draft.</param>
/// <param name="langs">Indicates human language of posts primary text content.</param>
/// <param name="postgateEmbeddingRules">Embedding rules for the postgates to be created when this draft is published.
Expand All @@ -29,8 +31,10 @@ public partial class Draft : ATObject, ICBOREncodable<Draft>, IJsonEncodable<Dra
/// <see cref="FishyFlip.Lexicon.App.Bsky.Feed.FollowingRule"/> (app.bsky.feed.threadgate#followingRule) <br/>
/// <see cref="FishyFlip.Lexicon.App.Bsky.Feed.ListRule"/> (app.bsky.feed.threadgate#listRule) <br/>
/// </param>
public Draft(List<FishyFlip.Lexicon.App.Bsky.Draft.DraftPost> posts = default, List<string>? langs = default, List<FishyFlip.Lexicon.App.Bsky.Feed.DisableRule>? postgateEmbeddingRules = default, List<ATObject>? threadgateAllow = default)
public Draft(string? deviceId = default, string? deviceName = default, List<FishyFlip.Lexicon.App.Bsky.Draft.DraftPost> posts = default, List<string>? langs = default, List<FishyFlip.Lexicon.App.Bsky.Feed.DisableRule>? postgateEmbeddingRules = default, List<ATObject>? threadgateAllow = default)
{
this.DeviceId = deviceId;
this.DeviceName = deviceName;
this.Posts = posts;
this.Langs = langs;
this.PostgateEmbeddingRules = postgateEmbeddingRules;
Expand All @@ -53,13 +57,31 @@ public Draft()
/// </summary>
public Draft(CBORObject obj)
{
if (obj["deviceId"] is not null) this.DeviceId = obj["deviceId"].AsString();
if (obj["deviceName"] is not null) this.DeviceName = obj["deviceName"].AsString();
if (obj["posts"] is not null) this.Posts = obj["posts"].Values.Select(n =>new FishyFlip.Lexicon.App.Bsky.Draft.DraftPost(n)).ToList();
if (obj["langs"] is not null) this.Langs = obj["langs"].Values.Select(n =>n.AsString()).ToList();
if (obj["postgateEmbeddingRules"] is not null) this.PostgateEmbeddingRules = obj["postgateEmbeddingRules"].Values.Select(n =>new FishyFlip.Lexicon.App.Bsky.Feed.DisableRule(n)).ToList();
if (obj["threadgateAllow"] is not null) this.ThreadgateAllow = obj["threadgateAllow"].Values.Select(n =>n.ToATObject()).ToList();
if (obj["$type"] is not null) this.Type = obj["$type"].AsString();
}

/// <summary>
/// Gets or sets the deviceId.
/// <br/> UUIDv4 identifier of the device that created this draft.
/// </summary>
[JsonPropertyName("deviceId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? DeviceId { get; set; }

/// <summary>
/// Gets or sets the deviceName.
/// <br/> The device and/or platform on which the draft was created.
/// </summary>
[JsonPropertyName("deviceName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? DeviceName { get; set; }

/// <summary>
/// Gets or sets the posts.
/// <br/> Array of draft posts that compose this draft.
Expand Down
20 changes: 19 additions & 1 deletion src/FishyFlip/Lexicon/App/Bsky/Embed/EmbedVideo.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ public partial class EmbedVideo : ATObject, ICBOREncodable<EmbedVideo>, IJsonEnc
/// <param name="aspectRatio">
/// <see cref="FishyFlip.Lexicon.App.Bsky.Embed.AspectRatio"/> (app.bsky.embed.defs#aspectRatio)
/// </param>
public EmbedVideo(Blob video = default, List<FishyFlip.Lexicon.App.Bsky.Embed.Caption>? captions = default, string? alt = default, FishyFlip.Lexicon.App.Bsky.Embed.AspectRatio? aspectRatio = default)
/// <param name="presentation">A hint to the client about how to present the video.
/// <br/> Known Values: <br/>
/// default <br/>
/// gif <br/>
/// </param>
public EmbedVideo(Blob video = default, List<FishyFlip.Lexicon.App.Bsky.Embed.Caption>? captions = default, string? alt = default, FishyFlip.Lexicon.App.Bsky.Embed.AspectRatio? aspectRatio = default, string? presentation = default)
{
this.Video = video;
this.Captions = captions;
this.Alt = alt;
this.AspectRatio = aspectRatio;
this.Presentation = presentation;
this.Type = "app.bsky.embed.video";
}

Expand All @@ -47,6 +53,7 @@ public EmbedVideo(CBORObject obj)
if (obj["captions"] is not null) this.Captions = obj["captions"].Values.Select(n =>new FishyFlip.Lexicon.App.Bsky.Embed.Caption(n)).ToList();
if (obj["alt"] is not null) this.Alt = obj["alt"].AsString();
if (obj["aspectRatio"] is not null) this.AspectRatio = new FishyFlip.Lexicon.App.Bsky.Embed.AspectRatio(obj["aspectRatio"]);
if (obj["presentation"] is not null) this.Presentation = obj["presentation"].AsString();
if (obj["$type"] is not null) this.Type = obj["$type"].AsString();
}

Expand Down Expand Up @@ -81,6 +88,17 @@ public EmbedVideo(CBORObject obj)
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public FishyFlip.Lexicon.App.Bsky.Embed.AspectRatio? AspectRatio { get; set; }

/// <summary>
/// Gets or sets the presentation.
/// <br/> A hint to the client about how to present the video.
/// <br/> Known Values: <br/>
/// default <br/>
/// gif <br/>
/// </summary>
[JsonPropertyName("presentation")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Presentation { get; set; }

public const string RecordType = "app.bsky.embed.video";

public override string ToJson()
Expand Down
20 changes: 19 additions & 1 deletion src/FishyFlip/Lexicon/App/Bsky/Embed/ViewVideo.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@ public partial class ViewVideo : ATObject, ICBOREncodable<ViewVideo>, IJsonEncod
/// <param name="aspectRatio">
/// <see cref="FishyFlip.Lexicon.App.Bsky.Embed.AspectRatio"/> (app.bsky.embed.defs#aspectRatio)
/// </param>
public ViewVideo(string cid = default, string playlist = default, string? thumbnail = default, string? alt = default, FishyFlip.Lexicon.App.Bsky.Embed.AspectRatio? aspectRatio = default)
/// <param name="presentation">A hint to the client about how to present the video.
/// <br/> Known Values: <br/>
/// default <br/>
/// gif <br/>
/// </param>
public ViewVideo(string cid = default, string playlist = default, string? thumbnail = default, string? alt = default, FishyFlip.Lexicon.App.Bsky.Embed.AspectRatio? aspectRatio = default, string? presentation = default)
{
this.Cid = cid;
this.Playlist = playlist;
this.Thumbnail = thumbnail;
this.Alt = alt;
this.AspectRatio = aspectRatio;
this.Presentation = presentation;
this.Type = "app.bsky.embed.video#view";
}

Expand All @@ -50,6 +56,7 @@ public ViewVideo(CBORObject obj)
if (obj["thumbnail"] is not null) this.Thumbnail = obj["thumbnail"].AsString();
if (obj["alt"] is not null) this.Alt = obj["alt"].AsString();
if (obj["aspectRatio"] is not null) this.AspectRatio = new FishyFlip.Lexicon.App.Bsky.Embed.AspectRatio(obj["aspectRatio"]);
if (obj["presentation"] is not null) this.Presentation = obj["presentation"].AsString();
if (obj["$type"] is not null) this.Type = obj["$type"].AsString();
}

Expand Down Expand Up @@ -89,6 +96,17 @@ public ViewVideo(CBORObject obj)
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public FishyFlip.Lexicon.App.Bsky.Embed.AspectRatio? AspectRatio { get; set; }

/// <summary>
/// Gets or sets the presentation.
/// <br/> A hint to the client about how to present the video.
/// <br/> Known Values: <br/>
/// default <br/>
/// gif <br/>
/// </summary>
[JsonPropertyName("presentation")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Presentation { get; set; }

public const string RecordType = "app.bsky.embed.video#view";

public override string ToJson()
Expand Down