-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathButton.py
More file actions
40 lines (31 loc) · 960 Bytes
/
Copy pathButton.py
File metadata and controls
40 lines (31 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from DialogFlowPy.OpenUriAction import OpenUriAction
class Button(dict):
"""
{
"title": string,
"openUriAction": {
object(OpenUriAction)
}
}
"""
def __init__(self, title: str = '', open_uri_action: OpenUriAction = None):
super().__init__()
if title is not None:
self['title'] = title
if open_uri_action is not None:
self['openUriAction'] = open_uri_action
def add_open_uri_action(self, uri: str = ''):
self['openUriAction'] = OpenUriAction(uri=uri)
return self['openUriAction']
@property
def title(self):
return self.get('title')
@title.setter
def title(self, title: str):
self['title'] = title
@property
def open_uri_action(self):
return self.get('openUriAction')
@open_uri_action.setter
def open_uri_action(self, open_uri_action):
self['openUriAction'] = open_uri_action