Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/sendgrid/helpers/mail/file_content.py: 53%
13 statements
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
1class FileContent(object):
2 """The Base64 encoded content of an Attachment."""
4 def __init__(self, file_content=None):
5 """Create a FileContent object
7 :param file_content: The Base64 encoded content of the attachment
8 :type file_content: string, optional
9 """
10 self._file_content = None
12 if file_content is not None:
13 self.file_content = file_content
15 @property
16 def file_content(self):
17 """The Base64 encoded content of the attachment.
19 :rtype: string
20 """
21 return self._file_content
23 @file_content.setter
24 def file_content(self, value):
25 """The Base64 encoded content of the attachment.
27 :param value: The Base64 encoded content of the attachment.
28 :type value: string
29 """
30 self._file_content = value
32 def get(self):
33 """
34 Get a JSON-ready representation of this FileContent.
36 :returns: This FileContent, ready for use in a request body.
37 :rtype: string
38 """
39 return self.file_content