-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/main/java/discord4j/discordjson/json/gateway/PollVoteAdd.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* This file is part of Discord4J. | ||
* | ||
* Discord4J is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Discord4J is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with Discord4J. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package discord4j.discordjson.json.gateway; | ||
|
||
import com.fasterxml.jackson.annotation.JsonUnwrapped; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable(builder = false) | ||
@JsonSerialize(as = ImmutablePollVoteAdd.class) | ||
@JsonDeserialize(as = ImmutablePollVoteAdd.class) | ||
public interface PollVoteAdd extends Dispatch { | ||
|
||
@JsonUnwrapped | ||
PollVoteData data(); | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
src/main/java/discord4j/discordjson/json/gateway/PollVoteData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* This file is part of Discord4J. | ||
* | ||
* Discord4J is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Discord4J is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with Discord4J. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package discord4j.discordjson.json.gateway; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.Id; | ||
import org.immutables.value.Value; | ||
|
||
import java.util.Optional; | ||
|
||
@Value.Immutable(builder = false) | ||
@JsonSerialize(as = ImmutablePollVoteAdd.class) | ||
@JsonDeserialize(as = ImmutablePollVoteAdd.class) | ||
public interface PollVoteData { | ||
|
||
@JsonProperty("user_id") | ||
Id userId(); | ||
|
||
@JsonProperty("channel_id") | ||
Id channelId(); | ||
|
||
@JsonProperty("message_id") | ||
Id messageId(); | ||
|
||
@JsonProperty("guild_id") | ||
Optional<Id> guildId(); | ||
|
||
@JsonProperty("answer_id") | ||
int answerId(); | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
src/main/java/discord4j/discordjson/json/gateway/PollVoteRemove.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* This file is part of Discord4J. | ||
* | ||
* Discord4J is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Discord4J is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with Discord4J. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package discord4j.discordjson.json.gateway; | ||
|
||
import com.fasterxml.jackson.annotation.JsonUnwrapped; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable(builder = false) | ||
@JsonSerialize(as = ImmutablePollVoteRemove.class) | ||
@JsonDeserialize(as = ImmutablePollVoteRemove.class) | ||
public interface PollVoteRemove extends Dispatch { | ||
|
||
@JsonUnwrapped | ||
PollVoteData data(); | ||
|
||
} |