Skip to main content

activitystreams/activity/
types.rs

1/*
2 * This file is part of ActivityStreams.
3 *
4 * Copyright © 2020 Riley Trautman
5 *
6 * ActivityStreams is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * ActivityStreams is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with ActivityStreams.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20use crate::{
21    activity::{
22        kind::*, properties::*, Activity, ActivityBox, IntransitiveActivity,
23        IntransitiveActivityBox,
24    },
25    ext::Ext,
26    object::{
27        properties::{ApObjectProperties, ObjectProperties},
28        Object, ObjectBox,
29    },
30    Base, BaseBox, Extensible, PropRefs,
31};
32
33/// Indicates that the actor accepts the object.
34///
35/// The target property can be used in certain circumstances to indicate the context into which the
36/// object has been accepted.
37#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
38#[serde(rename_all = "camelCase")]
39#[prop_refs(Object)]
40#[prop_refs(Activity)]
41#[extension(ApObjectProperties)]
42pub struct Accept {
43    #[serde(rename = "type")]
44    #[serde(alias = "objectType")]
45    #[serde(alias = "verb")]
46    pub kind: AcceptType,
47
48    /// Adds all valid accept properties to this struct
49    #[serde(flatten)]
50    #[prop_refs]
51    pub accept_props: AcceptProperties,
52
53    /// Adds all valid object properties to this struct
54    #[serde(flatten)]
55    #[prop_refs]
56    pub object_props: ObjectProperties,
57
58    /// Adds all valid activity properties to this struct
59    #[serde(flatten)]
60    #[prop_refs]
61    pub activity_props: ActivityProperties,
62}
63
64/// Indicates that the actor has added the object to the target.
65///
66/// If the target property is not explicitly specified, the target would need to be determined
67/// implicitly by context. The origin can be used to identify the context from which the object
68/// originated.
69#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
70#[serde(rename_all = "camelCase")]
71#[prop_refs(Object)]
72#[prop_refs(Activity)]
73#[extension(ApObjectProperties)]
74pub struct Add {
75    #[serde(rename = "type")]
76    #[serde(alias = "objectType")]
77    #[serde(alias = "verb")]
78    pub kind: AddType,
79
80    /// Adds all valid add properties to this struct
81    #[serde(flatten)]
82    #[prop_refs]
83    pub add_props: AddProperties,
84
85    /// Adds all valid object properties to this struct
86    #[serde(flatten)]
87    #[prop_refs]
88    pub object_props: ObjectProperties,
89
90    /// Adds all valid activity properties to this struct
91    #[serde(flatten)]
92    #[prop_refs]
93    pub activity_props: ActivityProperties,
94}
95
96/// Indicates that the actor has moved object from origin to target.
97///
98/// If the origin or target are not specified, either can be determined by context.
99#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
100#[serde(rename_all = "camelCase")]
101#[prop_refs(Object)]
102#[prop_refs(Activity)]
103#[extension(ApObjectProperties)]
104pub struct AMove {
105    #[serde(rename = "type")]
106    #[serde(alias = "objectType")]
107    #[serde(alias = "verb")]
108    pub kind: MoveType,
109
110    /// Adds all valid move properties to this struct
111    #[serde(flatten)]
112    #[prop_refs]
113    pub move_props: MoveProperties,
114
115    /// Adds all valid object properties to this struct
116    #[serde(flatten)]
117    #[prop_refs]
118    pub object_props: ObjectProperties,
119
120    /// Adds all valid activity properties to this struct
121    #[serde(flatten)]
122    #[prop_refs]
123    pub activity_props: ActivityProperties,
124}
125
126/// Indicates that the actor is calling the target's attention the object.
127///
128/// The origin typically has no defined meaning.
129#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
130#[serde(rename_all = "camelCase")]
131#[prop_refs(Object)]
132#[prop_refs(Activity)]
133#[extension(ApObjectProperties)]
134pub struct Announce {
135    #[serde(rename = "type")]
136    #[serde(alias = "objectType")]
137    #[serde(alias = "verb")]
138    pub kind: AnnounceType,
139
140    /// Adds all valid announce properties to this struct
141    #[serde(flatten)]
142    #[prop_refs]
143    pub announce_props: AnnounceProperties,
144
145    /// Adds all valid object properties to this struct
146    #[serde(flatten)]
147    #[prop_refs]
148    pub object_props: ObjectProperties,
149
150    /// Adds all valid activity properties to this struct
151    #[serde(flatten)]
152    #[prop_refs]
153    pub activity_props: ActivityProperties,
154}
155
156/// An IntransitiveActivity that indicates that the actor has arrived at the location.
157///
158/// The origin can be used to identify the context from which the actor originated. The target
159/// typically has no defined meaning.
160#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
161#[serde(rename_all = "camelCase")]
162#[prop_refs(Object)]
163#[prop_refs(Activity)]
164#[extension(ApObjectProperties)]
165#[prop_refs(IntransitiveActivity)]
166pub struct Arrive {
167    #[serde(rename = "type")]
168    #[serde(alias = "objectType")]
169    #[serde(alias = "verb")]
170    pub kind: ArriveType,
171
172    /// Adds all valid arrive properties to this struct
173    #[serde(flatten)]
174    #[prop_refs]
175    pub arrive_props: ArriveProperties,
176
177    /// Adds all valid object properties to this struct
178    #[serde(flatten)]
179    #[prop_refs]
180    pub object_props: ObjectProperties,
181
182    /// Adds all valid activity properties to this struct
183    #[serde(flatten)]
184    #[prop_refs]
185    pub activity_props: ActivityProperties,
186}
187
188/// Indicates that the actor is blocking the object.
189///
190/// Blocking is a stronger form of Ignore. The typical use is to support social systems that allow
191/// one user to block activities or content of other users. The target and origin typically have no
192/// defined meaning.
193#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
194#[serde(rename_all = "camelCase")]
195#[prop_refs(Object)]
196#[prop_refs(Activity)]
197#[extension(ApObjectProperties)]
198pub struct Block {
199    #[serde(rename = "type")]
200    #[serde(alias = "objectType")]
201    #[serde(alias = "verb")]
202    pub kind: BlockType,
203
204    /// Adds all valid block properties to this struct
205    #[serde(flatten)]
206    #[prop_refs]
207    pub block_props: BlockProperties,
208
209    /// Adds all valid object properties to this struct
210    #[serde(flatten)]
211    #[prop_refs]
212    pub object_props: ObjectProperties,
213
214    /// Adds all valid activity properties to this struct
215    #[serde(flatten)]
216    #[prop_refs]
217    pub activity_props: ActivityProperties,
218}
219
220/// Indicates that the actor has created the object.
221#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
222#[serde(rename_all = "camelCase")]
223#[prop_refs(Object)]
224#[prop_refs(Activity)]
225#[extension(ApObjectProperties)]
226pub struct Create {
227    #[serde(rename = "type")]
228    #[serde(alias = "objectType")]
229    #[serde(alias = "verb")]
230    pub kind: CreateType,
231
232    /// Adds all valid create properties to this struct
233    #[serde(flatten)]
234    #[prop_refs]
235    pub create_props: CreateProperties,
236
237    /// Adds all valid object properties to this struct
238    #[serde(flatten)]
239    #[prop_refs]
240    pub object_props: ObjectProperties,
241
242    /// Adds all valid activity properties to this struct
243    #[serde(flatten)]
244    #[prop_refs]
245    pub activity_props: ActivityProperties,
246}
247
248/// Indicates that the actor has deleted the object.
249///
250/// If specified, the origin indicates the context from which the object was deleted.
251#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
252#[serde(rename_all = "camelCase")]
253#[prop_refs(Object)]
254#[prop_refs(Activity)]
255#[extension(ApObjectProperties)]
256pub struct Delete {
257    #[serde(rename = "type")]
258    #[serde(alias = "objectType")]
259    #[serde(alias = "verb")]
260    pub kind: DeleteType,
261
262    /// Adds all valid delete properties to this struct
263    #[serde(flatten)]
264    #[prop_refs]
265    pub delete_props: DeleteProperties,
266
267    /// Adds all valid object properties to this struct
268    #[serde(flatten)]
269    #[prop_refs]
270    pub object_props: ObjectProperties,
271
272    /// Adds all valid activity properties to this struct
273    #[serde(flatten)]
274    #[prop_refs]
275    pub activity_props: ActivityProperties,
276}
277
278/// Indicates that the actor dislikes the object.
279#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
280#[serde(rename_all = "camelCase")]
281#[prop_refs(Object)]
282#[prop_refs(Activity)]
283#[extension(ApObjectProperties)]
284pub struct Dislike {
285    #[serde(rename = "type")]
286    #[serde(alias = "objectType")]
287    #[serde(alias = "verb")]
288    pub kind: DislikeType,
289
290    /// Adds all valid dislike properties to this struct
291    #[serde(flatten)]
292    #[prop_refs]
293    pub dislike_props: DislikeProperties,
294
295    /// Adds all valid object properties to this struct
296    #[serde(flatten)]
297    #[prop_refs]
298    pub object_props: ObjectProperties,
299
300    /// Adds all valid activity properties to this struct
301    #[serde(flatten)]
302    #[prop_refs]
303    pub activity_props: ActivityProperties,
304}
305
306/// Indicates that the actor is "flagging" the object.
307///
308/// Flagging is defined in the sense common to many social platforms as reporting content as being
309/// inappropriate for any number of reasons.
310#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
311#[serde(rename_all = "camelCase")]
312#[prop_refs(Object)]
313#[prop_refs(Activity)]
314#[extension(ApObjectProperties)]
315pub struct Flag {
316    #[serde(rename = "type")]
317    #[serde(alias = "objectType")]
318    #[serde(alias = "verb")]
319    pub kind: FlagType,
320
321    /// Adds all valid flag properties to this struct
322    #[serde(flatten)]
323    #[prop_refs]
324    pub flag_props: FlagProperties,
325
326    /// Adds all valid object properties to this struct
327    #[serde(flatten)]
328    #[prop_refs]
329    pub object_props: ObjectProperties,
330
331    /// Adds all valid activity properties to this struct
332    #[serde(flatten)]
333    #[prop_refs]
334    pub activity_props: ActivityProperties,
335}
336
337/// Indicates that the actor is "following" the object.
338///
339/// Following is defined in the sense typically used within Social systems in which the actor is
340/// interested in any activity performed by or on the object. The target and origin typically have
341/// no defined meaning.
342#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
343#[serde(rename_all = "camelCase")]
344#[prop_refs(Object)]
345#[prop_refs(Activity)]
346#[extension(ApObjectProperties)]
347pub struct Follow {
348    #[serde(rename = "type")]
349    #[serde(alias = "objectType")]
350    #[serde(alias = "verb")]
351    pub kind: FollowType,
352
353    /// Adds all valid follow properties to this struct
354    #[serde(flatten)]
355    #[prop_refs]
356    pub follow_props: FollowProperties,
357
358    /// Adds all valid object properties to this struct
359    #[serde(flatten)]
360    #[prop_refs]
361    pub object_props: ObjectProperties,
362
363    /// Adds all valid activity properties to this struct
364    #[serde(flatten)]
365    #[prop_refs]
366    pub activity_props: ActivityProperties,
367}
368
369/// Indicates that the actor is ignoring the object.
370///
371/// The target and origin typically have no defined meaning.
372#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
373#[serde(rename_all = "camelCase")]
374#[prop_refs(Object)]
375#[prop_refs(Activity)]
376#[extension(ApObjectProperties)]
377pub struct Ignore {
378    #[serde(rename = "type")]
379    #[serde(alias = "objectType")]
380    #[serde(alias = "verb")]
381    pub kind: IgnoreType,
382
383    /// Adds all valid ignore properties to this struct
384    #[serde(flatten)]
385    #[prop_refs]
386    pub ignore_props: IgnoreProperties,
387
388    /// Adds all valid object properties to this struct
389    #[serde(flatten)]
390    #[prop_refs]
391    pub object_props: ObjectProperties,
392
393    /// Adds all valid activity properties to this struct
394    #[serde(flatten)]
395    #[prop_refs]
396    pub activity_props: ActivityProperties,
397}
398
399/// A specialization of Offer in which the actor is extending an invitation for the object to the
400/// target.
401#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
402#[serde(rename_all = "camelCase")]
403#[prop_refs(Object)]
404#[prop_refs(Activity)]
405#[extension(ApObjectProperties)]
406pub struct Invite {
407    #[serde(rename = "type")]
408    #[serde(alias = "objectType")]
409    #[serde(alias = "verb")]
410    pub kind: InviteType,
411
412    /// Adds all valid invite properties to this struct
413    #[serde(flatten)]
414    #[prop_refs]
415    pub invite_props: InviteProperties,
416
417    /// Adds all valid object properties to this struct
418    #[serde(flatten)]
419    #[prop_refs]
420    pub object_props: ObjectProperties,
421
422    /// Adds all valid activity properties to this struct
423    #[serde(flatten)]
424    #[prop_refs]
425    pub activity_props: ActivityProperties,
426}
427
428/// Indicates that the actor has joined the object.
429///
430/// The target and origin typically have no defined meaning
431#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
432#[serde(rename_all = "camelCase")]
433#[prop_refs(Object)]
434#[prop_refs(Activity)]
435#[extension(ApObjectProperties)]
436pub struct Join {
437    #[serde(rename = "type")]
438    #[serde(alias = "objectType")]
439    #[serde(alias = "verb")]
440    pub kind: JoinType,
441
442    /// Adds all valid join properties to this struct
443    #[serde(flatten)]
444    #[prop_refs]
445    pub join_props: JoinProperties,
446
447    /// Adds all valid object properties to this struct
448    #[serde(flatten)]
449    #[prop_refs]
450    pub object_props: ObjectProperties,
451
452    /// Adds all valid activity properties to this struct
453    #[serde(flatten)]
454    #[prop_refs]
455    pub activity_props: ActivityProperties,
456}
457
458/// Indicates that the actor has left the object.
459///
460/// The target and origin typically have no meaning.
461#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
462#[serde(rename_all = "camelCase")]
463#[prop_refs(Object)]
464#[prop_refs(Activity)]
465#[extension(ApObjectProperties)]
466pub struct Leave {
467    #[serde(rename = "type")]
468    #[serde(alias = "objectType")]
469    #[serde(alias = "verb")]
470    pub kind: LeaveType,
471
472    /// Adds all valid leave properties to this struct
473    #[serde(flatten)]
474    #[prop_refs]
475    pub leave_props: LeaveProperties,
476
477    /// Adds all valid object properties to this struct
478    #[serde(flatten)]
479    #[prop_refs]
480    pub object_props: ObjectProperties,
481
482    /// Adds all valid activity properties to this struct
483    #[serde(flatten)]
484    #[prop_refs]
485    pub activity_props: ActivityProperties,
486}
487
488/// Indicates that the actor likes, recommends or endorses the object.
489///
490/// The target and origin typically have no defined meaning.
491#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
492#[serde(rename_all = "camelCase")]
493#[prop_refs(Object)]
494#[prop_refs(Activity)]
495#[extension(ApObjectProperties)]
496pub struct Like {
497    #[serde(rename = "type")]
498    #[serde(alias = "objectType")]
499    #[serde(alias = "verb")]
500    pub kind: LikeType,
501
502    /// Adds all valid like properties to this struct
503    #[serde(flatten)]
504    #[prop_refs]
505    pub like_props: LikeProperties,
506
507    /// Adds all valid object properties to this struct
508    #[serde(flatten)]
509    #[prop_refs]
510    pub object_props: ObjectProperties,
511
512    /// Adds all valid activity properties to this struct
513    #[serde(flatten)]
514    #[prop_refs]
515    pub activity_props: ActivityProperties,
516}
517
518/// Indicates that the actor has listened to the object.
519#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
520#[serde(rename_all = "camelCase")]
521#[prop_refs(Object)]
522#[prop_refs(Activity)]
523#[extension(ApObjectProperties)]
524pub struct Listen {
525    #[serde(rename = "type")]
526    #[serde(alias = "objectType")]
527    #[serde(alias = "verb")]
528    kind: ListenType,
529
530    /// Adds all valid listen properties to this struct
531    #[serde(flatten)]
532    #[prop_refs]
533    pub listen_props: ListenProperties,
534
535    /// Adds all valid object properties to this struct
536    #[serde(flatten)]
537    #[prop_refs]
538    pub object_props: ObjectProperties,
539
540    /// Adds all valid activity properties to this struct
541    #[serde(flatten)]
542    #[prop_refs]
543    pub activity_props: ActivityProperties,
544}
545
546/// Indicates that the actor is offering the object.
547///
548/// If specified, the target indicates the entity to which the object is being offered.
549#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
550#[serde(rename_all = "camelCase")]
551#[prop_refs(Object)]
552#[prop_refs(Activity)]
553#[extension(ApObjectProperties)]
554pub struct Offer {
555    #[serde(rename = "type")]
556    #[serde(alias = "objectType")]
557    #[serde(alias = "verb")]
558    pub kind: OfferType,
559
560    /// Adds all valid object properties to this struct
561    #[serde(flatten)]
562    #[prop_refs]
563    pub offer_props: OfferProperties,
564
565    /// Adds all valid object properties to this struct
566    #[serde(flatten)]
567    #[prop_refs]
568    pub object_props: ObjectProperties,
569
570    /// Adds all valid activity properties to this struct
571    #[serde(flatten)]
572    #[prop_refs]
573    pub activity_props: ActivityProperties,
574}
575
576/// Represents a question being asked.
577///
578/// Question objects are an extension of IntransitiveActivity. That is, the Question object is an
579/// Activity, but the direct object is the question itself and therefore it would not contain an
580/// object property.
581///
582/// Either of the anyOf and oneOf properties MAY be used to express possible answers, but a
583/// Question object MUST NOT have both properties.
584#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
585#[serde(rename_all = "camelCase")]
586#[prop_refs(Object)]
587#[prop_refs(Activity)]
588#[extension(ApObjectProperties)]
589#[prop_refs(IntransitiveActivity)]
590pub struct Question {
591    #[serde(rename = "type")]
592    #[serde(alias = "objectType")]
593    #[serde(alias = "verb")]
594    pub kind: QuestionType,
595
596    /// Adds all valid question properties to this struct
597    #[serde(flatten)]
598    #[prop_refs]
599    pub question_props: QuestionProperties,
600
601    /// Adds all valid object properties to this struct
602    #[serde(flatten)]
603    #[prop_refs]
604    pub object_props: ObjectProperties,
605
606    /// Adds all valid activity properties to this struct
607    #[serde(flatten)]
608    #[prop_refs]
609    pub activity_props: ActivityProperties,
610}
611
612/// Indicates that the actor has read the object.
613#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
614#[serde(rename_all = "camelCase")]
615#[prop_refs(Object)]
616#[prop_refs(Activity)]
617#[extension(ApObjectProperties)]
618pub struct Read {
619    #[serde(rename = "type")]
620    #[serde(alias = "objectType")]
621    #[serde(alias = "verb")]
622    pub kind: ReadType,
623
624    /// Adds all valid read properties to this struct
625    #[serde(flatten)]
626    #[prop_refs]
627    pub read_props: ReadProperties,
628
629    /// Adds all valid object properties to this struct
630    #[serde(flatten)]
631    #[prop_refs]
632    pub object_props: ObjectProperties,
633
634    /// Adds all valid activity properties to this struct
635    #[serde(flatten)]
636    #[prop_refs]
637    pub activity_props: ActivityProperties,
638}
639
640/// Indicates that the actor is rejecting the object.
641///
642/// The target and origin typically have no defined meaning.
643#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
644#[serde(rename_all = "camelCase")]
645#[prop_refs(Object)]
646#[prop_refs(Activity)]
647#[extension(ApObjectProperties)]
648pub struct Reject {
649    #[serde(rename = "type")]
650    #[serde(alias = "objectType")]
651    #[serde(alias = "verb")]
652    pub kind: RejectType,
653
654    /// Adds all valid reject properties to this struct
655    #[serde(flatten)]
656    #[prop_refs]
657    pub reject_props: RejectProperties,
658
659    /// Adds all valid object properties to this struct
660    #[serde(flatten)]
661    #[prop_refs]
662    pub object_props: ObjectProperties,
663
664    /// Adds all valid activity properties to this struct
665    #[serde(flatten)]
666    #[prop_refs]
667    pub activity_props: ActivityProperties,
668}
669
670/// Indicates that the actor is removing the object.
671///
672/// If specified, the origin indicates the context from which the object is being removed.
673#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
674#[serde(rename_all = "camelCase")]
675#[prop_refs(Object)]
676#[prop_refs(Activity)]
677#[extension(ApObjectProperties)]
678pub struct Remove {
679    #[serde(rename = "type")]
680    #[serde(alias = "objectType")]
681    #[serde(alias = "verb")]
682    pub kind: RemoveType,
683
684    /// Adds all valid remove properties to this struct
685    #[serde(flatten)]
686    #[prop_refs]
687    pub remove_props: RemoveProperties,
688
689    /// Adds all valid object properties to this struct
690    #[serde(flatten)]
691    #[prop_refs]
692    pub object_props: ObjectProperties,
693
694    /// Adds all valid activity properties to this struct
695    #[serde(flatten)]
696    #[prop_refs]
697    pub activity_props: ActivityProperties,
698}
699
700/// A specialization of Accept indicating that the acceptance is tentative.
701#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
702#[serde(rename_all = "camelCase")]
703#[prop_refs(Object)]
704#[prop_refs(Activity)]
705#[extension(ApObjectProperties)]
706pub struct TentativeAccept {
707    #[serde(rename = "type")]
708    #[serde(alias = "objectType")]
709    #[serde(alias = "verb")]
710    pub kind: TentativeAcceptType,
711
712    /// Adds all valid tentative_accept properties to this struct
713    #[serde(flatten)]
714    #[prop_refs]
715    pub tentative_accept_props: TentativeAcceptProperties,
716
717    /// Adds all valid object properties to this struct
718    #[serde(flatten)]
719    #[prop_refs]
720    pub object_props: ObjectProperties,
721
722    /// Adds all valid activity properties to this struct
723    #[serde(flatten)]
724    #[prop_refs]
725    pub activity_props: ActivityProperties,
726}
727
728/// A specialization of Reject in which the rejection is considered tentative.
729#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
730#[serde(rename_all = "camelCase")]
731#[prop_refs(Object)]
732#[prop_refs(Activity)]
733#[extension(ApObjectProperties)]
734pub struct TentativeReject {
735    #[serde(rename = "type")]
736    #[serde(alias = "objectType")]
737    #[serde(alias = "verb")]
738    pub kind: TentativeRejectType,
739
740    /// Adds all valid tentative_reject properties to this struct
741    #[serde(flatten)]
742    #[prop_refs]
743    pub tentative_reject_props: TentativeRejectProperties,
744
745    /// Adds all valid object properties to this struct
746    #[serde(flatten)]
747    #[prop_refs]
748    pub object_props: ObjectProperties,
749
750    /// Adds all valid activity properties to this struct
751    #[serde(flatten)]
752    #[prop_refs]
753    pub activity_props: ActivityProperties,
754}
755
756/// Indicates that the actor is traveling to target from origin.
757///
758/// Travel is an IntransitiveObject whose actor specifies the direct object. If the target or
759/// origin are not specified, either can be determined by context.
760#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
761#[serde(rename_all = "camelCase")]
762#[prop_refs(Object)]
763#[prop_refs(Activity)]
764#[extension(ApObjectProperties)]
765#[prop_refs(IntransitiveActivity)]
766pub struct Travel {
767    #[serde(rename = "type")]
768    #[serde(alias = "objectType")]
769    #[serde(alias = "verb")]
770    pub kind: TravelType,
771
772    /// Adds all valid travel properties to this struct
773    #[serde(flatten)]
774    #[prop_refs]
775    pub travel_props: TravelProperties,
776
777    /// Adds all valid object properties to this struct
778    #[serde(flatten)]
779    #[prop_refs]
780    pub object_props: ObjectProperties,
781
782    /// Adds all valid activity properties to this struct
783    #[serde(flatten)]
784    #[prop_refs]
785    pub activity_props: ActivityProperties,
786}
787
788/// Indicates that the actor is undoing the object.
789///
790/// In most cases, the object will be an Activity describing some previously performed action (for
791/// instance, a person may have previously "liked" an article but, for whatever reason, might
792/// choose to undo that like at some later point in time).
793///
794/// The target and origin typically have no defined meaning.
795#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
796#[serde(rename_all = "camelCase")]
797#[prop_refs(Object)]
798#[prop_refs(Activity)]
799#[extension(ApObjectProperties)]
800pub struct Undo {
801    #[serde(rename = "type")]
802    #[serde(alias = "objectType")]
803    #[serde(alias = "verb")]
804    pub kind: UndoType,
805
806    /// Adds all valid undo properties to this struct
807    #[serde(flatten)]
808    #[prop_refs]
809    pub undo_props: UndoProperties,
810
811    /// Adds all valid object properties to this struct
812    #[serde(flatten)]
813    #[prop_refs]
814    pub object_props: ObjectProperties,
815
816    /// Adds all valid activity properties to this struct
817    #[serde(flatten)]
818    #[prop_refs]
819    pub activity_props: ActivityProperties,
820}
821
822/// Indicates that the actor has updated the object.
823///
824/// Note, however, that this vocabulary does not define a mechanism for describing the actual set
825/// of modifications made to object.
826///
827/// The target and origin typically have no defined meaning.
828#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
829#[serde(rename_all = "camelCase")]
830#[prop_refs(Object)]
831#[prop_refs(Activity)]
832#[extension(ApObjectProperties)]
833pub struct Update {
834    #[serde(rename = "type")]
835    #[serde(alias = "objectType")]
836    #[serde(alias = "verb")]
837    pub kind: UpdateType,
838
839    /// Adds all valid update properties to this struct
840    #[serde(flatten)]
841    #[prop_refs]
842    pub update_props: UpdateProperties,
843
844    /// Adds all valid object properties to this struct
845    #[serde(flatten)]
846    #[prop_refs]
847    pub object_props: ObjectProperties,
848
849    /// Adds all valid activity properties to this struct
850    #[serde(flatten)]
851    #[prop_refs]
852    pub activity_props: ActivityProperties,
853}
854
855/// Indicates that the actor has viewed the object.
856#[derive(Clone, Debug, Default, Extensible, PropRefs, serde::Deserialize, serde::Serialize)]
857#[serde(rename_all = "camelCase")]
858#[prop_refs(Object)]
859#[prop_refs(Activity)]
860#[extension(ApObjectProperties)]
861pub struct View {
862    #[serde(rename = "type")]
863    #[serde(alias = "objectType")]
864    #[serde(alias = "verb")]
865    pub kind: ViewType,
866
867    /// Adds all valid view properties to this struct
868    #[serde(flatten)]
869    #[prop_refs]
870    pub view_props: ViewProperties,
871
872    /// Adds all valid object properties to this struct
873    #[serde(flatten)]
874    #[prop_refs]
875    pub object_props: ObjectProperties,
876
877    /// Adds all valid activity properties to this struct
878    #[serde(flatten)]
879    #[prop_refs]
880    pub activity_props: ActivityProperties,
881}