| 
									
										
										
										
											2023-03-12 16:00:57 +01:00
										 |  |  | // GoToSocial | 
					
						
							|  |  |  | // Copyright (C) GoToSocial Authors admin@gotosocial.org | 
					
						
							|  |  |  | // SPDX-License-Identifier: AGPL-3.0-or-later | 
					
						
							|  |  |  | // | 
					
						
							|  |  |  | // This program is free software: you can redistribute it and/or modify | 
					
						
							|  |  |  | // it under the terms of the GNU Affero General Public License as published by | 
					
						
							|  |  |  | // the Free Software Foundation, either version 3 of the License, or | 
					
						
							|  |  |  | // (at your option) any later version. | 
					
						
							|  |  |  | // | 
					
						
							|  |  |  | // This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  | // but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  | // GNU Affero General Public License for more details. | 
					
						
							|  |  |  | // | 
					
						
							|  |  |  | // You should have received a copy of the GNU Affero General Public License | 
					
						
							|  |  |  | // along with this program.  If not, see <http://www.gnu.org/licenses/>. | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | package ap | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-23 18:28:12 +01:00
										 |  |  | import ( | 
					
						
							|  |  |  | 	"net/url" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-03-02 12:48:00 +01:00
										 |  |  | 	"codeberg.org/superseriousbusiness/activity/streams/vocab" | 
					
						
							| 
									
										
										
										
											2023-09-23 18:28:12 +01:00
										 |  |  | ) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | // IsActivityable returns whether AS vocab type name is acceptable as Activityable. | 
					
						
							|  |  |  | func IsActivityable(typeName string) bool { | 
					
						
							| 
									
										
										
										
											2024-12-05 13:35:07 +00:00
										 |  |  | 	return isActivity(typeName) | 
					
						
							|  |  |  | 	// See interfaces_test.go comment | 
					
						
							|  |  |  | 	// about intransitive activities: | 
					
						
							|  |  |  | 	// | 
					
						
							|  |  |  | 	// || isIntransitiveActivity(typeName) | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // ToActivityable safely tries to cast vocab.Type as Activityable, also checking for expected AS type names. | 
					
						
							|  |  |  | func ToActivityable(t vocab.Type) (Activityable, bool) { | 
					
						
							|  |  |  | 	activityable, ok := t.(Activityable) | 
					
						
							|  |  |  | 	if !ok || !IsActivityable(t.GetTypeName()) { | 
					
						
							|  |  |  | 		return nil, false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return activityable, true | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | // IsAccountable returns whether AS vocab type name is acceptable as Accountable. | 
					
						
							|  |  |  | func IsAccountable(typeName string) bool { | 
					
						
							|  |  |  | 	switch typeName { | 
					
						
							|  |  |  | 	case ActorPerson, | 
					
						
							|  |  |  | 		ActorApplication, | 
					
						
							|  |  |  | 		ActorOrganization, | 
					
						
							|  |  |  | 		ActorService, | 
					
						
							|  |  |  | 		ActorGroup: | 
					
						
							|  |  |  | 		return true | 
					
						
							|  |  |  | 	default: | 
					
						
							|  |  |  | 		return false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // ToAccountable safely tries to cast vocab.Type as Accountable, also checking for expected AS type names. | 
					
						
							|  |  |  | func ToAccountable(t vocab.Type) (Accountable, bool) { | 
					
						
							|  |  |  | 	accountable, ok := t.(Accountable) | 
					
						
							|  |  |  | 	if !ok || !IsAccountable(t.GetTypeName()) { | 
					
						
							|  |  |  | 		return nil, false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return accountable, true | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // IsStatusable returns whether AS vocab type name is acceptable as Statusable. | 
					
						
							|  |  |  | func IsStatusable(typeName string) bool { | 
					
						
							|  |  |  | 	switch typeName { | 
					
						
							|  |  |  | 	case ObjectArticle, | 
					
						
							|  |  |  | 		ObjectDocument, | 
					
						
							|  |  |  | 		ObjectImage, | 
					
						
							|  |  |  | 		ObjectVideo, | 
					
						
							|  |  |  | 		ObjectNote, | 
					
						
							|  |  |  | 		ObjectPage, | 
					
						
							|  |  |  | 		ObjectEvent, | 
					
						
							|  |  |  | 		ObjectPlace, | 
					
						
							|  |  |  | 		ObjectProfile, | 
					
						
							| 
									
										
										
										
											2025-03-24 11:56:42 +01:00
										 |  |  | 		ActivityQuestion, | 
					
						
							|  |  |  | 		ObjectAlbum: | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 		return true | 
					
						
							|  |  |  | 	default: | 
					
						
							|  |  |  | 		return false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // ToStatusable safely tries to cast vocab.Type as Statusable, also checking for expected  AS type names. | 
					
						
							|  |  |  | func ToStatusable(t vocab.Type) (Statusable, bool) { | 
					
						
							|  |  |  | 	statusable, ok := t.(Statusable) | 
					
						
							|  |  |  | 	if !ok || !IsStatusable(t.GetTypeName()) { | 
					
						
							|  |  |  | 		return nil, false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return statusable, true | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // IsPollable returns whether AS vocab type name is acceptable as Pollable. | 
					
						
							|  |  |  | func IsPollable(typeName string) bool { | 
					
						
							|  |  |  | 	return typeName == ActivityQuestion | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // ToPollable safely tries to cast vocab.Type as Pollable, also checking for expected AS type names. | 
					
						
							|  |  |  | func ToPollable(t vocab.Type) (Pollable, bool) { | 
					
						
							|  |  |  | 	pollable, ok := t.(Pollable) | 
					
						
							|  |  |  | 	if !ok || !IsPollable(t.GetTypeName()) { | 
					
						
							|  |  |  | 		return nil, false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return pollable, true | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | // IsPollOptionable returns whether AS vocab type name is acceptable as PollOptionable. | 
					
						
							|  |  |  | func IsPollOptionable(typeName string) bool { | 
					
						
							|  |  |  | 	return typeName == ObjectNote | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // ToPollOptionable safely tries to cast vocab.Type as PollOptionable, also checking for expected AS type names. | 
					
						
							|  |  |  | func ToPollOptionable(t vocab.Type) (PollOptionable, bool) { | 
					
						
							|  |  |  | 	note, ok := t.(vocab.ActivityStreamsNote) | 
					
						
							|  |  |  | 	if !ok || !IsPollOptionable(t.GetTypeName()) { | 
					
						
							|  |  |  | 		return nil, false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	if note.GetActivityStreamsContent() != nil || | 
					
						
							|  |  |  | 		note.GetActivityStreamsName() == nil { | 
					
						
							|  |  |  | 		// A PollOption is an ActivityStreamsNote | 
					
						
							|  |  |  | 		// WITHOUT a content property, instead only | 
					
						
							|  |  |  | 		// a name property. | 
					
						
							|  |  |  | 		return nil, false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return note, true | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-26 12:04:28 +02:00
										 |  |  | // IsAccept returns whether AS vocab type name | 
					
						
							| 
									
										
										
										
											2025-02-19 18:09:54 +01:00
										 |  |  | // is something that can be cast to Acceptable. | 
					
						
							| 
									
										
										
										
											2024-07-26 12:04:28 +02:00
										 |  |  | func IsAcceptable(typeName string) bool { | 
					
						
							|  |  |  | 	return typeName == ActivityAccept | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-02-19 18:09:54 +01:00
										 |  |  | // ToAcceptable safely tries to cast vocab.Type as Acceptable. | 
					
						
							|  |  |  | func ToAcceptable(t vocab.Type) (Acceptable, bool) { | 
					
						
							| 
									
										
										
										
											2024-07-26 12:04:28 +02:00
										 |  |  | 	acceptable, ok := t.(vocab.ActivityStreamsAccept) | 
					
						
							|  |  |  | 	if !ok || !IsAcceptable(t.GetTypeName()) { | 
					
						
							|  |  |  | 		return nil, false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return acceptable, true | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-02-19 18:09:54 +01:00
										 |  |  | // IsApprovable returns whether AS vocab type name | 
					
						
							|  |  |  | // is something that can be cast to Approvable. | 
					
						
							|  |  |  | func IsApprovable(typeName string) bool { | 
					
						
							|  |  |  | 	switch typeName { | 
					
						
							|  |  |  | 	case ObjectLikeApproval, | 
					
						
							|  |  |  | 		ObjectReplyApproval, | 
					
						
							|  |  |  | 		ObjectAnnounceApproval: | 
					
						
							|  |  |  | 		return true | 
					
						
							|  |  |  | 	default: | 
					
						
							|  |  |  | 		return false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // ToAcceptable safely tries to cast vocab.Type as Approvable. | 
					
						
							|  |  |  | func ToApprovable(t vocab.Type) (Approvable, bool) { | 
					
						
							|  |  |  | 	approvable, ok := t.(Approvable) | 
					
						
							|  |  |  | 	if !ok || !IsApprovable(t.GetTypeName()) { | 
					
						
							|  |  |  | 		return nil, false | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return approvable, true | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | // Activityable represents the minimum activitypub interface for representing an 'activity'. | 
					
						
							|  |  |  | // (see: IsActivityable() for types implementing this, though you MUST make sure to check | 
					
						
							|  |  |  | // the typeName as this bare interface may be implementable by non-Activityable types). | 
					
						
							|  |  |  | type Activityable interface { | 
					
						
							|  |  |  | 	// Activity is also a vocab.Type | 
					
						
							|  |  |  | 	vocab.Type | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	WithTo | 
					
						
							|  |  |  | 	WithCc | 
					
						
							|  |  |  | 	WithBcc | 
					
						
							|  |  |  | 	WithAttributedTo | 
					
						
							|  |  |  | 	WithActor | 
					
						
							|  |  |  | 	WithObject | 
					
						
							|  |  |  | 	WithPublished | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | // Accountable represents the minimum activitypub interface for representing an 'account'. | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | // (see: IsAccountable() for types implementing this, though you MUST make sure to check | 
					
						
							|  |  |  | // the typeName as this bare interface may be implementable by non-Accountable types). | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | type Accountable interface { | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	vocab.Type | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	WithPreferredUsername | 
					
						
							|  |  |  | 	WithIcon | 
					
						
							|  |  |  | 	WithName | 
					
						
							|  |  |  | 	WithImage | 
					
						
							|  |  |  | 	WithSummary | 
					
						
							| 
									
										
										
										
											2023-05-09 12:16:10 +02:00
										 |  |  | 	WithAttachment | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | 	WithDiscoverable | 
					
						
							|  |  |  | 	WithURL | 
					
						
							|  |  |  | 	WithPublicKey | 
					
						
							|  |  |  | 	WithInbox | 
					
						
							|  |  |  | 	WithOutbox | 
					
						
							|  |  |  | 	WithFollowing | 
					
						
							|  |  |  | 	WithFollowers | 
					
						
							|  |  |  | 	WithFeatured | 
					
						
							| 
									
										
										
										
											2024-02-06 10:45:46 +01:00
										 |  |  | 	WithMovedTo | 
					
						
							|  |  |  | 	WithAlsoKnownAs | 
					
						
							| 
									
										
										
										
											2021-08-23 12:46:05 +02:00
										 |  |  | 	WithManuallyApprovesFollowers | 
					
						
							| 
									
										
										
										
											2022-09-23 21:27:35 +02:00
										 |  |  | 	WithEndpoints | 
					
						
							| 
									
										
										
										
											2022-09-26 11:56:01 +02:00
										 |  |  | 	WithTag | 
					
						
							| 
									
										
										
										
											2024-01-26 14:17:10 +01:00
										 |  |  | 	WithPublished | 
					
						
							| 
									
										
										
										
											2024-12-05 13:35:07 +00:00
										 |  |  | 	WithUpdated | 
					
						
							| 
									
										
										
										
											2025-01-23 17:18:23 +00:00
										 |  |  | 	WithImage | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Statusable represents the minimum activitypub interface for representing a 'status'. | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | // (see: IsStatusable() for types implementing this, though you MUST make sure to check | 
					
						
							|  |  |  | // the typeName as this bare interface may be implementable by non-Statusable types). | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | type Statusable interface { | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	vocab.Type | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	WithSummary | 
					
						
							| 
									
										
										
										
											2023-02-02 16:41:02 +01:00
										 |  |  | 	WithName | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | 	WithInReplyTo | 
					
						
							|  |  |  | 	WithPublished | 
					
						
							| 
									
										
										
										
											2024-12-05 13:35:07 +00:00
										 |  |  | 	WithUpdated | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | 	WithURL | 
					
						
							|  |  |  | 	WithAttributedTo | 
					
						
							|  |  |  | 	WithTo | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | 	WithCc | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | 	WithSensitive | 
					
						
							|  |  |  | 	WithContent | 
					
						
							|  |  |  | 	WithAttachment | 
					
						
							|  |  |  | 	WithTag | 
					
						
							|  |  |  | 	WithReplies | 
					
						
							| 
									
										
										
										
											2025-03-24 11:56:42 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type InteractionPolicyAware interface { | 
					
						
							| 
									
										
										
										
											2024-07-26 12:04:28 +02:00
										 |  |  | 	WithInteractionPolicy | 
					
						
							|  |  |  | 	WithApprovedBy | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | // Pollable represents the minimum activitypub interface for representing a 'poll' (it's a subset of a status). | 
					
						
							|  |  |  | // (see: IsPollable() for types implementing this, though you MUST make sure to check | 
					
						
							|  |  |  | // the typeName as this bare interface may be implementable by non-Pollable types). | 
					
						
							|  |  |  | type Pollable interface { | 
					
						
							|  |  |  | 	WithOneOf | 
					
						
							|  |  |  | 	WithAnyOf | 
					
						
							|  |  |  | 	WithEndTime | 
					
						
							|  |  |  | 	WithClosed | 
					
						
							|  |  |  | 	WithVotersCount | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | 	// base-interfaces | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	Statusable | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | // PollOptionable represents the minimum activitypub interface for representing a poll 'vote'. | 
					
						
							|  |  |  | // (see: IsPollOptionable() for types implementing this, though you MUST make sure to check | 
					
						
							|  |  |  | // the typeName as this bare interface may be implementable by non-Pollable types). | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | type PollOptionable interface { | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | 	vocab.Type | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	WithName | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | 	WithTo | 
					
						
							|  |  |  | 	WithInReplyTo | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	WithReplies | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | 	WithAttributedTo | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-26 12:04:28 +02:00
										 |  |  | // Acceptable represents the minimum activitypub | 
					
						
							|  |  |  | // interface for representing an Accept. | 
					
						
							|  |  |  | type Acceptable interface { | 
					
						
							|  |  |  | 	Activityable | 
					
						
							| 
									
										
										
										
											2025-02-19 18:09:54 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	WithTarget | 
					
						
							|  |  |  | 	WithResult | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Approvable represents the minimum activitypub interface | 
					
						
							|  |  |  | // for a LikeApproval, ReplyApproval, or AnnounceApproval. | 
					
						
							|  |  |  | type Approvable interface { | 
					
						
							|  |  |  | 	vocab.Type | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	WithAttributedTo | 
					
						
							|  |  |  | 	WithObject | 
					
						
							|  |  |  | 	WithTarget | 
					
						
							| 
									
										
										
										
											2024-07-26 12:04:28 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | // Attachmentable represents the minimum activitypub interface for representing a 'mediaAttachment'. (see: IsAttachmentable). | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | // This interface is fulfilled by: Audio, Document, Image, Video | 
					
						
							|  |  |  | type Attachmentable interface { | 
					
						
							|  |  |  | 	WithTypeName | 
					
						
							|  |  |  | 	WithMediaType | 
					
						
							|  |  |  | 	WithURL | 
					
						
							|  |  |  | 	WithName | 
					
						
							| 
									
										
										
										
											2023-10-26 11:59:10 +02:00
										 |  |  | 	WithSummary | 
					
						
							| 
									
										
										
										
											2022-01-09 18:41:22 +01:00
										 |  |  | 	WithBlurhash | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Hashtaggable represents the minimum activitypub interface for representing a 'hashtag' tag. | 
					
						
							|  |  |  | type Hashtaggable interface { | 
					
						
							|  |  |  | 	WithTypeName | 
					
						
							|  |  |  | 	WithHref | 
					
						
							|  |  |  | 	WithName | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Emojiable represents the minimum interface for an 'emoji' tag. | 
					
						
							|  |  |  | type Emojiable interface { | 
					
						
							|  |  |  | 	WithJSONLDId | 
					
						
							|  |  |  | 	WithTypeName | 
					
						
							|  |  |  | 	WithName | 
					
						
							|  |  |  | 	WithUpdated | 
					
						
							|  |  |  | 	WithIcon | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Mentionable represents the minimum interface for a 'mention' tag. | 
					
						
							|  |  |  | type Mentionable interface { | 
					
						
							|  |  |  | 	WithName | 
					
						
							|  |  |  | 	WithHref | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Followable represents the minimum interface for an activitystreams 'follow' activity. | 
					
						
							|  |  |  | type Followable interface { | 
					
						
							|  |  |  | 	WithJSONLDId | 
					
						
							|  |  |  | 	WithTypeName | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	WithActor | 
					
						
							|  |  |  | 	WithObject | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Likeable represents the minimum interface for an activitystreams 'like' activity. | 
					
						
							|  |  |  | type Likeable interface { | 
					
						
							|  |  |  | 	WithJSONLDId | 
					
						
							|  |  |  | 	WithTypeName | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	WithActor | 
					
						
							|  |  |  | 	WithObject | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Blockable represents the minimum interface for an activitystreams 'block' activity. | 
					
						
							|  |  |  | type Blockable interface { | 
					
						
							|  |  |  | 	WithJSONLDId | 
					
						
							|  |  |  | 	WithTypeName | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	WithActor | 
					
						
							|  |  |  | 	WithObject | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Announceable represents the minimum interface for an activitystreams 'announce' activity. | 
					
						
							|  |  |  | type Announceable interface { | 
					
						
							|  |  |  | 	WithJSONLDId | 
					
						
							|  |  |  | 	WithTypeName | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	WithActor | 
					
						
							|  |  |  | 	WithObject | 
					
						
							|  |  |  | 	WithPublished | 
					
						
							|  |  |  | 	WithTo | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | 	WithCc | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-06 18:18:02 +02:00
										 |  |  | // Addressable represents the minimum interface for an addressed activity. | 
					
						
							|  |  |  | type Addressable interface { | 
					
						
							|  |  |  | 	WithTo | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | 	WithCc | 
					
						
							| 
									
										
										
										
											2021-10-06 18:18:02 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-23 11:46:50 +02:00
										 |  |  | // ReplyToable represents the minimum interface for an Activity that can be InReplyTo another activity. | 
					
						
							|  |  |  | type ReplyToable interface { | 
					
						
							|  |  |  | 	WithInReplyTo | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-23 15:24:40 +00:00
										 |  |  | // CollectionIterator represents the minimum interface for interacting with a | 
					
						
							|  |  |  | // wrapped Collection or OrderedCollection in order to access next / prev items. | 
					
						
							|  |  |  | type CollectionIterator interface { | 
					
						
							|  |  |  | 	vocab.Type | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	NextItem() TypeOrIRI | 
					
						
							|  |  |  | 	PrevItem() TypeOrIRI | 
					
						
							| 
									
										
										
										
											2024-04-16 13:10:13 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// TotalItems returns the total items | 
					
						
							|  |  |  | 	// present in the collection, derived | 
					
						
							|  |  |  | 	// from the totalItems property, or -1 | 
					
						
							|  |  |  | 	// if totalItems not present / readable. | 
					
						
							|  |  |  | 	TotalItems() int | 
					
						
							| 
									
										
										
										
											2024-02-23 15:24:40 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-23 18:28:12 +01:00
										 |  |  | // CollectionPageIterator represents the minimum interface for interacting with a wrapped | 
					
						
							|  |  |  | // CollectionPage or OrderedCollectionPage in order to access both next / prev pages and items. | 
					
						
							|  |  |  | type CollectionPageIterator interface { | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	vocab.Type | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-23 18:28:12 +01:00
										 |  |  | 	NextPage() WithIRI | 
					
						
							|  |  |  | 	PrevPage() WithIRI | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-04 13:09:42 +01:00
										 |  |  | 	NextItem() TypeOrIRI | 
					
						
							|  |  |  | 	PrevItem() TypeOrIRI | 
					
						
							| 
									
										
										
										
											2024-04-16 13:10:13 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// TotalItems returns the total items | 
					
						
							|  |  |  | 	// present in the collection, derived | 
					
						
							|  |  |  | 	// from the totalItems property, or -1 | 
					
						
							|  |  |  | 	// if totalItems not present / readable. | 
					
						
							|  |  |  | 	TotalItems() int | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-25 11:12:27 +01:00
										 |  |  | // Flaggable represents the minimum interface for an activitystreams 'Flag' activity. | 
					
						
							|  |  |  | type Flaggable interface { | 
					
						
							|  |  |  | 	WithJSONLDId | 
					
						
							|  |  |  | 	WithTypeName | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	WithActor | 
					
						
							|  |  |  | 	WithContent | 
					
						
							|  |  |  | 	WithObject | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-04 13:09:42 +01:00
										 |  |  | // TypeOrIRI represents the minimum interface for something that may be a vocab.Type OR IRI. | 
					
						
							|  |  |  | type TypeOrIRI interface { | 
					
						
							|  |  |  | 	WithIRI | 
					
						
							|  |  |  | 	WithType | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | // Property represents the minimum interface for an ActivityStreams property with IRIs. | 
					
						
							| 
									
										
										
										
											2024-02-06 10:45:46 +01:00
										 |  |  | type Property[T WithIRI] interface { | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | 	Len() int | 
					
						
							|  |  |  | 	At(int) T | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	AppendIRI(*url.URL) | 
					
						
							|  |  |  | 	SetIRI(int, *url.URL) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-23 18:28:12 +01:00
										 |  |  | // WithJSONLDId represents an activity with JSONLDIdProperty. | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | type WithJSONLDId interface { | 
					
						
							|  |  |  | 	GetJSONLDId() vocab.JSONLDIdProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetJSONLDId(vocab.JSONLDIdProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-23 18:28:12 +01:00
										 |  |  | // WithIRI represents an object (possibly) representable as an IRI. | 
					
						
							|  |  |  | type WithIRI interface { | 
					
						
							|  |  |  | 	GetIRI() *url.URL | 
					
						
							|  |  |  | 	IsIRI() bool | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetIRI(*url.URL) | 
					
						
							| 
									
										
										
										
											2023-09-23 18:28:12 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithType ... | 
					
						
							|  |  |  | type WithType interface { | 
					
						
							|  |  |  | 	GetType() vocab.Type | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | // WithTypeName represents an activity with a type name | 
					
						
							|  |  |  | type WithTypeName interface { | 
					
						
							|  |  |  | 	GetTypeName() string | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithPreferredUsername represents an activity with ActivityStreamsPreferredUsernameProperty | 
					
						
							|  |  |  | type WithPreferredUsername interface { | 
					
						
							|  |  |  | 	GetActivityStreamsPreferredUsername() vocab.ActivityStreamsPreferredUsernameProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsPreferredUsername(vocab.ActivityStreamsPreferredUsernameProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithIcon represents an activity with ActivityStreamsIconProperty | 
					
						
							|  |  |  | type WithIcon interface { | 
					
						
							|  |  |  | 	GetActivityStreamsIcon() vocab.ActivityStreamsIconProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsIcon(vocab.ActivityStreamsIconProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithName represents an activity with ActivityStreamsNameProperty | 
					
						
							|  |  |  | type WithName interface { | 
					
						
							|  |  |  | 	GetActivityStreamsName() vocab.ActivityStreamsNameProperty | 
					
						
							| 
									
										
										
										
											2023-04-26 17:17:22 +02:00
										 |  |  | 	SetActivityStreamsName(vocab.ActivityStreamsNameProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-04 11:46:59 +01:00
										 |  |  | // WithValue represents an activity with SchemaValueProperty | 
					
						
							|  |  |  | type WithValue interface { | 
					
						
							|  |  |  | 	GetSchemaValue() vocab.SchemaValueProperty | 
					
						
							|  |  |  | 	SetSchemaValue(vocab.SchemaValueProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | // WithImage represents an activity with ActivityStreamsImageProperty | 
					
						
							|  |  |  | type WithImage interface { | 
					
						
							|  |  |  | 	GetActivityStreamsImage() vocab.ActivityStreamsImageProperty | 
					
						
							| 
									
										
										
										
											2025-01-23 17:18:23 +00:00
										 |  |  | 	SetActivityStreamsImage(vocab.ActivityStreamsImageProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithSummary represents an activity with ActivityStreamsSummaryProperty | 
					
						
							|  |  |  | type WithSummary interface { | 
					
						
							|  |  |  | 	GetActivityStreamsSummary() vocab.ActivityStreamsSummaryProperty | 
					
						
							| 
									
										
										
										
											2023-04-26 17:17:22 +02:00
										 |  |  | 	SetActivityStreamsSummary(vocab.ActivityStreamsSummaryProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | // WithDiscoverable represents an activity with TootDiscoverableProperty | 
					
						
							|  |  |  | type WithDiscoverable interface { | 
					
						
							|  |  |  | 	GetTootDiscoverable() vocab.TootDiscoverableProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetTootDiscoverable(vocab.TootDiscoverableProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithURL represents an activity with ActivityStreamsUrlProperty | 
					
						
							|  |  |  | type WithURL interface { | 
					
						
							|  |  |  | 	GetActivityStreamsUrl() vocab.ActivityStreamsUrlProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsUrl(vocab.ActivityStreamsUrlProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithPublicKey represents an activity with W3IDSecurityV1PublicKeyProperty | 
					
						
							|  |  |  | type WithPublicKey interface { | 
					
						
							|  |  |  | 	GetW3IDSecurityV1PublicKey() vocab.W3IDSecurityV1PublicKeyProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetW3IDSecurityV1PublicKey(vocab.W3IDSecurityV1PublicKeyProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithInbox represents an activity with ActivityStreamsInboxProperty | 
					
						
							|  |  |  | type WithInbox interface { | 
					
						
							|  |  |  | 	GetActivityStreamsInbox() vocab.ActivityStreamsInboxProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsInbox(vocab.ActivityStreamsInboxProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithOutbox represents an activity with ActivityStreamsOutboxProperty | 
					
						
							|  |  |  | type WithOutbox interface { | 
					
						
							|  |  |  | 	GetActivityStreamsOutbox() vocab.ActivityStreamsOutboxProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsOutbox(vocab.ActivityStreamsOutboxProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-30 16:22:34 +00:00
										 |  |  | // WithSharedInbox represents an activity with ActivityStreamsSharedInboxProperty | 
					
						
							|  |  |  | type WithSharedInbox interface { | 
					
						
							|  |  |  | 	GetActivityStreamsSharedInbox() vocab.ActivityStreamsSharedInboxProperty | 
					
						
							|  |  |  | 	SetActivityStreamsSharedInbox(vocab.ActivityStreamsSharedInboxProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | // WithFollowing represents an activity with ActivityStreamsFollowingProperty | 
					
						
							|  |  |  | type WithFollowing interface { | 
					
						
							|  |  |  | 	GetActivityStreamsFollowing() vocab.ActivityStreamsFollowingProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsFollowing(vocab.ActivityStreamsFollowingProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithFollowers represents an activity with ActivityStreamsFollowersProperty | 
					
						
							|  |  |  | type WithFollowers interface { | 
					
						
							|  |  |  | 	GetActivityStreamsFollowers() vocab.ActivityStreamsFollowersProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsFollowers(vocab.ActivityStreamsFollowersProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithFeatured represents an activity with TootFeaturedProperty | 
					
						
							|  |  |  | type WithFeatured interface { | 
					
						
							|  |  |  | 	GetTootFeatured() vocab.TootFeaturedProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetTootFeatured(vocab.TootFeaturedProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 10:45:46 +01:00
										 |  |  | // WithMovedTo represents an Object with ActivityStreamsMovedToProperty. | 
					
						
							|  |  |  | type WithMovedTo interface { | 
					
						
							|  |  |  | 	GetActivityStreamsMovedTo() vocab.ActivityStreamsMovedToProperty | 
					
						
							|  |  |  | 	SetActivityStreamsMovedTo(vocab.ActivityStreamsMovedToProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithAlsoKnownAs represents an Object with ActivityStreamsAlsoKnownAsProperty. | 
					
						
							|  |  |  | type WithAlsoKnownAs interface { | 
					
						
							|  |  |  | 	GetActivityStreamsAlsoKnownAs() vocab.ActivityStreamsAlsoKnownAsProperty | 
					
						
							|  |  |  | 	SetActivityStreamsAlsoKnownAs(vocab.ActivityStreamsAlsoKnownAsProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | // WithAttributedTo represents an activity with ActivityStreamsAttributedToProperty | 
					
						
							|  |  |  | type WithAttributedTo interface { | 
					
						
							|  |  |  | 	GetActivityStreamsAttributedTo() vocab.ActivityStreamsAttributedToProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsAttributedTo(vocab.ActivityStreamsAttributedToProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithAttachment represents an activity with ActivityStreamsAttachmentProperty | 
					
						
							|  |  |  | type WithAttachment interface { | 
					
						
							|  |  |  | 	GetActivityStreamsAttachment() vocab.ActivityStreamsAttachmentProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsAttachment(vocab.ActivityStreamsAttachmentProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithTo represents an activity with ActivityStreamsToProperty | 
					
						
							|  |  |  | type WithTo interface { | 
					
						
							|  |  |  | 	GetActivityStreamsTo() vocab.ActivityStreamsToProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsTo(vocab.ActivityStreamsToProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-04 20:21:20 +00:00
										 |  |  | // WithCC represents an activity with ActivityStreamsCcProperty | 
					
						
							|  |  |  | type WithCc interface { | 
					
						
							|  |  |  | 	GetActivityStreamsCc() vocab.ActivityStreamsCcProperty | 
					
						
							|  |  |  | 	SetActivityStreamsCc(vocab.ActivityStreamsCcProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithCC represents an activity with ActivityStreamsBccProperty | 
					
						
							|  |  |  | type WithBcc interface { | 
					
						
							|  |  |  | 	GetActivityStreamsBcc() vocab.ActivityStreamsBccProperty | 
					
						
							|  |  |  | 	SetActivityStreamsBcc(vocab.ActivityStreamsBccProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | // WithInReplyTo represents an activity with ActivityStreamsInReplyToProperty | 
					
						
							|  |  |  | type WithInReplyTo interface { | 
					
						
							|  |  |  | 	GetActivityStreamsInReplyTo() vocab.ActivityStreamsInReplyToProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsInReplyTo(vocab.ActivityStreamsInReplyToProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-13 17:29:43 +01:00
										 |  |  | // WithSensitive represents an activity with ActivityStreamsSensitiveProperty | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | type WithSensitive interface { | 
					
						
							| 
									
										
										
										
											2021-11-13 17:29:43 +01:00
										 |  |  | 	GetActivityStreamsSensitive() vocab.ActivityStreamsSensitiveProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsSensitive(vocab.ActivityStreamsSensitiveProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithContent represents an activity with ActivityStreamsContentProperty | 
					
						
							|  |  |  | type WithContent interface { | 
					
						
							|  |  |  | 	GetActivityStreamsContent() vocab.ActivityStreamsContentProperty | 
					
						
							| 
									
										
										
										
											2023-04-06 13:19:55 +02:00
										 |  |  | 	SetActivityStreamsContent(vocab.ActivityStreamsContentProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | // WithPublished represents an activity with ActivityStreamsPublishedProperty | 
					
						
							|  |  |  | type WithPublished interface { | 
					
						
							|  |  |  | 	GetActivityStreamsPublished() vocab.ActivityStreamsPublishedProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsPublished(vocab.ActivityStreamsPublishedProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithTag represents an activity with ActivityStreamsTagProperty | 
					
						
							|  |  |  | type WithTag interface { | 
					
						
							|  |  |  | 	GetActivityStreamsTag() vocab.ActivityStreamsTagProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsTag(vocab.ActivityStreamsTagProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithReplies represents an activity with ActivityStreamsRepliesProperty | 
					
						
							|  |  |  | type WithReplies interface { | 
					
						
							|  |  |  | 	GetActivityStreamsReplies() vocab.ActivityStreamsRepliesProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsReplies(vocab.ActivityStreamsRepliesProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithMediaType represents an activity with ActivityStreamsMediaTypeProperty | 
					
						
							|  |  |  | type WithMediaType interface { | 
					
						
							|  |  |  | 	GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsMediaType(vocab.ActivityStreamsMediaTypeProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-09 18:41:22 +01:00
										 |  |  | // WithBlurhash represents an activity with TootBlurhashProperty | 
					
						
							|  |  |  | type WithBlurhash interface { | 
					
						
							|  |  |  | 	GetTootBlurhash() vocab.TootBlurhashProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetTootBlurhash(vocab.TootBlurhashProperty) | 
					
						
							| 
									
										
										
										
											2022-01-09 18:41:22 +01:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | // type withFocalPoint interface { | 
					
						
							|  |  |  | // 	// TODO | 
					
						
							|  |  |  | // } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithHref represents an activity with ActivityStreamsHrefProperty | 
					
						
							|  |  |  | type WithHref interface { | 
					
						
							|  |  |  | 	GetActivityStreamsHref() vocab.ActivityStreamsHrefProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsHref(vocab.ActivityStreamsHrefProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithUpdated represents an activity with ActivityStreamsUpdatedProperty | 
					
						
							|  |  |  | type WithUpdated interface { | 
					
						
							|  |  |  | 	GetActivityStreamsUpdated() vocab.ActivityStreamsUpdatedProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsUpdated(vocab.ActivityStreamsUpdatedProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithActor represents an activity with ActivityStreamsActorProperty | 
					
						
							|  |  |  | type WithActor interface { | 
					
						
							|  |  |  | 	GetActivityStreamsActor() vocab.ActivityStreamsActorProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsActor(vocab.ActivityStreamsActorProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithObject represents an activity with ActivityStreamsObjectProperty | 
					
						
							|  |  |  | type WithObject interface { | 
					
						
							|  |  |  | 	GetActivityStreamsObject() vocab.ActivityStreamsObjectProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsObject(vocab.ActivityStreamsObjectProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 10:45:46 +01:00
										 |  |  | // WithTarget represents an activity with ActivityStreamsTargetProperty | 
					
						
							|  |  |  | type WithTarget interface { | 
					
						
							|  |  |  | 	GetActivityStreamsTarget() vocab.ActivityStreamsTargetProperty | 
					
						
							|  |  |  | 	SetActivityStreamsTarget(vocab.ActivityStreamsTargetProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | // WithNext represents an activity with ActivityStreamsNextProperty | 
					
						
							|  |  |  | type WithNext interface { | 
					
						
							|  |  |  | 	GetActivityStreamsNext() vocab.ActivityStreamsNextProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsNext(vocab.ActivityStreamsNextProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithPartOf represents an activity with ActivityStreamsPartOfProperty | 
					
						
							|  |  |  | type WithPartOf interface { | 
					
						
							|  |  |  | 	GetActivityStreamsPartOf() vocab.ActivityStreamsPartOfProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsPartOf(vocab.ActivityStreamsPartOfProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithItems represents an activity with ActivityStreamsItemsProperty | 
					
						
							|  |  |  | type WithItems interface { | 
					
						
							|  |  |  | 	GetActivityStreamsItems() vocab.ActivityStreamsItemsProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsItems(vocab.ActivityStreamsItemsProperty) | 
					
						
							| 
									
										
										
										
											2021-08-10 13:32:39 +02:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2021-08-23 12:46:05 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | // WithManuallyApprovesFollowers represents a Person or profile with the ManuallyApprovesFollowers property. | 
					
						
							|  |  |  | type WithManuallyApprovesFollowers interface { | 
					
						
							|  |  |  | 	GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsManuallyApprovesFollowers(vocab.ActivityStreamsManuallyApprovesFollowersProperty) | 
					
						
							| 
									
										
										
										
											2021-08-23 12:46:05 +02:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2022-09-23 21:27:35 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | // WithEndpoints represents a Person or profile with the endpoints property | 
					
						
							|  |  |  | type WithEndpoints interface { | 
					
						
							|  |  |  | 	GetActivityStreamsEndpoints() vocab.ActivityStreamsEndpointsProperty | 
					
						
							| 
									
										
										
										
											2023-10-03 14:59:30 +01:00
										 |  |  | 	SetActivityStreamsEndpoints(vocab.ActivityStreamsEndpointsProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithOneOf represents an activity with the oneOf property. | 
					
						
							|  |  |  | type WithOneOf interface { | 
					
						
							|  |  |  | 	GetActivityStreamsOneOf() vocab.ActivityStreamsOneOfProperty | 
					
						
							|  |  |  | 	SetActivityStreamsOneOf(vocab.ActivityStreamsOneOfProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithOneOf represents an activity with the oneOf property. | 
					
						
							|  |  |  | type WithAnyOf interface { | 
					
						
							|  |  |  | 	GetActivityStreamsAnyOf() vocab.ActivityStreamsAnyOfProperty | 
					
						
							|  |  |  | 	SetActivityStreamsAnyOf(vocab.ActivityStreamsAnyOfProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithEndTime represents an activity with the endTime property. | 
					
						
							|  |  |  | type WithEndTime interface { | 
					
						
							|  |  |  | 	GetActivityStreamsEndTime() vocab.ActivityStreamsEndTimeProperty | 
					
						
							|  |  |  | 	SetActivityStreamsEndTime(vocab.ActivityStreamsEndTimeProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithClosed represents an activity with the closed property. | 
					
						
							|  |  |  | type WithClosed interface { | 
					
						
							|  |  |  | 	GetActivityStreamsClosed() vocab.ActivityStreamsClosedProperty | 
					
						
							|  |  |  | 	SetActivityStreamsClosed(vocab.ActivityStreamsClosedProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithVotersCount represents an activity with the votersCount property. | 
					
						
							|  |  |  | type WithVotersCount interface { | 
					
						
							|  |  |  | 	GetTootVotersCount() vocab.TootVotersCountProperty | 
					
						
							|  |  |  | 	SetTootVotersCount(vocab.TootVotersCountProperty) | 
					
						
							| 
									
										
										
										
											2022-09-23 21:27:35 +02:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2024-07-26 12:04:28 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | // WithReplies represents an object with GoToSocialInteractionPolicy. | 
					
						
							|  |  |  | type WithInteractionPolicy interface { | 
					
						
							|  |  |  | 	GetGoToSocialInteractionPolicy() vocab.GoToSocialInteractionPolicyProperty | 
					
						
							|  |  |  | 	SetGoToSocialInteractionPolicy(vocab.GoToSocialInteractionPolicyProperty) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithPolicyRules represents an activity with always and approvalRequired properties. | 
					
						
							|  |  |  | type WithPolicyRules interface { | 
					
						
							|  |  |  | 	GetGoToSocialAlways() vocab.GoToSocialAlwaysProperty | 
					
						
							|  |  |  | 	GetGoToSocialApprovalRequired() vocab.GoToSocialApprovalRequiredProperty | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // WithApprovedBy represents a Statusable with the approvedBy property. | 
					
						
							|  |  |  | type WithApprovedBy interface { | 
					
						
							|  |  |  | 	GetGoToSocialApprovedBy() vocab.GoToSocialApprovedByProperty | 
					
						
							|  |  |  | 	SetGoToSocialApprovedBy(vocab.GoToSocialApprovedByProperty) | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-02-19 18:09:54 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | // WithVotersCount represents an activity or object the result property. | 
					
						
							|  |  |  | type WithResult interface { | 
					
						
							|  |  |  | 	GetActivityStreamsResult() vocab.ActivityStreamsResultProperty | 
					
						
							|  |  |  | 	SetActivityStreamsResult(vocab.ActivityStreamsResultProperty) | 
					
						
							|  |  |  | } |