-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Codes are generated by openapi generator (#696)
Co-authored-by: github-actions <[email protected]> Co-authored-by: keigo habara <[email protected]>
- Loading branch information
1 parent
88ff3c3
commit 627ee37
Showing
19 changed files
with
617 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# coding: utf-8 | ||
|
||
""" | ||
LINE Messaging API | ||
This document describes LINE Messaging API. # noqa: E501 | ||
The version of the OpenAPI document: 0.0.1 | ||
Generated by OpenAPI Generator (https://openapi-generator.tech) | ||
Do not edit the class manually. | ||
""" | ||
|
||
|
||
from __future__ import annotations | ||
import pprint | ||
import re # noqa: F401 | ||
import json | ||
|
||
|
||
|
||
|
||
from linebot.v3.messaging.models.mention_target import MentionTarget | ||
|
||
class AllMentionTarget(MentionTarget): | ||
""" | ||
AllMentionTarget | ||
https://developers.line.biz/en/reference/messaging-api/#text-message-v2-mentionee-all | ||
""" | ||
type: str = "all" | ||
|
||
__properties = ["type"] | ||
|
||
class Config: | ||
"""Pydantic configuration""" | ||
allow_population_by_field_name = True | ||
validate_assignment = True | ||
|
||
def to_str(self) -> str: | ||
"""Returns the string representation of the model using alias""" | ||
return pprint.pformat(self.dict(by_alias=True)) | ||
|
||
def to_json(self) -> str: | ||
"""Returns the JSON representation of the model using alias""" | ||
return json.dumps(self.to_dict()) | ||
|
||
@classmethod | ||
def from_json(cls, json_str: str) -> AllMentionTarget: | ||
"""Create an instance of AllMentionTarget from a JSON string""" | ||
return cls.from_dict(json.loads(json_str)) | ||
|
||
def to_dict(self): | ||
"""Returns the dictionary representation of the model using alias""" | ||
_dict = self.dict(by_alias=True, | ||
exclude={ | ||
}, | ||
exclude_none=True) | ||
return _dict | ||
|
||
@classmethod | ||
def from_dict(cls, obj: dict) -> AllMentionTarget: | ||
"""Create an instance of AllMentionTarget from a dict""" | ||
if obj is None: | ||
return None | ||
|
||
if not isinstance(obj, dict): | ||
return AllMentionTarget.parse_obj(obj) | ||
|
||
_obj = AllMentionTarget.parse_obj({ | ||
"type": obj.get("type") | ||
}) | ||
return _obj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# coding: utf-8 | ||
|
||
""" | ||
LINE Messaging API | ||
This document describes LINE Messaging API. # noqa: E501 | ||
The version of the OpenAPI document: 0.0.1 | ||
Generated by OpenAPI Generator (https://openapi-generator.tech) | ||
Do not edit the class manually. | ||
""" | ||
|
||
|
||
from __future__ import annotations | ||
import pprint | ||
import re # noqa: F401 | ||
import json | ||
|
||
|
||
|
||
from pydantic.v1 import Field, StrictStr | ||
from linebot.v3.messaging.models.substitution_object import SubstitutionObject | ||
|
||
class EmojiSubstitutionObject(SubstitutionObject): | ||
""" | ||
An object representing a emoji substitution. | ||
https://developers.line.biz/en/reference/messaging-api/#text-message-v2-emoji-object | ||
""" | ||
product_id: StrictStr = Field(..., alias="productId") | ||
emoji_id: StrictStr = Field(..., alias="emojiId") | ||
type: str = "emoji" | ||
|
||
__properties = ["type", "productId", "emojiId"] | ||
|
||
class Config: | ||
"""Pydantic configuration""" | ||
allow_population_by_field_name = True | ||
validate_assignment = True | ||
|
||
def to_str(self) -> str: | ||
"""Returns the string representation of the model using alias""" | ||
return pprint.pformat(self.dict(by_alias=True)) | ||
|
||
def to_json(self) -> str: | ||
"""Returns the JSON representation of the model using alias""" | ||
return json.dumps(self.to_dict()) | ||
|
||
@classmethod | ||
def from_json(cls, json_str: str) -> EmojiSubstitutionObject: | ||
"""Create an instance of EmojiSubstitutionObject from a JSON string""" | ||
return cls.from_dict(json.loads(json_str)) | ||
|
||
def to_dict(self): | ||
"""Returns the dictionary representation of the model using alias""" | ||
_dict = self.dict(by_alias=True, | ||
exclude={ | ||
}, | ||
exclude_none=True) | ||
return _dict | ||
|
||
@classmethod | ||
def from_dict(cls, obj: dict) -> EmojiSubstitutionObject: | ||
"""Create an instance of EmojiSubstitutionObject from a dict""" | ||
if obj is None: | ||
return None | ||
|
||
if not isinstance(obj, dict): | ||
return EmojiSubstitutionObject.parse_obj(obj) | ||
|
||
_obj = EmojiSubstitutionObject.parse_obj({ | ||
"type": obj.get("type"), | ||
"product_id": obj.get("productId"), | ||
"emoji_id": obj.get("emojiId") | ||
}) | ||
return _obj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.