2018-05-12 20:14:43 +00:00
|
|
|
/*
|
2018-05-14 03:24:41 +00:00
|
|
|
* This file is part of ActivityStreams Types.
|
2018-05-12 20:14:43 +00:00
|
|
|
*
|
|
|
|
* Copyright © 2018 Riley Trautman
|
|
|
|
*
|
2018-05-14 03:24:41 +00:00
|
|
|
* ActivityStreams Types is free software: you can redistribute it and/or modify
|
2018-05-12 20:14:43 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2018-05-14 03:24:41 +00:00
|
|
|
* ActivityStreams Types is distributed in the hope that it will be useful,
|
2018-05-12 20:14:43 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-05-14 03:24:41 +00:00
|
|
|
* along with ActivityStreams Types. If not, see <http://www.gnu.org/licenses/>.
|
2018-05-12 20:14:43 +00:00
|
|
|
*/
|
|
|
|
|
2018-05-14 03:24:41 +00:00
|
|
|
use activitystreams_traits::{Activity, Link, Object};
|
2018-05-12 05:31:33 +00:00
|
|
|
use serde_json;
|
|
|
|
|
2018-05-14 03:24:41 +00:00
|
|
|
use super::{kind::DislikeType, properties::ActivityProperties};
|
|
|
|
use object::properties::ObjectProperties;
|
2018-05-12 05:31:33 +00:00
|
|
|
|
2018-05-13 20:58:47 +00:00
|
|
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
2018-05-12 05:31:33 +00:00
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
|
pub struct Dislike {
|
|
|
|
#[serde(rename = "type")]
|
|
|
|
kind: DislikeType,
|
2018-05-12 19:35:10 +00:00
|
|
|
|
|
|
|
#[activitystreams(ab(Object, Link))]
|
2018-05-12 05:31:33 +00:00
|
|
|
actor: serde_json::Value,
|
2018-05-12 19:35:10 +00:00
|
|
|
|
|
|
|
#[activitystreams(ab(Object, Link))]
|
2018-05-12 05:31:33 +00:00
|
|
|
object: serde_json::Value,
|
2018-05-12 19:35:10 +00:00
|
|
|
|
2018-05-12 05:31:33 +00:00
|
|
|
#[serde(flatten)]
|
|
|
|
pub object_props: ObjectProperties,
|
2018-05-12 19:35:10 +00:00
|
|
|
|
2018-05-12 05:31:33 +00:00
|
|
|
#[serde(flatten)]
|
|
|
|
pub activity_props: ActivityProperties,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Object for Dislike {}
|
|
|
|
impl Activity for Dislike {}
|