-
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
2 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
src/main/java/discord4j/discordjson/json/GuildSoundboardSoundsUpdateData.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,42 @@ | ||
/* | ||
* 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; | ||
|
||
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.List; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableGuildSoundboardSoundsUpdateData.class) | ||
@JsonDeserialize(as = ImmutableGuildSoundboardSoundsUpdateData.class) | ||
public interface GuildSoundboardSoundsUpdateData { | ||
|
||
static ImmutableGuildSoundboardSoundsUpdateData.Builder builder() { | ||
return ImmutableGuildSoundboardSoundsUpdateData.builder(); | ||
} | ||
|
||
@JsonProperty("soundboard_sounds") | ||
List<SoundboardSoundObject> soundboardSounds(); | ||
|
||
@JsonProperty("guild_id") | ||
Id guildId(); | ||
|
||
} |
57 changes: 57 additions & 0 deletions
57
src/main/java/discord4j/discordjson/json/SoundboardSoundObject.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,57 @@ | ||
/* | ||
* 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; | ||
|
||
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 discord4j.discordjson.possible.Possible; | ||
import org.immutables.value.Value; | ||
|
||
import java.util.Optional; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableSoundboardSoundObject.class) | ||
@JsonDeserialize(as = ImmutableSoundboardSoundObject.class) | ||
public interface SoundboardSoundObject { | ||
|
||
static ImmutableSoundboardSoundObject.Builder builder() { | ||
return ImmutableSoundboardSoundObject.builder(); | ||
} | ||
|
||
String name(); | ||
|
||
@JsonProperty("sound_id") | ||
Id soundId(); | ||
|
||
double volume(); | ||
|
||
@JsonProperty("emoji_id") | ||
Optional<Id> emojiId(); | ||
|
||
@JsonProperty("emoji_name") | ||
Optional<String> emojiName(); | ||
|
||
@JsonProperty("guild_id") | ||
Possible<Id> guildId(); | ||
|
||
boolean available(); | ||
|
||
Possible<PartialUserData> user(); | ||
|
||
} |