Skip to content

Commit 466ab86

Browse files
github-actions[bot]github-actionshabara-k
authored
Codes are generated by openapi generator (#572)
Co-authored-by: github-actions <[email protected]> Co-authored-by: keigo habara <[email protected]>
1 parent 52140cd commit 466ab86

24 files changed

+190
-22
lines changed

linebot/v3/liff/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
LIFF Server API. # noqa: E501
99
10-
The version of the OpenAPI document: 1.0
10+
The version of the OpenAPI document: 1.0.0
1111
Generated by OpenAPI Generator (https://openapi-generator.tech)
1212
1313
Do not edit the class manually.

linebot/v3/liff/api/async_liff.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/api/liff.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/api_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/async_api_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/async_rest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/configuration.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.
@@ -372,7 +372,7 @@ def to_debug_report(self):
372372
return "Python SDK Debug Report:\n"\
373373
"OS: {env}\n"\
374374
"Python Version: {pyversion}\n"\
375-
"Version of the API: 1.0\n"\
375+
"Version of the API: 1.0.0\n"\
376376
"SDK Package Version: {__version__}".\
377377
format(env=sys.platform, pyversion=sys.version, package_version=__version__)
378378

linebot/v3/liff/exceptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/models/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
LIFF Server API. # noqa: E501
88
9-
The version of the OpenAPI document: 1.0
9+
The version of the OpenAPI document: 1.0.0
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
1212
Do not edit the class manually.

linebot/v3/liff/models/add_liff_app_request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/models/add_liff_app_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/models/get_all_liff_apps_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/models/liff_app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/models/liff_bot_prompt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/models/liff_features.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/models/liff_scope.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/models/liff_view.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/models/update_liff_app_request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/liff/rest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
LIFF Server API. # noqa: E501
77
8-
The version of the OpenAPI document: 1.0
8+
The version of the OpenAPI document: 1.0.0
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.

linebot/v3/webhooks/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
from linebot.v3.webhooks.models.message_event import MessageEvent
7373
from linebot.v3.webhooks.models.module_content import ModuleContent
7474
from linebot.v3.webhooks.models.module_event import ModuleEvent
75+
from linebot.v3.webhooks.models.pnp_delivery import PnpDelivery
76+
from linebot.v3.webhooks.models.pnp_delivery_completion_event import PnpDeliveryCompletionEvent
7577
from linebot.v3.webhooks.models.postback_content import PostbackContent
7678
from linebot.v3.webhooks.models.postback_event import PostbackEvent
7779
from linebot.v3.webhooks.models.room_source import RoomSource

linebot/v3/webhooks/models/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
from linebot.v3.webhooks.models.message_event import MessageEvent
5454
from linebot.v3.webhooks.models.module_content import ModuleContent
5555
from linebot.v3.webhooks.models.module_event import ModuleEvent
56+
from linebot.v3.webhooks.models.pnp_delivery import PnpDelivery
57+
from linebot.v3.webhooks.models.pnp_delivery_completion_event import PnpDeliveryCompletionEvent
5658
from linebot.v3.webhooks.models.postback_content import PostbackContent
5759
from linebot.v3.webhooks.models.postback_event import PostbackEvent
5860
from linebot.v3.webhooks.models.room_source import RoomSource

linebot/v3/webhooks/models/event.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class Config:
5454
'botResumed': 'BotResumedEvent',
5555
'botSuspended': 'BotSuspendedEvent',
5656
'deactivated': 'DeactivatedEvent',
57+
'delivery': 'PnpDeliveryCompletionEvent',
5758
'follow': 'FollowEvent',
5859
'join': 'JoinEvent',
5960
'leave': 'LeaveEvent',
@@ -86,7 +87,7 @@ def to_json(self) -> str:
8687
return json.dumps(self.to_dict())
8788

8889
@classmethod
89-
def from_json(cls, json_str: str) -> Union(AccountLinkEvent, ActivatedEvent, BeaconEvent, BotResumedEvent, BotSuspendedEvent, DeactivatedEvent, FollowEvent, JoinEvent, LeaveEvent, MemberJoinedEvent, MemberLeftEvent, MessageEvent, ModuleEvent, PostbackEvent, ThingsEvent, UnfollowEvent, UnsendEvent, VideoPlayCompleteEvent):
90+
def from_json(cls, json_str: str) -> Union(AccountLinkEvent, ActivatedEvent, BeaconEvent, BotResumedEvent, BotSuspendedEvent, DeactivatedEvent, FollowEvent, JoinEvent, LeaveEvent, MemberJoinedEvent, MemberLeftEvent, MessageEvent, ModuleEvent, PnpDeliveryCompletionEvent, PostbackEvent, ThingsEvent, UnfollowEvent, UnsendEvent, VideoPlayCompleteEvent):
9091
"""Create an instance of Event from a JSON string"""
9192
return cls.from_dict(json.loads(json_str))
9293

@@ -105,7 +106,7 @@ def to_dict(self):
105106
return _dict
106107

107108
@classmethod
108-
def from_dict(cls, obj: dict) -> Union(AccountLinkEvent, ActivatedEvent, BeaconEvent, BotResumedEvent, BotSuspendedEvent, DeactivatedEvent, FollowEvent, JoinEvent, LeaveEvent, MemberJoinedEvent, MemberLeftEvent, MessageEvent, ModuleEvent, PostbackEvent, ThingsEvent, UnfollowEvent, UnsendEvent, VideoPlayCompleteEvent):
109+
def from_dict(cls, obj: dict) -> Union(AccountLinkEvent, ActivatedEvent, BeaconEvent, BotResumedEvent, BotSuspendedEvent, DeactivatedEvent, FollowEvent, JoinEvent, LeaveEvent, MemberJoinedEvent, MemberLeftEvent, MessageEvent, ModuleEvent, PnpDeliveryCompletionEvent, PostbackEvent, ThingsEvent, UnfollowEvent, UnsendEvent, VideoPlayCompleteEvent):
109110
"""Create an instance of Event from a dict"""
110111
# look up the object type based on discriminator mapping
111112
object_type = cls.get_discriminator_value(obj)
+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# coding: utf-8
2+
3+
"""
4+
Webhook Type Definition
5+
6+
Webhook event definition of the LINE Messaging API # noqa: E501
7+
8+
The version of the OpenAPI document: 1.0.0
9+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
11+
Do not edit the class manually.
12+
"""
13+
14+
15+
from __future__ import annotations
16+
import pprint
17+
import re # noqa: F401
18+
import json
19+
20+
21+
22+
from pydantic.v1 import BaseModel, Field, StrictStr
23+
24+
class PnpDelivery(BaseModel):
25+
"""
26+
A delivery object containing a hashed phone number string or a string specified by `X-Line-Delivery-Tag` header
27+
"""
28+
data: StrictStr = Field(..., description="A hashed phone number string or a string specified by `X-Line-Delivery-Tag` header")
29+
30+
__properties = ["data"]
31+
32+
class Config:
33+
"""Pydantic configuration"""
34+
allow_population_by_field_name = True
35+
validate_assignment = True
36+
37+
def to_str(self) -> str:
38+
"""Returns the string representation of the model using alias"""
39+
return pprint.pformat(self.dict(by_alias=True))
40+
41+
def to_json(self) -> str:
42+
"""Returns the JSON representation of the model using alias"""
43+
return json.dumps(self.to_dict())
44+
45+
@classmethod
46+
def from_json(cls, json_str: str) -> PnpDelivery:
47+
"""Create an instance of PnpDelivery from a JSON string"""
48+
return cls.from_dict(json.loads(json_str))
49+
50+
def to_dict(self):
51+
"""Returns the dictionary representation of the model using alias"""
52+
_dict = self.dict(by_alias=True,
53+
exclude={
54+
},
55+
exclude_none=True)
56+
return _dict
57+
58+
@classmethod
59+
def from_dict(cls, obj: dict) -> PnpDelivery:
60+
"""Create an instance of PnpDelivery from a dict"""
61+
if obj is None:
62+
return None
63+
64+
if not isinstance(obj, dict):
65+
return PnpDelivery.parse_obj(obj)
66+
67+
_obj = PnpDelivery.parse_obj({
68+
"data": obj.get("data")
69+
})
70+
return _obj
71+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# coding: utf-8
2+
3+
"""
4+
Webhook Type Definition
5+
6+
Webhook event definition of the LINE Messaging API # noqa: E501
7+
8+
The version of the OpenAPI document: 1.0.0
9+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
11+
Do not edit the class manually.
12+
"""
13+
14+
15+
from __future__ import annotations
16+
import pprint
17+
import re # noqa: F401
18+
import json
19+
20+
21+
22+
from pydantic.v1 import Field
23+
from linebot.v3.webhooks.models.delivery_context import DeliveryContext
24+
from linebot.v3.webhooks.models.event import Event
25+
from linebot.v3.webhooks.models.event_mode import EventMode
26+
from linebot.v3.webhooks.models.pnp_delivery import PnpDelivery
27+
from linebot.v3.webhooks.models.source import Source
28+
29+
class PnpDeliveryCompletionEvent(Event):
30+
"""
31+
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.
32+
"""
33+
delivery: PnpDelivery = Field(...)
34+
type: str = "delivery"
35+
36+
__properties = ["type", "source", "timestamp", "mode", "webhookEventId", "deliveryContext", "delivery"]
37+
38+
class Config:
39+
"""Pydantic configuration"""
40+
allow_population_by_field_name = True
41+
validate_assignment = True
42+
43+
def to_str(self) -> str:
44+
"""Returns the string representation of the model using alias"""
45+
return pprint.pformat(self.dict(by_alias=True))
46+
47+
def to_json(self) -> str:
48+
"""Returns the JSON representation of the model using alias"""
49+
return json.dumps(self.to_dict())
50+
51+
@classmethod
52+
def from_json(cls, json_str: str) -> PnpDeliveryCompletionEvent:
53+
"""Create an instance of PnpDeliveryCompletionEvent from a JSON string"""
54+
return cls.from_dict(json.loads(json_str))
55+
56+
def to_dict(self):
57+
"""Returns the dictionary representation of the model using alias"""
58+
_dict = self.dict(by_alias=True,
59+
exclude={
60+
},
61+
exclude_none=True)
62+
# override the default output from pydantic.v1 by calling `to_dict()` of source
63+
if self.source:
64+
_dict['source'] = self.source.to_dict()
65+
# override the default output from pydantic.v1 by calling `to_dict()` of delivery_context
66+
if self.delivery_context:
67+
_dict['deliveryContext'] = self.delivery_context.to_dict()
68+
# override the default output from pydantic.v1 by calling `to_dict()` of delivery
69+
if self.delivery:
70+
_dict['delivery'] = self.delivery.to_dict()
71+
return _dict
72+
73+
@classmethod
74+
def from_dict(cls, obj: dict) -> PnpDeliveryCompletionEvent:
75+
"""Create an instance of PnpDeliveryCompletionEvent from a dict"""
76+
if obj is None:
77+
return None
78+
79+
if not isinstance(obj, dict):
80+
return PnpDeliveryCompletionEvent.parse_obj(obj)
81+
82+
_obj = PnpDeliveryCompletionEvent.parse_obj({
83+
"type": obj.get("type"),
84+
"source": Source.from_dict(obj.get("source")) if obj.get("source") is not None else None,
85+
"timestamp": obj.get("timestamp"),
86+
"mode": obj.get("mode"),
87+
"webhook_event_id": obj.get("webhookEventId"),
88+
"delivery_context": DeliveryContext.from_dict(obj.get("deliveryContext")) if obj.get("deliveryContext") is not None else None,
89+
"delivery": PnpDelivery.from_dict(obj.get("delivery")) if obj.get("delivery") is not None else None
90+
})
91+
return _obj
92+

0 commit comments

Comments
 (0)