From 1e51f583d07024bea603fa50cf247c4d148704ac Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 29 Sep 2026 04:15:10 +0000 Subject: [PATCH] Code are generated by openapi generator --- .../.openapi-generator/FILES | 5 ++ .../messaging/client/MessagingApiClient.java | 29 +++++++ .../messaging/model/PnpMessagesRequest.java | 12 ++- .../messaging/model/PnpTemplatedButton.java | 62 +++++++++++++ .../model/PnpTemplatedEmphasizedItem.java | 62 +++++++++++++ .../bot/messaging/model/PnpTemplatedItem.java | 62 +++++++++++++ .../model/PnpTemplatedMessageBody.java | 77 +++++++++++++++++ .../model/PnpTemplatedMessageRequest.java | 86 +++++++++++++++++++ line-openapi | 2 +- 9 files changed, 394 insertions(+), 3 deletions(-) create mode 100644 clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedButton.java create mode 100644 clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedEmphasizedItem.java create mode 100644 clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedItem.java create mode 100644 clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedMessageBody.java create mode 100644 clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedMessageRequest.java diff --git a/clients/line-bot-messaging-api-client/.openapi-generator/FILES b/clients/line-bot-messaging-api-client/.openapi-generator/FILES index fa84d3546..7e573e919 100644 --- a/clients/line-bot-messaging-api-client/.openapi-generator/FILES +++ b/clients/line-bot-messaging-api-client/.openapi-generator/FILES @@ -139,6 +139,11 @@ src/main/java/com/linecorp/bot/messaging/model/NumberOfMessagesResponse.java src/main/java/com/linecorp/bot/messaging/model/OperatorDemographicFilter.java src/main/java/com/linecorp/bot/messaging/model/OperatorRecipient.java src/main/java/com/linecorp/bot/messaging/model/PnpMessagesRequest.java +src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedButton.java +src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedEmphasizedItem.java +src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedItem.java +src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedMessageBody.java +src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedMessageRequest.java src/main/java/com/linecorp/bot/messaging/model/PostbackAction.java src/main/java/com/linecorp/bot/messaging/model/PushMessageRequest.java src/main/java/com/linecorp/bot/messaging/model/PushMessageResponse.java diff --git a/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/client/MessagingApiClient.java b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/client/MessagingApiClient.java index b1f581ffe..ad3fcd821 100644 --- a/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/client/MessagingApiClient.java +++ b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/client/MessagingApiClient.java @@ -50,6 +50,7 @@ import com.linecorp.bot.messaging.model.NarrowcastRequest; import com.linecorp.bot.messaging.model.NumberOfMessagesResponse; import com.linecorp.bot.messaging.model.PnpMessagesRequest; +import com.linecorp.bot.messaging.model.PnpTemplatedMessageRequest; import com.linecorp.bot.messaging.model.PushMessageRequest; import com.linecorp.bot.messaging.model.PushMessageResponse; import com.linecorp.bot.messaging.model.QuotaConsumptionResponse; @@ -425,6 +426,19 @@ CompletableFuture> getNumberOfSentReplyMessages CompletableFuture> getPNPMessageStatistics( @Query("date") String date); + /** + * Get number of sent LINE notification messages (template) + * + * @param date Date the message was sent Format: `yyyyMMdd` + * (Example:`20211231`) Time zone: UTC+9 (required) + * @see + * Documentation + */ + @GET("/v2/bot/message/delivery/pnp/templated") + CompletableFuture> getPNPTemplatedMessageStatistics( + @Query("date") String date); + /** * Get profile * @@ -700,6 +714,21 @@ CompletableFuture> pushMessagesByPhone( @Header("X-Line-Delivery-Tag") String xLineDeliveryTag, @Body PnpMessagesRequest pnpMessagesRequest); + /** + * Send LINE notification message (template) + * + * @param xLineDeliveryTag String returned in the delivery.data property of the delivery + * completion event via Webhook. (optional) + * @param pnpTemplatedMessageRequest (required) + * @see + * Documentation + */ + @POST("/v2/bot/message/pnp/templated/push") + CompletableFuture> pushTemplatedMessagesByPhone( + @Header("X-Line-Delivery-Tag") String xLineDeliveryTag, + @Body PnpTemplatedMessageRequest pnpTemplatedMessageRequest); + /** * Send reply message * diff --git a/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpMessagesRequest.java b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpMessagesRequest.java index d2b2cf7b5..2d2d6d6d3 100644 --- a/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpMessagesRequest.java +++ b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpMessagesRequest.java @@ -50,12 +50,15 @@ public record PnpMessagesRequest( * they have disabled push notifications in LINE and/or their device). The default value is * false. */ - @JsonProperty("notificationDisabled") Boolean notificationDisabled) { + @JsonProperty("notificationDisabled") Boolean notificationDisabled, + /** Name of aggregation unit. Case-sensitive. */ + @JsonProperty("customAggregationUnits") List customAggregationUnits) { public static class Builder { private List messages; private String to; private Boolean notificationDisabled; + private List customAggregationUnits; public Builder(List messages, String to) { @@ -69,8 +72,13 @@ public Builder notificationDisabled(Boolean notificationDisabled) { return this; } + public Builder customAggregationUnits(List customAggregationUnits) { + this.customAggregationUnits = customAggregationUnits; + return this; + } + public PnpMessagesRequest build() { - return new PnpMessagesRequest(messages, to, notificationDisabled); + return new PnpMessagesRequest(messages, to, notificationDisabled, customAggregationUnits); } } } diff --git a/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedButton.java b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedButton.java new file mode 100644 index 000000000..6641c15bf --- /dev/null +++ b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedButton.java @@ -0,0 +1,62 @@ +/* + * 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; + +/** + * PnpTemplatedButton + * + * @see + * Documentation + */ +@JsonInclude(Include.NON_NULL) +@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator") +public record PnpTemplatedButton( + /** + * Specify the key of the button you want to include. For available keys, see + * https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#buttons + */ + @JsonProperty("buttonKey") String buttonKey, + /** URL of the page to be opened when the user presses the button. */ + @JsonProperty("url") String url) { + + public static class Builder { + private String buttonKey; + private String url; + + public Builder(String buttonKey, String url) { + + this.buttonKey = buttonKey; + + this.url = url; + } + + public PnpTemplatedButton build() { + return new PnpTemplatedButton(buttonKey, url); + } + } +} diff --git a/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedEmphasizedItem.java b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedEmphasizedItem.java new file mode 100644 index 000000000..2ec36d701 --- /dev/null +++ b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedEmphasizedItem.java @@ -0,0 +1,62 @@ +/* + * 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; + +/** + * Item to emphasize in the message. + * + * @see + * Documentation + */ +@JsonInclude(Include.NON_NULL) +@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator") +public record PnpTemplatedEmphasizedItem( + /** + * Specify the key of the item you want to include. For available keys, see + * https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#items + */ + @JsonProperty("itemKey") String itemKey, + /** String to be displayed as the value of the item. */ + @JsonProperty("content") String content) { + + public static class Builder { + private String itemKey; + private String content; + + public Builder(String itemKey, String content) { + + this.itemKey = itemKey; + + this.content = content; + } + + public PnpTemplatedEmphasizedItem build() { + return new PnpTemplatedEmphasizedItem(itemKey, content); + } + } +} diff --git a/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedItem.java b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedItem.java new file mode 100644 index 000000000..b25512a2a --- /dev/null +++ b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedItem.java @@ -0,0 +1,62 @@ +/* + * 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; + +/** + * PnpTemplatedItem + * + * @see + * Documentation + */ +@JsonInclude(Include.NON_NULL) +@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator") +public record PnpTemplatedItem( + /** + * Specify the key of the item you want to include. For available keys, see + * https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#items + */ + @JsonProperty("itemKey") String itemKey, + /** String to be displayed as the value of the item. */ + @JsonProperty("content") String content) { + + public static class Builder { + private String itemKey; + private String content; + + public Builder(String itemKey, String content) { + + this.itemKey = itemKey; + + this.content = content; + } + + public PnpTemplatedItem build() { + return new PnpTemplatedItem(itemKey, content); + } + } +} diff --git a/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedMessageBody.java b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedMessageBody.java new file mode 100644 index 000000000..239251cc2 --- /dev/null +++ b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedMessageBody.java @@ -0,0 +1,77 @@ +/* + * 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; +import java.util.List; + +/** + * The body object of the template you want to send. You can't specify the same item more than + * once in a single message. + * + * @see + * Documentation + */ +@JsonInclude(Include.NON_NULL) +@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator") +public record PnpTemplatedMessageBody( + /** Get emphasizedItem */ + @JsonProperty("emphasizedItem") PnpTemplatedEmphasizedItem emphasizedItem, + /** + * Array of items to include in the message. The `itemKey` must be unique across + * `emphasizedItem` and `items`. + */ + @JsonProperty("items") List items, + /** Array of buttons to include in the message. The `buttonKey` must be unique. */ + @JsonProperty("buttons") List buttons) { + + public static class Builder { + private PnpTemplatedEmphasizedItem emphasizedItem; + private List items; + private List buttons; + + public Builder() {} + + public Builder emphasizedItem(PnpTemplatedEmphasizedItem emphasizedItem) { + this.emphasizedItem = emphasizedItem; + return this; + } + + public Builder items(List items) { + this.items = items; + return this; + } + + public Builder buttons(List buttons) { + this.buttons = buttons; + return this; + } + + public PnpTemplatedMessageBody build() { + return new PnpTemplatedMessageBody(emphasizedItem, items, buttons); + } + } +} diff --git a/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedMessageRequest.java b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedMessageRequest.java new file mode 100644 index 000000000..1ad7e83d1 --- /dev/null +++ b/clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/PnpTemplatedMessageRequest.java @@ -0,0 +1,86 @@ +/* + * 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; +import java.util.List; + +/** + * PnpTemplatedMessageRequest + * + * @see + * Documentation + */ +@JsonInclude(Include.NON_NULL) +@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator") +public record PnpTemplatedMessageRequest( + /** + * Message destination. Specify a phone number that has been normalized to E.164 format and + * hashed with SHA256. + */ + @JsonProperty("to") String to, + /** + * Specify the key of the template you want to send. For available keys, see + * https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#templates + */ + @JsonProperty("templateKey") String templateKey, + /** Get body */ + @JsonProperty("body") PnpTemplatedMessageBody body, + /** + * Name of aggregation unit. Case-sensitive. For more information about assigning a unit name, + * see + * https://developers.line.biz/en/docs/messaging-api/unit-based-statistics-aggregation/#assign-names-to-units-when-sending-messages + */ + @JsonProperty("customAggregationUnits") List customAggregationUnits) { + + public static class Builder { + private String to; + private String templateKey; + private PnpTemplatedMessageBody body; + private List customAggregationUnits; + + public Builder(String to, String templateKey) { + + this.to = to; + + this.templateKey = templateKey; + } + + public Builder body(PnpTemplatedMessageBody body) { + this.body = body; + return this; + } + + public Builder customAggregationUnits(List customAggregationUnits) { + this.customAggregationUnits = customAggregationUnits; + return this; + } + + public PnpTemplatedMessageRequest build() { + return new PnpTemplatedMessageRequest(to, templateKey, body, customAggregationUnits); + } + } +} diff --git a/line-openapi b/line-openapi index de8bd9e28..fa5577c9e 160000 --- a/line-openapi +++ b/line-openapi @@ -1 +1 @@ -Subproject commit de8bd9e2872ed9d9800e23b86136695fcd370a0c +Subproject commit fa5577c9ea874d2dbd8fadc85a4cb3a1b29d8cbe