forked from sendgrid/sendgrid-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcategory.py
40 lines (31 loc) · 992 Bytes
/
category.py
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
class Category(object):
"""A category name for this message."""
def __init__(self, name=None):
"""Create a Category.
:param name: The name of this category
:type name: string, optional
"""
self._name = None
if name is not None:
self.name = name
@property
def name(self):
"""The name of this Category. Must be less than 255 characters.
:rtype: string
"""
return self._name
@name.setter
def name(self, value):
"""The name of this Category. Must be less than 255 characters.
:param value: The name of this Category. Must be less than 255
characters.
:type value: string
"""
self._name = value
def get(self):
"""
Get a JSON-ready representation of this Category.
:returns: This Category, ready for use in a request body.
:rtype: string
"""
return self.name