From 806fc864ede89cde0cb9e244742cd84b6f838056 Mon Sep 17 00:00:00 2001 From: Ryo Richardo <37143513+ryorichardo@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:23:55 +0700 Subject: [PATCH 1/2] Feat: Create MessagePostEmotion --- .../im/v1/model/ext/MessagePostEmotion.java | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 larksuite-oapi/src/main/java/com/lark/oapi/service/im/v1/model/ext/MessagePostEmotion.java diff --git a/larksuite-oapi/src/main/java/com/lark/oapi/service/im/v1/model/ext/MessagePostEmotion.java b/larksuite-oapi/src/main/java/com/lark/oapi/service/im/v1/model/ext/MessagePostEmotion.java new file mode 100644 index 000000000..593ae424f --- /dev/null +++ b/larksuite-oapi/src/main/java/com/lark/oapi/service/im/v1/model/ext/MessagePostEmotion.java @@ -0,0 +1,61 @@ +/* + * MIT License + * + * Copyright (c) 2022 Lark Technologies Pte. Ltd. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.lark.oapi.service.im.v1.model.ext; + +import com.google.gson.annotations.SerializedName; + +public class MessagePostEmotion extends MessagePostElement { + + @SerializedName("emoji_type") + private String emoji_type; + + public MessagePostEmotion() { + tag = "emotion"; + } + + public MessagePostEmotion(Builder builder) { + tag = "emotion"; + this.emoji_type = builder.emoji_type; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public String getEmojiType() { + return emoji_type; + } + + public void setEmojiType(String emoji_type) { + this.emoji_type = emoji_type; + } + + @Override + String getTag() { + return this.tag; + } + + public static class Builder { + + private String emoji_type; + + public Builder emoji_type(String emoji_type) { + this.emoji_type = emoji_type; + return this; + } + + public MessagePostEmotion build() { + return new MessagePostEmotion(this); + } + } +} From 70198bebc2d1d54d9bb4acdd769e339e5a77a6bc Mon Sep 17 00:00:00 2001 From: Ryo Richardo <37143513+ryorichardo@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:27:04 +0700 Subject: [PATCH 2/2] fix emojiType attribute --- .../im/v1/model/ext/MessagePostEmotion.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/larksuite-oapi/src/main/java/com/lark/oapi/service/im/v1/model/ext/MessagePostEmotion.java b/larksuite-oapi/src/main/java/com/lark/oapi/service/im/v1/model/ext/MessagePostEmotion.java index 593ae424f..13a46221b 100644 --- a/larksuite-oapi/src/main/java/com/lark/oapi/service/im/v1/model/ext/MessagePostEmotion.java +++ b/larksuite-oapi/src/main/java/com/lark/oapi/service/im/v1/model/ext/MessagePostEmotion.java @@ -17,7 +17,7 @@ public class MessagePostEmotion extends MessagePostElement { @SerializedName("emoji_type") - private String emoji_type; + private String emojiType; public MessagePostEmotion() { tag = "emotion"; @@ -25,7 +25,7 @@ public MessagePostEmotion() { public MessagePostEmotion(Builder builder) { tag = "emotion"; - this.emoji_type = builder.emoji_type; + this.emojiType = builder.emojiType; } public static Builder newBuilder() { @@ -33,11 +33,11 @@ public static Builder newBuilder() { } public String getEmojiType() { - return emoji_type; + return emojiType; } - public void setEmojiType(String emoji_type) { - this.emoji_type = emoji_type; + public void setEmojiType(String emojiType) { + this.emojiType = emojiType; } @Override @@ -47,10 +47,10 @@ String getTag() { public static class Builder { - private String emoji_type; + private String emojiType; - public Builder emoji_type(String emoji_type) { - this.emoji_type = emoji_type; + public Builder emojiType(String emojiType) { + this.emojiType = emojiType; return this; }