Skip to content

Commit 7c9033b

Browse files
author
github-actions
committed
Code are generated by openapi generator
1 parent 30c396b commit 7c9033b

14 files changed

+214
-10
lines changed

linebot/liff/api_liff.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LIFF server API
33
* LIFF Server API.
44
*
5-
* The version of the OpenAPI document: 1.0
5+
* The version of the OpenAPI document: 1.0.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

linebot/liff/model_add_liff_app_request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LIFF server API
33
* LIFF Server API.
44
*
5-
* The version of the OpenAPI document: 1.0
5+
* The version of the OpenAPI document: 1.0.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

linebot/liff/model_add_liff_app_response.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LIFF server API
33
* LIFF Server API.
44
*
5-
* The version of the OpenAPI document: 1.0
5+
* The version of the OpenAPI document: 1.0.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

linebot/liff/model_get_all_liff_apps_response.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LIFF server API
33
* LIFF Server API.
44
*
5-
* The version of the OpenAPI document: 1.0
5+
* The version of the OpenAPI document: 1.0.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

linebot/liff/model_liff_app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LIFF server API
33
* LIFF Server API.
44
*
5-
* The version of the OpenAPI document: 1.0
5+
* The version of the OpenAPI document: 1.0.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

linebot/liff/model_liff_bot_prompt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LIFF server API
33
* LIFF Server API.
44
*
5-
* The version of the OpenAPI document: 1.0
5+
* The version of the OpenAPI document: 1.0.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

linebot/liff/model_liff_features.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LIFF server API
33
* LIFF Server API.
44
*
5-
* The version of the OpenAPI document: 1.0
5+
* The version of the OpenAPI document: 1.0.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

linebot/liff/model_liff_scope.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LIFF server API
33
* LIFF Server API.
44
*
5-
* The version of the OpenAPI document: 1.0
5+
* The version of the OpenAPI document: 1.0.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

linebot/liff/model_liff_view.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LIFF server API
33
* LIFF Server API.
44
*
5-
* The version of the OpenAPI document: 1.0
5+
* The version of the OpenAPI document: 1.0.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

linebot/liff/model_update_liff_app_request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LIFF server API
33
* LIFF Server API.
44
*
5-
* The version of the OpenAPI document: 1.0
5+
* The version of the OpenAPI document: 1.0.0
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

linebot/webhook/.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ model_message_content.go
3737
model_message_event.go
3838
model_module_content.go
3939
model_module_event.go
40+
model_pnp_delivery.go
41+
model_pnp_delivery_completion_event.go
4042
model_postback_content.go
4143
model_postback_event.go
4244
model_room_source.go

linebot/webhook/model_event.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ func setDiscriminatorPropertyEvent(r EventInterface) EventInterface {
104104
v.Type = "deactivated"
105105
}
106106
return v
107+
case *PnpDeliveryCompletionEvent:
108+
if v.Type == "" {
109+
v.Type = "delivery"
110+
}
111+
return v
112+
case PnpDeliveryCompletionEvent:
113+
if v.Type == "" {
114+
v.Type = "delivery"
115+
}
116+
return v
107117
case *FollowEvent:
108118
if v.Type == "" {
109119
v.Type = "follow"
@@ -301,6 +311,12 @@ func UnmarshalEvent(data []byte) (EventInterface, error) {
301311
return nil, fmt.Errorf("UnmarshalEvent: Cannot read deactivated: %w", err)
302312
}
303313
return deactivated, nil
314+
case "delivery":
315+
var delivery PnpDeliveryCompletionEvent
316+
if err := json.Unmarshal(data, &delivery); err != nil {
317+
return nil, fmt.Errorf("UnmarshalEvent: Cannot read delivery: %w", err)
318+
}
319+
return delivery, nil
304320
case "follow":
305321
var follow FollowEvent
306322
if err := json.Unmarshal(data, &follow); err != nil {

linebot/webhook/model_pnp_delivery.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Webhook Type Definition
3+
* Webhook event definition of the LINE Messaging API
4+
*
5+
* The version of the OpenAPI document: 1.0.0
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
/**
14+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
15+
* https://openapi-generator.tech
16+
* Do not edit the class manually.
17+
*/
18+
19+
//go:generate python3 ../../generate-code.py
20+
package webhook
21+
22+
// PnpDelivery
23+
// A delivery object containing a hashed phone number string or a string specified by `X-Line-Delivery-Tag` header
24+
25+
type PnpDelivery struct {
26+
27+
/**
28+
* A hashed phone number string or a string specified by `X-Line-Delivery-Tag` header (Required)
29+
*/
30+
Data string `json:"data"`
31+
}
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
/**
2+
* Webhook Type Definition
3+
* Webhook event definition of the LINE Messaging API
4+
*
5+
* The version of the OpenAPI document: 1.0.0
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
/**
14+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
15+
* https://openapi-generator.tech
16+
* Do not edit the class manually.
17+
*/
18+
19+
//go:generate python3 ../../generate-code.py
20+
package webhook
21+
22+
import (
23+
"encoding/json"
24+
"fmt"
25+
)
26+
27+
// PnpDeliveryCompletionEvent
28+
// When a request is made to the LINE notification messages API and delivery of the LINE notification message to the user is completed, a dedicated webhook event (delivery completion event) is sent from the LINE Platform to the webhook URL of the bot server.
29+
30+
type PnpDeliveryCompletionEvent struct {
31+
Event
32+
33+
/**
34+
* Get Source
35+
*/
36+
Source SourceInterface `json:"source,omitempty"`
37+
38+
/**
39+
* Time of the event in milliseconds. (Required)
40+
*/
41+
Timestamp int64 `json:"timestamp"`
42+
43+
/**
44+
* Get Mode
45+
*/
46+
Mode EventMode `json:"mode"`
47+
48+
/**
49+
* Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format. (Required)
50+
*/
51+
WebhookEventId string `json:"webhookEventId"`
52+
53+
/**
54+
* Get DeliveryContext
55+
*/
56+
DeliveryContext *DeliveryContext `json:"deliveryContext"`
57+
58+
/**
59+
* Get Delivery
60+
*/
61+
Delivery *PnpDelivery `json:"delivery"`
62+
}
63+
64+
func (cr *PnpDeliveryCompletionEvent) UnmarshalJSON(data []byte) error {
65+
var raw map[string]json.RawMessage
66+
err := json.Unmarshal(data, &raw)
67+
if err != nil {
68+
return fmt.Errorf("JSON parse error in map: %w", err)
69+
}
70+
71+
if raw["type"] != nil {
72+
73+
err = json.Unmarshal(raw["type"], &cr.Type)
74+
if err != nil {
75+
return fmt.Errorf("JSON parse error in string(Type): %w", err)
76+
}
77+
78+
}
79+
80+
if raw["source"] != nil {
81+
82+
if rawsource, ok := raw["source"]; ok && rawsource != nil {
83+
Source, err := UnmarshalSource(rawsource)
84+
if err != nil {
85+
return fmt.Errorf("JSON parse error in Source(discriminator): %w", err)
86+
}
87+
cr.Source = Source
88+
}
89+
90+
}
91+
92+
if raw["timestamp"] != nil {
93+
94+
err = json.Unmarshal(raw["timestamp"], &cr.Timestamp)
95+
if err != nil {
96+
return fmt.Errorf("JSON parse error in int64(Timestamp): %w", err)
97+
}
98+
99+
}
100+
101+
if raw["mode"] != nil {
102+
103+
err = json.Unmarshal(raw["mode"], &cr.Mode)
104+
if err != nil {
105+
return fmt.Errorf("JSON parse error in EventMode(Mode): %w", err)
106+
}
107+
108+
}
109+
110+
if raw["webhookEventId"] != nil {
111+
112+
err = json.Unmarshal(raw["webhookEventId"], &cr.WebhookEventId)
113+
if err != nil {
114+
return fmt.Errorf("JSON parse error in string(WebhookEventId): %w", err)
115+
}
116+
117+
}
118+
119+
if raw["deliveryContext"] != nil {
120+
121+
err = json.Unmarshal(raw["deliveryContext"], &cr.DeliveryContext)
122+
if err != nil {
123+
return fmt.Errorf("JSON parse error in DeliveryContext(DeliveryContext): %w", err)
124+
}
125+
126+
}
127+
128+
if raw["delivery"] != nil {
129+
130+
err = json.Unmarshal(raw["delivery"], &cr.Delivery)
131+
if err != nil {
132+
return fmt.Errorf("JSON parse error in PnpDelivery(Delivery): %w", err)
133+
}
134+
135+
}
136+
137+
return nil
138+
}
139+
140+
// MarshalJSON customizes the JSON serialization of the PnpDeliveryCompletionEvent struct.
141+
func (r *PnpDeliveryCompletionEvent) MarshalJSON() ([]byte, error) {
142+
143+
r.Source = setDiscriminatorPropertySource(r.Source)
144+
145+
type Alias PnpDeliveryCompletionEvent
146+
return json.Marshal(&struct {
147+
*Alias
148+
149+
Type string `json:"type"`
150+
}{
151+
Alias: (*Alias)(r),
152+
153+
Type: "delivery",
154+
})
155+
}

0 commit comments

Comments
 (0)