namespace ActivityPub; /// /// https://www.w3.org/ns/activitystreams#Object /// public class Object { /// /// Default contructor /// public Object() => this.Type = "Object"; /// /// https://www.w3.org/TR/activitypub/#obj-id /// public Uri? Id { get; set; } /// /// https://www.w3.org/TR/activitystreams-vocabulary/#dfn-type /// public string Type { get; set; } /// /// https://www.w3.org/ns/activitystreams#attachment /// public ObjectOrLink? Attachment { get; set; } /// /// https://www.w3.org/ns/activitystreams#attributedTo /// public ObjectOrLink? AttributedTo { get; set; } /// /// https://www.w3.org/ns/activitystreams#audience /// public ObjectOrLink? Audience { get; set; } /// /// https://www.w3.org/ns/activitystreams#content /// public string? Content { get; set; } /// /// https://www.w3.org/TR/activitypub/#source-property /// public ObjectOrLink? Source { get; set; } /// /// https://www.w3.org/ns/activitystreams#context /// public ObjectOrLink? Context { get; set; } /// /// https://www.w3.org/ns/activitystreams#name /// public string? Name { get; set; } /// /// https://www.w3.org/ns/activitystreams#endTime /// public DateTimeOffset? EndTime { get; set; } /// /// https://www.w3.org/ns/activitystreams#generator /// public ObjectOrLink? Generator { get; set; } /// /// https://www.w3.org/ns/activitystreams#icon /// public GenericObjectOrLink? Icon { get; set; } /// /// https://www.w3.org/ns/activitystreams#Image /// public Image? Image { get; set; } /// /// https://www.w3.org/ns/activitystreams#inReplyTo /// public ObjectOrLink? InReplyTo { get; set; } /// /// https://www.w3.org/ns/activitystreams#location /// public ObjectOrLink? Location { get; set; } /// /// https://www.w3.org/ns/activitystreams#preview /// public ObjectOrLink? Preview { get; set; } /// /// https://www.w3.org/ns/activitystreams#published /// public DateTimeOffset? Published { get; set; } /// /// https://www.w3.org/ns/activitystreams#replies /// public Collection? Replies { get; set; } /// /// https://www.w3.org/ns/activitystreams#startTime /// public DateTimeOffset? StartTime { get; set; } /// /// https://www.w3.org/ns/activitystreams#summary /// public string? Summary { get; set; } /// /// https://www.w3.org/ns/activitystreams#tag /// public ObjectOrLink? Tag { get; set; } /// /// https://www.w3.org/ns/activitystreams#updated /// public DateTimeOffset? Updated { get; set; } /// /// https://www.w3.org/ns/activitystreams#url /// public LinkOrUri? Url { get; set; } /// /// https://www.w3.org/ns/activitystreams#to /// public ListOrLink? To { get; set; } /// /// https://www.w3.org/ns/activitystreams#bto /// public ListOrLink? Bto { get; set; } /// /// https://www.w3.org/ns/activitystreams#cc /// public ListOrLink? Cc { get; set; } /// /// https://www.w3.org/ns/activitystreams#bcc /// public ListOrLink? Bcc { get; set; } /// /// https://www.w3.org/ns/activitystreams#mediaType /// public string? MediaType { get; set; } /// /// https://www.w3.org/ns/activitystreams#duration /// public string? Duration { get; set; } /// /// https://www.w3.org/TR/activitypub/#likes /// public ListOrLink? Likes { get; set; } /// /// https://www.w3.org/TR/activitypub/#shares /// public ListOrLink? Shares { get; set; } //public Object(dynamic that) { // if(that.Id is Uri) this.Id = that.Id; // if(that.Id is string) this.Id = new Uri(that.Id); // this.Type = that.Type; //} //public static ObjectOrLink? FromDynamic(dynamic that) { // if (that is null) return null; // if (that is Uri) return (ObjectOrLink?)(Uri)that; // if (that is string) return (ObjectOrLink?)new Uri((string)that); // if (that is Object) return (ObjectOrLink?)(Object)that; // return (ObjectOrLink?)new Object(that); //} }