mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2025-02-17 22:15:13 +00:00
Move activity props into properties module
This commit is contained in:
parent
9011b35792
commit
677c8670ec
33 changed files with 569 additions and 766 deletions
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "activitystreams"
|
name = "activitystreams"
|
||||||
description = "Activity Streams in Rust"
|
description = "Activity Streams in Rust"
|
||||||
version = "0.1.1"
|
version = "0.2.0"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
authors = ["asonix <asonix.dev@gmail.com>"]
|
authors = ["asonix <asonix.dev@gmail.com>"]
|
||||||
repository = "https://github.com/asonix/activitystreams"
|
repository = "https://github.com/asonix/activitystreams"
|
||||||
|
@ -10,7 +10,7 @@ keywords = ["activitystreams", "activitypub"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
activitystreams-traits = { version = "0.1", path = "activitystreams-traits" }
|
activitystreams-traits = { version = "0.1", path = "activitystreams-traits" }
|
||||||
activitystreams-types = { version = "0.1", path = "activitystreams-types" }
|
activitystreams-types = { version = "0.2", path = "activitystreams-types" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
failure = "0.1"
|
failure = "0.1"
|
||||||
|
|
|
@ -8,7 +8,7 @@ For basic use, add the following to your Cargo.toml
|
||||||
```toml
|
```toml
|
||||||
# Cargo.toml
|
# Cargo.toml
|
||||||
|
|
||||||
activitystreams = "0.1"
|
activitystreams = "0.2"
|
||||||
```
|
```
|
||||||
|
|
||||||
And then use it in your project
|
And then use it in your project
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "activitystreams-types"
|
name = "activitystreams-types"
|
||||||
description = "Base types from the Activity Streams spec"
|
description = "Base types from the Activity Streams spec"
|
||||||
version = "0.1.1"
|
version = "0.2.0"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
authors = ["asonix <asonix.dev@gmail.com>"]
|
authors = ["asonix <asonix.dev@gmail.com>"]
|
||||||
repository = "https://github.com/asonix/activitystreams"
|
repository = "https://github.com/asonix/activitystreams"
|
||||||
|
|
|
@ -6,7 +6,7 @@ First, add the crate to your cargo.toml
|
||||||
```toml
|
```toml
|
||||||
# Cargo.toml
|
# Cargo.toml
|
||||||
|
|
||||||
activitystreams-types = "0.1"
|
activitystreams-types = "0.2"
|
||||||
```
|
```
|
||||||
|
|
||||||
Then use it in your project!
|
Then use it in your project!
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::AcceptType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::AcceptType, properties::{AcceptProperties, ActivityProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor accepts the object.
|
/// Indicates that the actor accepts the object.
|
||||||
|
@ -33,26 +34,9 @@ pub struct Accept {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: AcceptType,
|
pub kind: AcceptType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid accept properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub accept_props: AcceptProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::AddType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::AddType, properties::{ActivityProperties, AddProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor has added the object to the target.
|
/// Indicates that the actor has added the object to the target.
|
||||||
|
@ -34,26 +35,9 @@ pub struct Add {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: AddType,
|
pub kind: AddType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid add properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub add_props: AddProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::MoveType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::MoveType, properties::{ActivityProperties, MoveProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor has moved object from origin to target.
|
/// Indicates that the actor has moved object from origin to target.
|
||||||
|
@ -32,51 +33,9 @@ pub struct AMove {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: MoveType,
|
pub kind: MoveType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid move properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub move_props: MoveProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Describes an indirect object of the activity from which the activity is directed.
|
|
||||||
///
|
|
||||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
|
||||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
|
||||||
/// activity is "List A".
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub origin: Option<serde_json::Value>,
|
|
||||||
|
|
||||||
/// Describes the indirect object, or target, of the activity.
|
|
||||||
///
|
|
||||||
/// The precise meaning of the target is largely dependent on the type of action being
|
|
||||||
/// described but will often be the object of the English preposition "to". For instance, in
|
|
||||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
|
||||||
/// wishlist. An activity can have more than one target
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub target: Option<serde_json::Value>,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::AnnounceType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::AnnounceType, properties::{ActivityProperties, AnnounceProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor is calling the target's attention the object.
|
/// Indicates that the actor is calling the target's attention the object.
|
||||||
|
@ -32,39 +33,9 @@ pub struct Announce {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: AnnounceType,
|
pub kind: AnnounceType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid announce properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub announce_props: AnnounceProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Describes the indirect object, or target, of the activity.
|
|
||||||
///
|
|
||||||
/// The precise meaning of the target is largely dependent on the type of action being
|
|
||||||
/// described but will often be the object of the English preposition "to". For instance, in
|
|
||||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
|
||||||
/// wishlist. An activity can have more than one target
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub target: Option<serde_json::Value>,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, IntransitiveActivity, Link, Object};
|
use activitystreams_traits::{Activity, IntransitiveActivity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::ArriveType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::ArriveType, properties::{ActivityProperties, ArriveProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// An IntransitiveActivity that indicates that the actor has arrived at the location.
|
/// An IntransitiveActivity that indicates that the actor has arrived at the location.
|
||||||
|
@ -33,27 +34,9 @@ pub struct Arrive {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: ArriveType,
|
pub kind: ArriveType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid arrive properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub arrive_props: ArriveProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// Describes an indirect object of the activity from which the activity is directed.
|
|
||||||
///
|
|
||||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
|
||||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
|
||||||
/// activity is "List A".
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub origin: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::BlockType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::BlockType, properties::{ActivityProperties, BlockProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor is blocking the object.
|
/// Indicates that the actor is blocking the object.
|
||||||
|
@ -34,26 +35,9 @@ pub struct Block {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: BlockType,
|
pub kind: BlockType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid block properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub block_props: BlockProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::CreateType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::CreateType, properties::{ActivityProperties, CreateProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor has created the object.
|
/// Indicates that the actor has created the object.
|
||||||
|
@ -30,26 +31,9 @@ pub struct Create {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: CreateType,
|
pub kind: CreateType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid create properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub create_props: CreateProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::DeleteType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::DeleteType, properties::{ActivityProperties, DeleteProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor has deleted the object.
|
/// Indicates that the actor has deleted the object.
|
||||||
|
@ -32,38 +33,9 @@ pub struct Delete {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: DeleteType,
|
pub kind: DeleteType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid delete properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub delete_props: DeleteProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Describes an indirect object of the activity from which the activity is directed.
|
|
||||||
///
|
|
||||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
|
||||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
|
||||||
/// activity is "List A".
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub origin: Option<serde_json::Value>,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::DislikeType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::DislikeType, properties::{ActivityProperties, DislikeProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor dislikes the object.
|
/// Indicates that the actor dislikes the object.
|
||||||
|
@ -30,26 +31,9 @@ pub struct Dislike {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: DislikeType,
|
pub kind: DislikeType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid dislike properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub dislike_props: DislikeProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::FlagType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::FlagType, properties::{ActivityProperties, FlagProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor is "flagging" the object.
|
/// Indicates that the actor is "flagging" the object.
|
||||||
|
@ -33,26 +34,9 @@ pub struct Flag {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: FlagType,
|
pub kind: FlagType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid flag properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub flag_props: FlagProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::FollowType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::FollowType, properties::{ActivityProperties, FollowProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor is "following" the object.
|
/// Indicates that the actor is "following" the object.
|
||||||
|
@ -34,26 +35,9 @@ pub struct Follow {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: FollowType,
|
pub kind: FollowType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid follow properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub follow_props: FollowProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::IgnoreType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::IgnoreType, properties::{ActivityProperties, IgnoreProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor is ignoring the object.
|
/// Indicates that the actor is ignoring the object.
|
||||||
|
@ -32,26 +33,9 @@ pub struct Ignore {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: IgnoreType,
|
pub kind: IgnoreType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid ignore properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub ignore_props: IgnoreProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::InviteType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::InviteType, properties::{ActivityProperties, InviteProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// A specialization of Offer in which the actor is extending an invitation for the object to the
|
/// A specialization of Offer in which the actor is extending an invitation for the object to the
|
||||||
|
@ -31,38 +32,9 @@ pub struct Invite {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: InviteType,
|
pub kind: InviteType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid invite properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub invite_props: InviteProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Describes the indirect object, or target, of the activity.
|
|
||||||
///
|
|
||||||
/// The precise meaning of the target is largely dependent on the type of action being
|
|
||||||
/// described but will often be the object of the English preposition "to". For instance, in
|
|
||||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
|
||||||
/// wishlist. An activity can have more than one target
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub target: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::JoinType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::JoinType, properties::{ActivityProperties, JoinProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor has joined the object.
|
/// Indicates that the actor has joined the object.
|
||||||
|
@ -32,26 +33,9 @@ pub struct Join {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: JoinType,
|
pub kind: JoinType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid join properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub join_props: JoinProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::LeaveType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::LeaveType, properties::{ActivityProperties, LeaveProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor has left the object.
|
/// Indicates that the actor has left the object.
|
||||||
|
@ -32,26 +33,9 @@ pub struct Leave {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: LeaveType,
|
pub kind: LeaveType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid leave properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub leave_props: LeaveProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::LikeType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::LikeType, properties::{ActivityProperties, LikeProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor likes, recommends or endorses the object.
|
/// Indicates that the actor likes, recommends or endorses the object.
|
||||||
|
@ -32,26 +33,9 @@ pub struct Like {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: LikeType,
|
pub kind: LikeType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid like properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub like_props: LikeProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::ListenType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::ListenType, properties::{ActivityProperties, ListenProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor has listened to the object.
|
/// Indicates that the actor has listened to the object.
|
||||||
|
@ -30,26 +31,9 @@ pub struct Listen {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
kind: ListenType,
|
kind: ListenType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid listen properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub listen_props: ListenProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::OfferType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::OfferType, properties::{ActivityProperties, OfferProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor is offering the object.
|
/// Indicates that the actor is offering the object.
|
||||||
|
@ -32,39 +33,9 @@ pub struct Offer {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: OfferType,
|
pub kind: OfferType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid object properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub offer_props: OfferProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Describes the indirect object, or target, of the activity.
|
|
||||||
///
|
|
||||||
/// The precise meaning of the target is largely dependent on the type of action being
|
|
||||||
/// described but will often be the object of the English preposition "to". For instance, in
|
|
||||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
|
||||||
/// wishlist. An activity can have more than one target
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub target: Option<serde_json::Value>,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -84,3 +84,371 @@ pub struct ActivityProperties {
|
||||||
#[activitystreams(ab(Object, Link))]
|
#[activitystreams(ab(Object, Link))]
|
||||||
pub instrument: Option<serde_json::Value>,
|
pub instrument: Option<serde_json::Value>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Struct with `actor` and optional `origin` and `target` properties
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct ActorOptOriginAndTarget {
|
||||||
|
/// Describes one or more entities that either performed or are expected to perform the
|
||||||
|
/// activity.
|
||||||
|
///
|
||||||
|
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||||
|
/// Link.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub actor: serde_json::Value,
|
||||||
|
|
||||||
|
/// Describes an indirect object of the activity from which the activity is directed.
|
||||||
|
///
|
||||||
|
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||||
|
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||||
|
/// activity is "List A".
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub origin: Option<serde_json::Value>,
|
||||||
|
|
||||||
|
/// Describes the indirect object, or target, of the activity.
|
||||||
|
///
|
||||||
|
/// The precise meaning of the target is largely dependent on the type of action being
|
||||||
|
/// described but will often be the object of the English preposition "to". For instance, in
|
||||||
|
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||||
|
/// wishlist. An activity can have more than one target
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub target: Option<serde_json::Value>,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Struct with `actor` and `object` properties
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct ActorAndObject {
|
||||||
|
/// Describes one or more entities that either performed or are expected to perform the
|
||||||
|
/// activity.
|
||||||
|
///
|
||||||
|
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||||
|
/// Link.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub actor: serde_json::Value,
|
||||||
|
|
||||||
|
/// When used within an Activity, describes the direct object of the activity.
|
||||||
|
///
|
||||||
|
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||||
|
/// activity is the movie added.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub object: serde_json::Value,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Struct with `actor`, `object`, and `target` properties
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct ActorObjectAndTarget {
|
||||||
|
/// Describes one or more entities that either performed or are expected to perform the
|
||||||
|
/// activity.
|
||||||
|
///
|
||||||
|
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||||
|
/// Link.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub actor: serde_json::Value,
|
||||||
|
|
||||||
|
/// When used within an Activity, describes the direct object of the activity.
|
||||||
|
///
|
||||||
|
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||||
|
/// activity is the movie added.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub object: serde_json::Value,
|
||||||
|
|
||||||
|
/// Describes the indirect object, or target, of the activity.
|
||||||
|
///
|
||||||
|
/// The precise meaning of the target is largely dependent on the type of action being
|
||||||
|
/// described but will often be the object of the English preposition "to". For instance, in
|
||||||
|
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||||
|
/// wishlist. An activity can have more than one target
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub target: serde_json::Value,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Struct with `actor`, `object`, and optional `target` properties
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct ActorAndObjectOptTarget {
|
||||||
|
/// Describes one or more entities that either performed or are expected to perform the
|
||||||
|
/// activity.
|
||||||
|
///
|
||||||
|
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||||
|
/// Link.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub actor: serde_json::Value,
|
||||||
|
|
||||||
|
/// When used within an Activity, describes the direct object of the activity.
|
||||||
|
///
|
||||||
|
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||||
|
/// activity is the movie added.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub object: serde_json::Value,
|
||||||
|
|
||||||
|
/// Describes the indirect object, or target, of the activity.
|
||||||
|
///
|
||||||
|
/// The precise meaning of the target is largely dependent on the type of action being
|
||||||
|
/// described but will often be the object of the English preposition "to". For instance, in
|
||||||
|
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||||
|
/// wishlist. An activity can have more than one target
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub target: Option<serde_json::Value>,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Struct with `actor`, `object`, and optional `origin` properties
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct ActorAndObjectOptOrigin {
|
||||||
|
/// Describes one or more entities that either performed or are expected to perform the
|
||||||
|
/// activity.
|
||||||
|
///
|
||||||
|
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||||
|
/// Link.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub actor: serde_json::Value,
|
||||||
|
|
||||||
|
/// When used within an Activity, describes the direct object of the activity.
|
||||||
|
///
|
||||||
|
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||||
|
/// activity is the movie added.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub object: serde_json::Value,
|
||||||
|
|
||||||
|
/// Describes an indirect object of the activity from which the activity is directed.
|
||||||
|
///
|
||||||
|
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||||
|
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||||
|
/// activity is "List A".
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub origin: Option<serde_json::Value>,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Struct with `actor`, `object`, and optional `origin` and `target` properties
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct ActorAndObjectOptOthers {
|
||||||
|
/// Describes one or more entities that either performed or are expected to perform the
|
||||||
|
/// activity.
|
||||||
|
///
|
||||||
|
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||||
|
/// Link.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub actor: serde_json::Value,
|
||||||
|
|
||||||
|
/// When used within an Activity, describes the direct object of the activity.
|
||||||
|
///
|
||||||
|
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
||||||
|
/// activity is the movie added.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub object: serde_json::Value,
|
||||||
|
|
||||||
|
/// Describes an indirect object of the activity from which the activity is directed.
|
||||||
|
///
|
||||||
|
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||||
|
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||||
|
/// activity is "List A".
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub origin: Option<serde_json::Value>,
|
||||||
|
|
||||||
|
/// Describes the indirect object, or target, of the activity.
|
||||||
|
///
|
||||||
|
/// The precise meaning of the target is largely dependent on the type of action being
|
||||||
|
/// described but will often be the object of the English preposition "to". For instance, in
|
||||||
|
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
||||||
|
/// wishlist. An activity can have more than one target
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub target: Option<serde_json::Value>,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Struct with `actor` and `origin` properties
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct ActorAndOrigin {
|
||||||
|
/// Describes one or more entities that either performed or are expected to perform the
|
||||||
|
/// activity.
|
||||||
|
///
|
||||||
|
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
||||||
|
/// Link.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub actor: serde_json::Value,
|
||||||
|
|
||||||
|
/// Describes an indirect object of the activity from which the activity is directed.
|
||||||
|
///
|
||||||
|
/// The precise meaning of the origin is the object of the English preposition "from". For
|
||||||
|
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
||||||
|
/// activity is "List A".
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub origin: serde_json::Value,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Properties for the Accept activity
|
||||||
|
pub type AcceptProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Add activity
|
||||||
|
pub type AddProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Move activity
|
||||||
|
pub type MoveProperties = ActorAndObjectOptOthers;
|
||||||
|
|
||||||
|
/// Properties for the Announce activity
|
||||||
|
pub type AnnounceProperties = ActorAndObjectOptTarget;
|
||||||
|
|
||||||
|
/// Properties for the Arrive activity
|
||||||
|
pub type ArriveProperties = ActorAndOrigin;
|
||||||
|
|
||||||
|
/// Properties for the Block activity
|
||||||
|
pub type BlockProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Create activity
|
||||||
|
pub type CreateProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Delete activity
|
||||||
|
pub type DeleteProperties = ActorAndObjectOptOrigin;
|
||||||
|
|
||||||
|
/// Properties for the Dislike activity
|
||||||
|
pub type DislikeProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Flag activity
|
||||||
|
pub type FlagProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Follow activity
|
||||||
|
pub type FollowProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Ignore activity
|
||||||
|
pub type IgnoreProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Invite activity
|
||||||
|
pub type InviteProperties = ActorObjectAndTarget;
|
||||||
|
|
||||||
|
/// Properties for the Join activity
|
||||||
|
pub type JoinProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Leave activity
|
||||||
|
pub type LeaveProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Like activity
|
||||||
|
pub type LikeProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Listen activity
|
||||||
|
pub type ListenProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Offer activity
|
||||||
|
pub type OfferProperties = ActorAndObjectOptTarget;
|
||||||
|
|
||||||
|
/// Properties for the Question activity
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct QuestionProperties {
|
||||||
|
/// Identifies an exclusive option for a Question.
|
||||||
|
///
|
||||||
|
/// Use of `one_of` implies that the Question can have only a single answer. To indicate that a
|
||||||
|
/// `Question` can have multiple answers, use `any_of`.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub one_of: Option<serde_json::Value>,
|
||||||
|
|
||||||
|
/// Identifies an inclusive option for a Question.
|
||||||
|
///
|
||||||
|
/// Use of `any_of` implies that the Question can have multiple answers. To indicate that a
|
||||||
|
/// `Question` can have only one answer, use `one_of`.
|
||||||
|
///
|
||||||
|
/// - Range: `Object` | `Link`
|
||||||
|
/// - Functional: false
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
#[activitystreams(ab(Object, Link))]
|
||||||
|
pub any_of: Option<serde_json::Value>,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Properties for the Read activity
|
||||||
|
pub type ReadProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Reject activity
|
||||||
|
pub type RejectProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Remove activity
|
||||||
|
pub type RemoveProperties = ActorAndObjectOptOthers;
|
||||||
|
|
||||||
|
/// Properties for the TentativeAccept activity
|
||||||
|
pub type TentativeAcceptProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the TentativeReject activity
|
||||||
|
pub type TentativeRejectProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Travel activity
|
||||||
|
pub type TravelProperties = ActorOptOriginAndTarget;
|
||||||
|
|
||||||
|
/// Properties for the Undo activity
|
||||||
|
pub type UndoProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the Update activity
|
||||||
|
pub type UpdateProperties = ActorAndObject;
|
||||||
|
|
||||||
|
/// Properties for the View activity
|
||||||
|
pub type ViewProperties = ActorAndObject;
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, IntransitiveActivity, Link, Object};
|
use activitystreams_traits::{Activity, IntransitiveActivity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::QuestionType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::QuestionType, properties::{ActivityProperties, QuestionProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Represents a question being asked.
|
/// Represents a question being asked.
|
||||||
|
@ -37,27 +38,9 @@ pub struct Question {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: QuestionType,
|
pub kind: QuestionType,
|
||||||
|
|
||||||
/// Identifies an exclusive option for a Question.
|
/// Adds all valid question properties to this struct
|
||||||
///
|
#[serde(flatten)]
|
||||||
/// Use of `one_of` implies that the Question can have only a single answer. To indicate that a
|
pub question_props: QuestionProperties,
|
||||||
/// `Question` can have multiple answers, use `any_of`.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub one_of: Option<serde_json::Value>,
|
|
||||||
|
|
||||||
/// Identifies an inclusive option for a Question.
|
|
||||||
///
|
|
||||||
/// Use of `any_of` implies that the Question can have multiple answers. To indicate that a
|
|
||||||
/// `Question` can have only one answer, use `one_of`.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub any_of: Option<serde_json::Value>,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::ReadType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::ReadType, properties::{ActivityProperties, ReadProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor has read the object.
|
/// Indicates that the actor has read the object.
|
||||||
|
@ -30,26 +31,9 @@ pub struct Read {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: ReadType,
|
pub kind: ReadType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid read properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub read_props: ReadProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::RejectType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::RejectType, properties::{ActivityProperties, RejectProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor is rejecting the object.
|
/// Indicates that the actor is rejecting the object.
|
||||||
|
@ -32,26 +33,9 @@ pub struct Reject {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: RejectType,
|
pub kind: RejectType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid reject properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub reject_props: RejectProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::RemoveType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::RemoveType, properties::{ActivityProperties, RemoveProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor is removing the object.
|
/// Indicates that the actor is removing the object.
|
||||||
|
@ -32,51 +33,9 @@ pub struct Remove {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: RemoveType,
|
pub kind: RemoveType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid remove properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub remove_props: RemoveProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Describes an indirect object of the activity from which the activity is directed.
|
|
||||||
///
|
|
||||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
|
||||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
|
||||||
/// activity is "List A".
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub origin: Option<serde_json::Value>,
|
|
||||||
|
|
||||||
/// Describes the indirect object, or target, of the activity.
|
|
||||||
///
|
|
||||||
/// The precise meaning of the target is largely dependent on the type of action being
|
|
||||||
/// described but will often be the object of the English preposition "to". For instance, in
|
|
||||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
|
||||||
/// wishlist. An activity can have more than one target
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub target: Option<serde_json::Value>,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::TentativeAcceptType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::TentativeAcceptType, properties::{ActivityProperties, TentativeAcceptProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// A specialization of Accept indicating that the acceptance is tentative.
|
/// A specialization of Accept indicating that the acceptance is tentative.
|
||||||
|
@ -30,26 +31,9 @@ pub struct TentativeAccept {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: TentativeAcceptType,
|
pub kind: TentativeAcceptType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid tentative_accept properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub tentative_accept_props: TentativeAcceptProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::TentativeRejectType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::TentativeRejectType, properties::{ActivityProperties, TentativeRejectProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// A specialization of Reject in which the rejection is considered tentative.
|
/// A specialization of Reject in which the rejection is considered tentative.
|
||||||
|
@ -30,26 +31,9 @@ pub struct TentativeReject {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: TentativeRejectType,
|
pub kind: TentativeRejectType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid tentative_reject properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub tentative_reject_props: TentativeRejectProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, IntransitiveActivity, Link, Object};
|
use activitystreams_traits::{Activity, IntransitiveActivity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::TravelType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::TravelType, properties::{ActivityProperties, TravelProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor is traveling to target from origin.
|
/// Indicates that the actor is traveling to target from origin.
|
||||||
|
@ -33,41 +34,9 @@ pub struct Travel {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: TravelType,
|
pub kind: TravelType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid travel properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub travel_props: TravelProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// Describes an indirect object of the activity from which the activity is directed.
|
|
||||||
///
|
|
||||||
/// The precise meaning of the origin is the object of the English preposition "from". For
|
|
||||||
/// instance, in the activity "John moved an item to List B from List A", the origin of the
|
|
||||||
/// activity is "List A".
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub origin: Option<serde_json::Value>,
|
|
||||||
|
|
||||||
/// Describes the indirect object, or target, of the activity.
|
|
||||||
///
|
|
||||||
/// The precise meaning of the target is largely dependent on the type of action being
|
|
||||||
/// described but will often be the object of the English preposition "to". For instance, in
|
|
||||||
/// the activity "John added a movie to his wishlist", the target of the activity is John's
|
|
||||||
/// wishlist. An activity can have more than one target
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub target: Option<serde_json::Value>,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::UndoType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::UndoType, properties::{ActivityProperties, UndoProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor is undoing the object.
|
/// Indicates that the actor is undoing the object.
|
||||||
|
@ -36,26 +37,9 @@ pub struct Undo {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: UndoType,
|
pub kind: UndoType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid undo properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub undo_props: UndoProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::UpdateType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::UpdateType, properties::{ActivityProperties, UpdateProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor has updated the object.
|
/// Indicates that the actor has updated the object.
|
||||||
|
@ -35,26 +36,9 @@ pub struct Update {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: UpdateType,
|
pub kind: UpdateType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid update properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub update_props: UpdateProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use activitystreams_traits::{Activity, Link, Object};
|
use activitystreams_traits::{Activity, Object};
|
||||||
use serde_json;
|
|
||||||
|
|
||||||
use super::{kind::ViewType, properties::ActivityProperties};
|
use super::{
|
||||||
|
kind::ViewType, properties::{ActivityProperties, ViewProperties},
|
||||||
|
};
|
||||||
use object::properties::ObjectProperties;
|
use object::properties::ObjectProperties;
|
||||||
|
|
||||||
/// Indicates that the actor has viewed the object.
|
/// Indicates that the actor has viewed the object.
|
||||||
|
@ -30,26 +31,9 @@ pub struct View {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: ViewType,
|
pub kind: ViewType,
|
||||||
|
|
||||||
/// Describes one or more entities that either performed or are expected to perform the
|
/// Adds all valid view properties to this struct
|
||||||
/// activity.
|
#[serde(flatten)]
|
||||||
///
|
pub view_props: ViewProperties,
|
||||||
/// Any single activity can have multiple actors. The actor MAY be specified using an indirect
|
|
||||||
/// Link.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub actor: serde_json::Value,
|
|
||||||
|
|
||||||
/// When used within an Activity, describes the direct object of the activity.
|
|
||||||
///
|
|
||||||
/// For instance, in the activity "John added a movie to his wishlist", the object of the
|
|
||||||
/// activity is the movie added.
|
|
||||||
///
|
|
||||||
/// - Range: `Object` | `Link`
|
|
||||||
/// - Functional: false
|
|
||||||
#[activitystreams(ab(Object, Link))]
|
|
||||||
pub object: serde_json::Value,
|
|
||||||
|
|
||||||
/// Adds all valid object properties to this struct
|
/// Adds all valid object properties to this struct
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
|
Loading…
Reference in a new issue