Skip to content

Commit 260c049

Browse files
github-actions[bot]github-actions
andauthored
Codes are generated by openapi generator (#1234)
In the Messaging API, we've added the [clipboard action](https://developers.line.biz/en/reference/messaging-api/#clipboard-action) for users to copy text to the clipboard. This new feature allows users to more easily copy coupon codes and other text. news: https://developers.line.biz/en/news/2024/02/05/messaging-api-updated/ Note only the latest app(version >= `14.0.0`) supports this feature. Please update your LINE app to try this feature. Co-authored-by: github-actions <[email protected]>
1 parent ea6cac4 commit 260c049

File tree

5 files changed

+138
-0
lines changed

5 files changed

+138
-0
lines changed

clients/line-bot-messaging-api-client/.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ src/main/java/com/linecorp/bot/messaging/model/CameraRollAction.java
1919
src/main/java/com/linecorp/bot/messaging/model/CarouselColumn.java
2020
src/main/java/com/linecorp/bot/messaging/model/CarouselTemplate.java
2121
src/main/java/com/linecorp/bot/messaging/model/ChatReference.java
22+
src/main/java/com/linecorp/bot/messaging/model/ClipboardAction.java
23+
src/main/java/com/linecorp/bot/messaging/model/ClipboardImagemapAction.java
2224
src/main/java/com/linecorp/bot/messaging/model/ConfirmTemplate.java
2325
src/main/java/com/linecorp/bot/messaging/model/CreateRichMenuAliasRequest.java
2426
src/main/java/com/linecorp/bot/messaging/model/DatetimePickerAction.java

clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/Action.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
@JsonSubTypes({
3030
@JsonSubTypes.Type(value = CameraAction.class, name = "camera"),
3131
@JsonSubTypes.Type(value = CameraRollAction.class, name = "cameraRoll"),
32+
@JsonSubTypes.Type(value = ClipboardAction.class, name = "clipboard"),
3233
@JsonSubTypes.Type(value = DatetimePickerAction.class, name = "datetimepicker"),
3334
@JsonSubTypes.Type(value = LocationAction.class, name = "location"),
3435
@JsonSubTypes.Type(value = MessageAction.class, name = "message"),
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* Copyright 2023 LINE Corporation
3+
*
4+
* LINE Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
/**
18+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19+
* https://openapi-generator.tech Do not edit the class manually.
20+
*/
21+
package com.linecorp.bot.messaging.model;
22+
23+
24+
25+
import com.fasterxml.jackson.annotation.JsonInclude;
26+
import com.fasterxml.jackson.annotation.JsonInclude.Include;
27+
import com.fasterxml.jackson.annotation.JsonProperty;
28+
import com.fasterxml.jackson.annotation.JsonTypeName;
29+
30+
/**
31+
* ClipboardAction
32+
*
33+
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#clipboard-action">
34+
* Documentation</a>
35+
*/
36+
@JsonTypeName("clipboard")
37+
@JsonInclude(Include.NON_NULL)
38+
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
39+
public record ClipboardAction(
40+
/** Label for the action. */
41+
@JsonProperty("label") String label,
42+
/** Text that is copied to the clipboard. Max character limit: 1000 */
43+
@JsonProperty("clipboardText") String clipboardText)
44+
implements Action {
45+
46+
public static class Builder {
47+
private String label;
48+
private String clipboardText;
49+
50+
public Builder(String clipboardText) {
51+
52+
this.clipboardText = clipboardText;
53+
}
54+
55+
public Builder label(String label) {
56+
this.label = label;
57+
return this;
58+
}
59+
60+
public ClipboardAction build() {
61+
return new ClipboardAction(label, clipboardText);
62+
}
63+
}
64+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
* Copyright 2023 LINE Corporation
3+
*
4+
* LINE Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
/**
18+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19+
* https://openapi-generator.tech Do not edit the class manually.
20+
*/
21+
package com.linecorp.bot.messaging.model;
22+
23+
24+
25+
import com.fasterxml.jackson.annotation.JsonInclude;
26+
import com.fasterxml.jackson.annotation.JsonInclude.Include;
27+
import com.fasterxml.jackson.annotation.JsonProperty;
28+
import com.fasterxml.jackson.annotation.JsonTypeName;
29+
30+
/**
31+
* ClipboardImagemapAction
32+
*
33+
* @see <a
34+
* href="https://developers.line.biz/en/reference/messaging-api/#imagemap-clipboard-action-object">
35+
* Documentation</a>
36+
*/
37+
@JsonTypeName("clipboard")
38+
@JsonInclude(Include.NON_NULL)
39+
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
40+
public record ClipboardImagemapAction(
41+
/** Get area */
42+
@JsonProperty("area") ImagemapArea area,
43+
/** Text that is copied to the clipboard. Max character limit: 1000 */
44+
@JsonProperty("clipboardText") String clipboardText,
45+
/** Get label */
46+
@JsonProperty("label") String label)
47+
implements ImagemapAction {
48+
49+
public static class Builder {
50+
private ImagemapArea area;
51+
private String clipboardText;
52+
private String label;
53+
54+
public Builder(ImagemapArea area, String clipboardText) {
55+
56+
this.area = area;
57+
58+
this.clipboardText = clipboardText;
59+
}
60+
61+
public Builder label(String label) {
62+
this.label = label;
63+
return this;
64+
}
65+
66+
public ClipboardImagemapAction build() {
67+
return new ClipboardImagemapAction(area, clipboardText, label);
68+
}
69+
}
70+
}

clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/ImagemapAction.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
/** ImagemapAction */
2929
@JsonSubTypes({
30+
@JsonSubTypes.Type(value = ClipboardImagemapAction.class, name = "clipboard"),
3031
@JsonSubTypes.Type(value = MessageImagemapAction.class, name = "message"),
3132
@JsonSubTypes.Type(value = URIImagemapAction.class, name = "uri"),
3233
})

0 commit comments

Comments
 (0)