-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathcomment.py
More file actions
68 lines (57 loc) · 2.52 KB
/
comment.py
File metadata and controls
68 lines (57 loc) · 2.52 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
from typing import Optional
from box_sdk_gen.internal.base_object import BaseObject
from box_sdk_gen.schemas.comment_base import CommentBaseTypeField
from box_sdk_gen.schemas.comment_base import CommentBase
from box_sdk_gen.schemas.user_mini import UserMini
from box_sdk_gen.box.errors import BoxSDKError
from box_sdk_gen.internal.utils import DateTime
class CommentItemField(BaseObject):
def __init__(
self, *, id: Optional[str] = None, type: Optional[str] = None, **kwargs
):
"""
:param id: The unique identifier for this object., defaults to None
:type id: Optional[str], optional
:param type: The type for this object., defaults to None
:type type: Optional[str], optional
"""
super().__init__(**kwargs)
self.id = id
self.type = type
class Comment(CommentBase):
_discriminator = 'type', {'comment'}
def __init__(
self,
*,
is_reply_comment: Optional[bool] = None,
message: Optional[str] = None,
created_by: Optional[UserMini] = None,
created_at: Optional[DateTime] = None,
modified_at: Optional[DateTime] = None,
item: Optional[CommentItemField] = None,
id: Optional[str] = None,
type: Optional[CommentBaseTypeField] = None,
**kwargs
):
"""
:param is_reply_comment: Whether or not this comment is a reply to another
comment., defaults to None
:type is_reply_comment: Optional[bool], optional
:param message: The text of the comment, as provided by the user., defaults to None
:type message: Optional[str], optional
:param created_at: The time this comment was created., defaults to None
:type created_at: Optional[DateTime], optional
:param modified_at: The time this comment was last modified., defaults to None
:type modified_at: Optional[DateTime], optional
:param id: The unique identifier for this comment., defaults to None
:type id: Optional[str], optional
:param type: The value will always be `comment`., defaults to None
:type type: Optional[CommentBaseTypeField], optional
"""
super().__init__(id=id, type=type, **kwargs)
self.is_reply_comment = is_reply_comment
self.message = message
self.created_by = created_by
self.created_at = created_at
self.modified_at = modified_at
self.item = item