Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ src/main/java/com/linecorp/bot/messaging/model/LocationAction.java
src/main/java/com/linecorp/bot/messaging/model/LocationMessage.java
src/main/java/com/linecorp/bot/messaging/model/LotteryAcquisitionConditionRequest.java
src/main/java/com/linecorp/bot/messaging/model/LotteryAcquisitionConditionResponse.java
src/main/java/com/linecorp/bot/messaging/model/MarkMessagesAsReadByTokenRequest.java
src/main/java/com/linecorp/bot/messaging/model/MarkMessagesAsReadRequest.java
src/main/java/com/linecorp/bot/messaging/model/MembersIdsResponse.java
src/main/java/com/linecorp/bot/messaging/model/Membership.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.linecorp.bot.messaging.model.GroupSummaryResponse;
import com.linecorp.bot.messaging.model.GroupUserProfileResponse;
import com.linecorp.bot.messaging.model.IssueLinkTokenResponse;
import com.linecorp.bot.messaging.model.MarkMessagesAsReadByTokenRequest;
import com.linecorp.bot.messaging.model.MarkMessagesAsReadRequest;
import com.linecorp.bot.messaging.model.MembersIdsResponse;
import com.linecorp.bot.messaging.model.MembershipListResponse;
Expand Down Expand Up @@ -630,6 +631,17 @@ CompletableFuture<Result<MessagingApiPagerCouponListResponse>> listCoupon(
CompletableFuture<Result<Void>> markMessagesAsRead(
@Body MarkMessagesAsReadRequest markMessagesAsReadRequest);

/**
* Mark messages from users as read by token
*
* @param markMessagesAsReadByTokenRequest (required)
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#mark-as-read">
* Documentation</a>
*/
@POST("/v2/bot/chat/markAsRead")
CompletableFuture<Result<Void>> markMessagesAsReadByToken(
@Body MarkMessagesAsReadByTokenRequest markMessagesAsReadByTokenRequest);

/**
* An API that efficiently sends the same message to multiple user IDs. You can&#39;t send
* messages to group chats or multi-person chats.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright 2023 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech Do not edit the class manually.
*/
package com.linecorp.bot.messaging.model;



import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* MarkMessagesAsReadByTokenRequest
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#mark-as-read-request-body">
* Documentation</a>
*/
@JsonInclude(Include.NON_NULL)
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
public record MarkMessagesAsReadByTokenRequest(
/** Token used to mark messages as read. */
@JsonProperty("markAsReadToken") String markAsReadToken) {

public static class Builder {
private String markAsReadToken;

public Builder(String markAsReadToken) {

this.markAsReadToken = markAsReadToken;
}

public MarkMessagesAsReadByTokenRequest build() {
return new MarkMessagesAsReadByTokenRequest(markAsReadToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ public record AudioMessageContent(
/** Get contentProvider */
@JsonProperty("contentProvider") ContentProvider contentProvider,
/** Length of audio file (milliseconds) */
@JsonProperty("duration") Long duration)
@JsonProperty("duration") Long duration,
/** Token used to mark the message as read. */
@JsonProperty("markAsReadToken") String markAsReadToken)
implements MessageContent {

public static class Builder {
private String id;
private ContentProvider contentProvider;
private Long duration;
private String markAsReadToken;

public Builder(String id, ContentProvider contentProvider) {

Expand All @@ -57,8 +60,13 @@ public Builder duration(Long duration) {
return this;
}

public Builder markAsReadToken(String markAsReadToken) {
this.markAsReadToken = markAsReadToken;
return this;
}

public AudioMessageContent build() {
return new AudioMessageContent(id, contentProvider, duration);
return new AudioMessageContent(id, contentProvider, duration, markAsReadToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ public record FileMessageContent(
/** File name */
@JsonProperty("fileName") String fileName,
/** File size in bytes */
@JsonProperty("fileSize") Integer fileSize)
@JsonProperty("fileSize") Integer fileSize,
/** Token used to mark the message as read. */
@JsonProperty("markAsReadToken") String markAsReadToken)
implements MessageContent {

public static class Builder {
private String id;
private String fileName;
private Integer fileSize;
private String markAsReadToken;

public Builder(String id, String fileName, Integer fileSize) {

Expand All @@ -54,8 +57,13 @@ public Builder(String id, String fileName, Integer fileSize) {
this.fileSize = fileSize;
}

public Builder markAsReadToken(String markAsReadToken) {
this.markAsReadToken = markAsReadToken;
return this;
}

public FileMessageContent build() {
return new FileMessageContent(id, fileName, fileSize);
return new FileMessageContent(id, fileName, fileSize, markAsReadToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ public record ImageMessageContent(
/** Get imageSet */
@JsonProperty("imageSet") ImageSet imageSet,
/** Quote token to quote this message. */
@JsonProperty("quoteToken") String quoteToken)
@JsonProperty("quoteToken") String quoteToken,
/** Token used to mark the message as read. */
@JsonProperty("markAsReadToken") String markAsReadToken)
implements MessageContent {

public static class Builder {
private String id;
private ContentProvider contentProvider;
private ImageSet imageSet;
private String quoteToken;
private String markAsReadToken;

public Builder(String id, ContentProvider contentProvider, String quoteToken) {

Expand All @@ -62,8 +65,13 @@ public Builder imageSet(ImageSet imageSet) {
return this;
}

public Builder markAsReadToken(String markAsReadToken) {
this.markAsReadToken = markAsReadToken;
return this;
}

public ImageMessageContent build() {
return new ImageMessageContent(id, contentProvider, imageSet, quoteToken);
return new ImageMessageContent(id, contentProvider, imageSet, quoteToken, markAsReadToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public record LocationMessageContent(
/** Latitude */
@JsonProperty("latitude") Double latitude,
/** Longitude */
@JsonProperty("longitude") Double longitude)
@JsonProperty("longitude") Double longitude,
/** Token used to mark the message as read. */
@JsonProperty("markAsReadToken") String markAsReadToken)
implements MessageContent {

public static class Builder {
Expand All @@ -50,6 +52,7 @@ public static class Builder {
private String address;
private Double latitude;
private Double longitude;
private String markAsReadToken;

public Builder(String id, Double latitude, Double longitude) {

Expand All @@ -70,8 +73,13 @@ public Builder address(String address) {
return this;
}

public Builder markAsReadToken(String markAsReadToken) {
this.markAsReadToken = markAsReadToken;
return this;
}

public LocationMessageContent build() {
return new LocationMessageContent(id, title, address, latitude, longitude);
return new LocationMessageContent(id, title, address, latitude, longitude, markAsReadToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ public record StickerMessageContent(
* Message ID of a quoted message. Only included when the received message quotes a past
* message.
*/
@JsonProperty("quotedMessageId") String quotedMessageId)
@JsonProperty("quotedMessageId") String quotedMessageId,
/** Token used to mark the message as read. */
@JsonProperty("markAsReadToken") String markAsReadToken)
implements MessageContent {
/** Gets or Sets stickerResourceType */
public enum StickerResourceType {
Expand Down Expand Up @@ -102,6 +104,7 @@ public static class Builder {
private String text;
private String quoteToken;
private String quotedMessageId;
private String markAsReadToken;

public Builder(
String id,
Expand Down Expand Up @@ -136,6 +139,11 @@ public Builder quotedMessageId(String quotedMessageId) {
return this;
}

public Builder markAsReadToken(String markAsReadToken) {
this.markAsReadToken = markAsReadToken;
return this;
}

public StickerMessageContent build() {
return new StickerMessageContent(
id,
Expand All @@ -145,7 +153,8 @@ public StickerMessageContent build() {
keywords,
text,
quoteToken,
quotedMessageId);
quotedMessageId,
markAsReadToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public record TextMessageContent(
* Message ID of a quoted message. Only included when the received message quotes a past
* message.
*/
@JsonProperty("quotedMessageId") String quotedMessageId)
@JsonProperty("quotedMessageId") String quotedMessageId,
/** Token used to mark the message as read. */
@JsonProperty("markAsReadToken") String markAsReadToken)
implements MessageContent {

public static class Builder {
Expand All @@ -60,6 +62,7 @@ public static class Builder {
private Mention mention;
private String quoteToken;
private String quotedMessageId;
private String markAsReadToken;

public Builder(String id, String text, String quoteToken) {

Expand All @@ -85,8 +88,14 @@ public Builder quotedMessageId(String quotedMessageId) {
return this;
}

public Builder markAsReadToken(String markAsReadToken) {
this.markAsReadToken = markAsReadToken;
return this;
}

public TextMessageContent build() {
return new TextMessageContent(id, text, emojis, mention, quoteToken, quotedMessageId);
return new TextMessageContent(
id, text, emojis, mention, quoteToken, quotedMessageId, markAsReadToken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ public record VideoMessageContent(
/** Get contentProvider */
@JsonProperty("contentProvider") ContentProvider contentProvider,
/** Quote token to quote this message. */
@JsonProperty("quoteToken") String quoteToken)
@JsonProperty("quoteToken") String quoteToken,
/** Token used to mark the message as read. */
@JsonProperty("markAsReadToken") String markAsReadToken)
implements MessageContent {

public static class Builder {
private String id;
private Long duration;
private ContentProvider contentProvider;
private String quoteToken;
private String markAsReadToken;

public Builder(String id, ContentProvider contentProvider, String quoteToken) {

Expand All @@ -62,8 +65,13 @@ public Builder duration(Long duration) {
return this;
}

public Builder markAsReadToken(String markAsReadToken) {
this.markAsReadToken = markAsReadToken;
return this;
}

public VideoMessageContent build() {
return new VideoMessageContent(id, duration, contentProvider, quoteToken);
return new VideoMessageContent(id, duration, contentProvider, quoteToken, markAsReadToken);
}
}
}
2 changes: 1 addition & 1 deletion line-openapi