index
int64
0
731k
package
stringlengths
2
98
name
stringlengths
1
76
docstring
stringlengths
0
281k
code
stringlengths
4
1.07M
signature
stringlengths
2
42.8k
57,993
sib_api_v3_sdk.models.ab_test_campaign_result
__ne__
Returns true if both objects are not equal
def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(self, other)
57,994
sib_api_v3_sdk.models.ab_test_campaign_result
__repr__
For `print` and `pprint`
def __repr__(self): """For `print` and `pprint`""" return self.to_str()
(self)
57,995
sib_api_v3_sdk.models.ab_test_campaign_result
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AbTestCampaignResult, dict): for key, value in self.items(): result[key] = value return result
(self)
57,996
sib_api_v3_sdk.models.ab_test_campaign_result
to_str
Returns the string representation of the model
def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict())
(self)
57,997
sib_api_v3_sdk.models.ab_test_campaign_result_clicked_links
AbTestCampaignResultClickedLinks
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class AbTestCampaignResultClickedLinks(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'version_a': 'AbTestVersionClicks', 'version_b': 'AbTestVersionClicks' } attribute_map = { 'version_a': 'Version A', 'version_b': 'Version B' } def __init__(self, version_a=None, version_b=None): # noqa: E501 """AbTestCampaignResultClickedLinks - a model defined in Swagger""" # noqa: E501 self._version_a = None self._version_b = None self.discriminator = None self.version_a = version_a self.version_b = version_b @property def version_a(self): """Gets the version_a of this AbTestCampaignResultClickedLinks. # noqa: E501 :return: The version_a of this AbTestCampaignResultClickedLinks. # noqa: E501 :rtype: AbTestVersionClicks """ return self._version_a @version_a.setter def version_a(self, version_a): """Sets the version_a of this AbTestCampaignResultClickedLinks. :param version_a: The version_a of this AbTestCampaignResultClickedLinks. # noqa: E501 :type: AbTestVersionClicks """ if version_a is None: raise ValueError("Invalid value for `version_a`, must not be `None`") # noqa: E501 self._version_a = version_a @property def version_b(self): """Gets the version_b of this AbTestCampaignResultClickedLinks. # noqa: E501 :return: The version_b of this AbTestCampaignResultClickedLinks. # noqa: E501 :rtype: AbTestVersionClicks """ return self._version_b @version_b.setter def version_b(self, version_b): """Sets the version_b of this AbTestCampaignResultClickedLinks. :param version_b: The version_b of this AbTestCampaignResultClickedLinks. # noqa: E501 :type: AbTestVersionClicks """ if version_b is None: raise ValueError("Invalid value for `version_b`, must not be `None`") # noqa: E501 self._version_b = version_b def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AbTestCampaignResultClickedLinks, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AbTestCampaignResultClickedLinks): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(version_a=None, version_b=None)
57,998
sib_api_v3_sdk.models.ab_test_campaign_result_clicked_links
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AbTestCampaignResultClickedLinks): return False return self.__dict__ == other.__dict__
(self, other)
57,999
sib_api_v3_sdk.models.ab_test_campaign_result_clicked_links
__init__
AbTestCampaignResultClickedLinks - a model defined in Swagger
def __init__(self, version_a=None, version_b=None): # noqa: E501 """AbTestCampaignResultClickedLinks - a model defined in Swagger""" # noqa: E501 self._version_a = None self._version_b = None self.discriminator = None self.version_a = version_a self.version_b = version_b
(self, version_a=None, version_b=None)
58,002
sib_api_v3_sdk.models.ab_test_campaign_result_clicked_links
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AbTestCampaignResultClickedLinks, dict): for key, value in self.items(): result[key] = value return result
(self)
58,004
sib_api_v3_sdk.models.ab_test_campaign_result_statistics
AbTestCampaignResultStatistics
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class AbTestCampaignResultStatistics(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'openers': 'AbTestVersionStats', 'clicks': 'AbTestVersionStats', 'unsubscribed': 'AbTestVersionStats', 'hard_bounces': 'AbTestVersionStats', 'soft_bounces': 'AbTestVersionStats', 'complaints': 'AbTestVersionStats' } attribute_map = { 'openers': 'openers', 'clicks': 'clicks', 'unsubscribed': 'unsubscribed', 'hard_bounces': 'hardBounces', 'soft_bounces': 'softBounces', 'complaints': 'complaints' } def __init__(self, openers=None, clicks=None, unsubscribed=None, hard_bounces=None, soft_bounces=None, complaints=None): # noqa: E501 """AbTestCampaignResultStatistics - a model defined in Swagger""" # noqa: E501 self._openers = None self._clicks = None self._unsubscribed = None self._hard_bounces = None self._soft_bounces = None self._complaints = None self.discriminator = None self.openers = openers self.clicks = clicks self.unsubscribed = unsubscribed self.hard_bounces = hard_bounces self.soft_bounces = soft_bounces self.complaints = complaints @property def openers(self): """Gets the openers of this AbTestCampaignResultStatistics. # noqa: E501 :return: The openers of this AbTestCampaignResultStatistics. # noqa: E501 :rtype: AbTestVersionStats """ return self._openers @openers.setter def openers(self, openers): """Sets the openers of this AbTestCampaignResultStatistics. :param openers: The openers of this AbTestCampaignResultStatistics. # noqa: E501 :type: AbTestVersionStats """ if openers is None: raise ValueError("Invalid value for `openers`, must not be `None`") # noqa: E501 self._openers = openers @property def clicks(self): """Gets the clicks of this AbTestCampaignResultStatistics. # noqa: E501 :return: The clicks of this AbTestCampaignResultStatistics. # noqa: E501 :rtype: AbTestVersionStats """ return self._clicks @clicks.setter def clicks(self, clicks): """Sets the clicks of this AbTestCampaignResultStatistics. :param clicks: The clicks of this AbTestCampaignResultStatistics. # noqa: E501 :type: AbTestVersionStats """ if clicks is None: raise ValueError("Invalid value for `clicks`, must not be `None`") # noqa: E501 self._clicks = clicks @property def unsubscribed(self): """Gets the unsubscribed of this AbTestCampaignResultStatistics. # noqa: E501 :return: The unsubscribed of this AbTestCampaignResultStatistics. # noqa: E501 :rtype: AbTestVersionStats """ return self._unsubscribed @unsubscribed.setter def unsubscribed(self, unsubscribed): """Sets the unsubscribed of this AbTestCampaignResultStatistics. :param unsubscribed: The unsubscribed of this AbTestCampaignResultStatistics. # noqa: E501 :type: AbTestVersionStats """ if unsubscribed is None: raise ValueError("Invalid value for `unsubscribed`, must not be `None`") # noqa: E501 self._unsubscribed = unsubscribed @property def hard_bounces(self): """Gets the hard_bounces of this AbTestCampaignResultStatistics. # noqa: E501 :return: The hard_bounces of this AbTestCampaignResultStatistics. # noqa: E501 :rtype: AbTestVersionStats """ return self._hard_bounces @hard_bounces.setter def hard_bounces(self, hard_bounces): """Sets the hard_bounces of this AbTestCampaignResultStatistics. :param hard_bounces: The hard_bounces of this AbTestCampaignResultStatistics. # noqa: E501 :type: AbTestVersionStats """ if hard_bounces is None: raise ValueError("Invalid value for `hard_bounces`, must not be `None`") # noqa: E501 self._hard_bounces = hard_bounces @property def soft_bounces(self): """Gets the soft_bounces of this AbTestCampaignResultStatistics. # noqa: E501 :return: The soft_bounces of this AbTestCampaignResultStatistics. # noqa: E501 :rtype: AbTestVersionStats """ return self._soft_bounces @soft_bounces.setter def soft_bounces(self, soft_bounces): """Sets the soft_bounces of this AbTestCampaignResultStatistics. :param soft_bounces: The soft_bounces of this AbTestCampaignResultStatistics. # noqa: E501 :type: AbTestVersionStats """ if soft_bounces is None: raise ValueError("Invalid value for `soft_bounces`, must not be `None`") # noqa: E501 self._soft_bounces = soft_bounces @property def complaints(self): """Gets the complaints of this AbTestCampaignResultStatistics. # noqa: E501 :return: The complaints of this AbTestCampaignResultStatistics. # noqa: E501 :rtype: AbTestVersionStats """ return self._complaints @complaints.setter def complaints(self, complaints): """Sets the complaints of this AbTestCampaignResultStatistics. :param complaints: The complaints of this AbTestCampaignResultStatistics. # noqa: E501 :type: AbTestVersionStats """ if complaints is None: raise ValueError("Invalid value for `complaints`, must not be `None`") # noqa: E501 self._complaints = complaints def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AbTestCampaignResultStatistics, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AbTestCampaignResultStatistics): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(openers=None, clicks=None, unsubscribed=None, hard_bounces=None, soft_bounces=None, complaints=None)
58,005
sib_api_v3_sdk.models.ab_test_campaign_result_statistics
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AbTestCampaignResultStatistics): return False return self.__dict__ == other.__dict__
(self, other)
58,006
sib_api_v3_sdk.models.ab_test_campaign_result_statistics
__init__
AbTestCampaignResultStatistics - a model defined in Swagger
def __init__(self, openers=None, clicks=None, unsubscribed=None, hard_bounces=None, soft_bounces=None, complaints=None): # noqa: E501 """AbTestCampaignResultStatistics - a model defined in Swagger""" # noqa: E501 self._openers = None self._clicks = None self._unsubscribed = None self._hard_bounces = None self._soft_bounces = None self._complaints = None self.discriminator = None self.openers = openers self.clicks = clicks self.unsubscribed = unsubscribed self.hard_bounces = hard_bounces self.soft_bounces = soft_bounces self.complaints = complaints
(self, openers=None, clicks=None, unsubscribed=None, hard_bounces=None, soft_bounces=None, complaints=None)
58,009
sib_api_v3_sdk.models.ab_test_campaign_result_statistics
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AbTestCampaignResultStatistics, dict): for key, value in self.items(): result[key] = value return result
(self)
58,011
sib_api_v3_sdk.models.ab_test_version_clicks
AbTestVersionClicks
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class AbTestVersionClicks(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { } attribute_map = { } def __init__(self): # noqa: E501 """AbTestVersionClicks - a model defined in Swagger""" # noqa: E501 self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AbTestVersionClicks, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AbTestVersionClicks): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
()
58,012
sib_api_v3_sdk.models.ab_test_version_clicks
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AbTestVersionClicks): return False return self.__dict__ == other.__dict__
(self, other)
58,013
sib_api_v3_sdk.models.ab_test_version_clicks
__init__
AbTestVersionClicks - a model defined in Swagger
def __init__(self): # noqa: E501 """AbTestVersionClicks - a model defined in Swagger""" # noqa: E501 self.discriminator = None
(self)
58,016
sib_api_v3_sdk.models.ab_test_version_clicks
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AbTestVersionClicks, dict): for key, value in self.items(): result[key] = value return result
(self)
58,018
sib_api_v3_sdk.models.ab_test_version_clicks_inner
AbTestVersionClicksInner
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class AbTestVersionClicksInner(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'link': 'str', 'clicks_count': 'float', 'click_rate': 'str' } attribute_map = { 'link': 'link', 'clicks_count': 'clicksCount', 'click_rate': 'clickRate' } def __init__(self, link=None, clicks_count=None, click_rate=None): # noqa: E501 """AbTestVersionClicksInner - a model defined in Swagger""" # noqa: E501 self._link = None self._clicks_count = None self._click_rate = None self.discriminator = None self.link = link self.clicks_count = clicks_count self.click_rate = click_rate @property def link(self): """Gets the link of this AbTestVersionClicksInner. # noqa: E501 URL of the link # noqa: E501 :return: The link of this AbTestVersionClicksInner. # noqa: E501 :rtype: str """ return self._link @link.setter def link(self, link): """Sets the link of this AbTestVersionClicksInner. URL of the link # noqa: E501 :param link: The link of this AbTestVersionClicksInner. # noqa: E501 :type: str """ if link is None: raise ValueError("Invalid value for `link`, must not be `None`") # noqa: E501 self._link = link @property def clicks_count(self): """Gets the clicks_count of this AbTestVersionClicksInner. # noqa: E501 Number of times a link is clicked # noqa: E501 :return: The clicks_count of this AbTestVersionClicksInner. # noqa: E501 :rtype: float """ return self._clicks_count @clicks_count.setter def clicks_count(self, clicks_count): """Sets the clicks_count of this AbTestVersionClicksInner. Number of times a link is clicked # noqa: E501 :param clicks_count: The clicks_count of this AbTestVersionClicksInner. # noqa: E501 :type: float """ if clicks_count is None: raise ValueError("Invalid value for `clicks_count`, must not be `None`") # noqa: E501 self._clicks_count = clicks_count @property def click_rate(self): """Gets the click_rate of this AbTestVersionClicksInner. # noqa: E501 Percentage of clicks of link with respect to total clicks # noqa: E501 :return: The click_rate of this AbTestVersionClicksInner. # noqa: E501 :rtype: str """ return self._click_rate @click_rate.setter def click_rate(self, click_rate): """Sets the click_rate of this AbTestVersionClicksInner. Percentage of clicks of link with respect to total clicks # noqa: E501 :param click_rate: The click_rate of this AbTestVersionClicksInner. # noqa: E501 :type: str """ if click_rate is None: raise ValueError("Invalid value for `click_rate`, must not be `None`") # noqa: E501 self._click_rate = click_rate def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AbTestVersionClicksInner, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AbTestVersionClicksInner): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(link=None, clicks_count=None, click_rate=None)
58,019
sib_api_v3_sdk.models.ab_test_version_clicks_inner
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AbTestVersionClicksInner): return False return self.__dict__ == other.__dict__
(self, other)
58,020
sib_api_v3_sdk.models.ab_test_version_clicks_inner
__init__
AbTestVersionClicksInner - a model defined in Swagger
def __init__(self, link=None, clicks_count=None, click_rate=None): # noqa: E501 """AbTestVersionClicksInner - a model defined in Swagger""" # noqa: E501 self._link = None self._clicks_count = None self._click_rate = None self.discriminator = None self.link = link self.clicks_count = clicks_count self.click_rate = click_rate
(self, link=None, clicks_count=None, click_rate=None)
58,023
sib_api_v3_sdk.models.ab_test_version_clicks_inner
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AbTestVersionClicksInner, dict): for key, value in self.items(): result[key] = value return result
(self)
58,025
sib_api_v3_sdk.models.ab_test_version_stats
AbTestVersionStats
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class AbTestVersionStats(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'version_a': 'str', 'version_b': 'str' } attribute_map = { 'version_a': 'Version A', 'version_b': 'Version B' } def __init__(self, version_a=None, version_b=None): # noqa: E501 """AbTestVersionStats - a model defined in Swagger""" # noqa: E501 self._version_a = None self._version_b = None self.discriminator = None self.version_a = version_a self.version_b = version_b @property def version_a(self): """Gets the version_a of this AbTestVersionStats. # noqa: E501 percentage of an event for version A # noqa: E501 :return: The version_a of this AbTestVersionStats. # noqa: E501 :rtype: str """ return self._version_a @version_a.setter def version_a(self, version_a): """Sets the version_a of this AbTestVersionStats. percentage of an event for version A # noqa: E501 :param version_a: The version_a of this AbTestVersionStats. # noqa: E501 :type: str """ if version_a is None: raise ValueError("Invalid value for `version_a`, must not be `None`") # noqa: E501 self._version_a = version_a @property def version_b(self): """Gets the version_b of this AbTestVersionStats. # noqa: E501 percentage of an event for version B # noqa: E501 :return: The version_b of this AbTestVersionStats. # noqa: E501 :rtype: str """ return self._version_b @version_b.setter def version_b(self, version_b): """Sets the version_b of this AbTestVersionStats. percentage of an event for version B # noqa: E501 :param version_b: The version_b of this AbTestVersionStats. # noqa: E501 :type: str """ if version_b is None: raise ValueError("Invalid value for `version_b`, must not be `None`") # noqa: E501 self._version_b = version_b def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AbTestVersionStats, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AbTestVersionStats): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(version_a=None, version_b=None)
58,026
sib_api_v3_sdk.models.ab_test_version_stats
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AbTestVersionStats): return False return self.__dict__ == other.__dict__
(self, other)
58,027
sib_api_v3_sdk.models.ab_test_version_stats
__init__
AbTestVersionStats - a model defined in Swagger
def __init__(self, version_a=None, version_b=None): # noqa: E501 """AbTestVersionStats - a model defined in Swagger""" # noqa: E501 self._version_a = None self._version_b = None self.discriminator = None self.version_a = version_a self.version_b = version_b
(self, version_a=None, version_b=None)
58,030
sib_api_v3_sdk.models.ab_test_version_stats
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AbTestVersionStats, dict): for key, value in self.items(): result[key] = value return result
(self)
58,032
sib_api_v3_sdk.api.account_api
AccountApi
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen
class AccountApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def get_account(self, **kwargs): # noqa: E501 """Get your account information, plan and credits details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_account(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAccount If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_account_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_account_with_http_info(**kwargs) # noqa: E501 return data def get_account_with_http_info(self, **kwargs): # noqa: E501 """Get your account information, plan and credits details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_account_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAccount If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_account" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/account', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetAccount', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(api_client=None)
58,033
sib_api_v3_sdk.api.account_api
__init__
null
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client
(self, api_client=None)
58,034
sib_api_v3_sdk.api.account_api
get_account
Get your account information, plan and credits details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_account(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAccount If the method is called asynchronously, returns the request thread.
def get_account(self, **kwargs): # noqa: E501 """Get your account information, plan and credits details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_account(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAccount If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_account_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_account_with_http_info(**kwargs) # noqa: E501 return data
(self, **kwargs)
58,035
sib_api_v3_sdk.api.account_api
get_account_with_http_info
Get your account information, plan and credits details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_account_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAccount If the method is called asynchronously, returns the request thread.
def get_account_with_http_info(self, **kwargs): # noqa: E501 """Get your account information, plan and credits details # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_account_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :return: GetAccount If the method is called asynchronously, returns the request thread. """ all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_account" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api-key', 'partner-key'] # noqa: E501 return self.api_client.call_api( '/account', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='GetAccount', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
(self, **kwargs)
58,036
sib_api_v3_sdk.models.add_child_domain
AddChildDomain
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class AddChildDomain(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'domain': 'str' } attribute_map = { 'domain': 'domain' } def __init__(self, domain=None): # noqa: E501 """AddChildDomain - a model defined in Swagger""" # noqa: E501 self._domain = None self.discriminator = None if domain is not None: self.domain = domain @property def domain(self): """Gets the domain of this AddChildDomain. # noqa: E501 Sender domain to add for a specific child account # noqa: E501 :return: The domain of this AddChildDomain. # noqa: E501 :rtype: str """ return self._domain @domain.setter def domain(self, domain): """Sets the domain of this AddChildDomain. Sender domain to add for a specific child account # noqa: E501 :param domain: The domain of this AddChildDomain. # noqa: E501 :type: str """ self._domain = domain def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AddChildDomain, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AddChildDomain): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(domain=None)
58,037
sib_api_v3_sdk.models.add_child_domain
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AddChildDomain): return False return self.__dict__ == other.__dict__
(self, other)
58,038
sib_api_v3_sdk.models.add_child_domain
__init__
AddChildDomain - a model defined in Swagger
def __init__(self, domain=None): # noqa: E501 """AddChildDomain - a model defined in Swagger""" # noqa: E501 self._domain = None self.discriminator = None if domain is not None: self.domain = domain
(self, domain=None)
58,041
sib_api_v3_sdk.models.add_child_domain
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AddChildDomain, dict): for key, value in self.items(): result[key] = value return result
(self)
58,043
sib_api_v3_sdk.models.add_contact_to_list
AddContactToList
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class AddContactToList(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'emails': 'list[str]', 'ids': 'list[int]' } attribute_map = { 'emails': 'emails', 'ids': 'ids' } def __init__(self, emails=None, ids=None): # noqa: E501 """AddContactToList - a model defined in Swagger""" # noqa: E501 self._emails = None self._ids = None self.discriminator = None if emails is not None: self.emails = emails if ids is not None: self.ids = ids @property def emails(self): """Gets the emails of this AddContactToList. # noqa: E501 Mandatory if IDs are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. # noqa: E501 :return: The emails of this AddContactToList. # noqa: E501 :rtype: list[str] """ return self._emails @emails.setter def emails(self, emails): """Sets the emails of this AddContactToList. Mandatory if IDs are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. # noqa: E501 :param emails: The emails of this AddContactToList. # noqa: E501 :type: list[str] """ self._emails = emails @property def ids(self): """Gets the ids of this AddContactToList. # noqa: E501 Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. # noqa: E501 :return: The ids of this AddContactToList. # noqa: E501 :rtype: list[int] """ return self._ids @ids.setter def ids(self, ids): """Sets the ids of this AddContactToList. Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. # noqa: E501 :param ids: The ids of this AddContactToList. # noqa: E501 :type: list[int] """ self._ids = ids def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AddContactToList, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AddContactToList): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(emails=None, ids=None)
58,044
sib_api_v3_sdk.models.add_contact_to_list
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AddContactToList): return False return self.__dict__ == other.__dict__
(self, other)
58,045
sib_api_v3_sdk.models.add_contact_to_list
__init__
AddContactToList - a model defined in Swagger
def __init__(self, emails=None, ids=None): # noqa: E501 """AddContactToList - a model defined in Swagger""" # noqa: E501 self._emails = None self._ids = None self.discriminator = None if emails is not None: self.emails = emails if ids is not None: self.ids = ids
(self, emails=None, ids=None)
58,048
sib_api_v3_sdk.models.add_contact_to_list
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AddContactToList, dict): for key, value in self.items(): result[key] = value return result
(self)
58,050
sib_api_v3_sdk.models.add_credits
AddCredits
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class AddCredits(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'sms': 'int', 'email': 'int' } attribute_map = { 'sms': 'sms', 'email': 'email' } def __init__(self, sms=None, email=None): # noqa: E501 """AddCredits - a model defined in Swagger""" # noqa: E501 self._sms = None self._email = None self.discriminator = None if sms is not None: self.sms = sms if email is not None: self.email = email @property def sms(self): """Gets the sms of this AddCredits. # noqa: E501 Required if email credits are empty. SMS credits to be added to the child account # noqa: E501 :return: The sms of this AddCredits. # noqa: E501 :rtype: int """ return self._sms @sms.setter def sms(self, sms): """Sets the sms of this AddCredits. Required if email credits are empty. SMS credits to be added to the child account # noqa: E501 :param sms: The sms of this AddCredits. # noqa: E501 :type: int """ self._sms = sms @property def email(self): """Gets the email of this AddCredits. # noqa: E501 Required if sms credits are empty. Email credits to be added to the child account # noqa: E501 :return: The email of this AddCredits. # noqa: E501 :rtype: int """ return self._email @email.setter def email(self, email): """Sets the email of this AddCredits. Required if sms credits are empty. Email credits to be added to the child account # noqa: E501 :param email: The email of this AddCredits. # noqa: E501 :type: int """ self._email = email def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AddCredits, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AddCredits): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(sms=None, email=None)
58,051
sib_api_v3_sdk.models.add_credits
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AddCredits): return False return self.__dict__ == other.__dict__
(self, other)
58,052
sib_api_v3_sdk.models.add_credits
__init__
AddCredits - a model defined in Swagger
def __init__(self, sms=None, email=None): # noqa: E501 """AddCredits - a model defined in Swagger""" # noqa: E501 self._sms = None self._email = None self.discriminator = None if sms is not None: self.sms = sms if email is not None: self.email = email
(self, sms=None, email=None)
58,055
sib_api_v3_sdk.models.add_credits
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(AddCredits, dict): for key, value in self.items(): result[key] = value return result
(self)
58,057
sib_api_v3_sdk.api_client
ApiClient
Generic API client for Swagger client library builds. Swagger generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of the methods and models for each application are generated from the Swagger templates. NOTE: This class is auto generated by the swagger code generator program. Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually. :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to the API. :param cookie: a cookie to include in the header when making calls to the API
class ApiClient(object): """Generic API client for Swagger client library builds. Swagger generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of the methods and models for each application are generated from the Swagger templates. NOTE: This class is auto generated by the swagger code generator program. Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually. :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to the API. :param cookie: a cookie to include in the header when making calls to the API """ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types NATIVE_TYPES_MAPPING = { 'int': int, 'long': int if six.PY3 else long, # noqa: F821 'float': float, 'str': str, 'bool': bool, 'date': datetime.date, 'datetime': datetime.datetime, 'object': object, } def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None): if configuration is None: configuration = Configuration() self.configuration = configuration # Use the pool property to lazily initialize the ThreadPool. self._pool = None self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None and header_name == "User-Agent" and "sendinblue_" in header_value.lower(): self.default_headers[header_name] = header_value elif header_name is not None and header_name != "User-Agent": self.default_headers[header_name] = header_value else: self.user_agent = 'sendinblue_clientAPI/v7.6.0/python' self.cookie = cookie def __del__(self): if self._pool is not None: self._pool.close() self._pool.join() @property def pool(self): if self._pool is None: self._pool = ThreadPool() return self._pool @property def user_agent(self): """User agent for this API client""" return self.default_headers['User-Agent'] @user_agent.setter def user_agent(self, value): self.default_headers['User-Agent'] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value def __call_api( self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None): config = self.configuration # header parameters header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) header_params = dict(self.parameters_to_tuples(header_params, collection_formats)) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) path_params = self.parameters_to_tuples(path_params, collection_formats) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( '{%s}' % k, quote(str(v), safe=config.safe_chars_for_path_param) ) # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) query_params = self.parameters_to_tuples(query_params, collection_formats) # post parameters if post_params or files: post_params = self.prepare_post_parameters(post_params, files) post_params = self.sanitize_for_serialization(post_params) post_params = self.parameters_to_tuples(post_params, collection_formats) # auth setting self.update_params_for_auth(header_params, query_params, auth_settings) # body if body: body = self.sanitize_for_serialization(body) # request url url = self.configuration.host + resource_path # perform request and return response response_data = self.request( method, url, query_params=query_params, headers=header_params, post_params=post_params, body=body, _preload_content=_preload_content, _request_timeout=_request_timeout) self.last_response = response_data return_data = response_data if _preload_content: # deserialize response data if response_type: return_data = self.deserialize(response_data, response_type) else: return_data = None if _return_http_data_only: return (return_data) else: return (return_data, response_data.status, response_data.getheaders()) def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is swagger model, return the properties dict. :param obj: The data to serialize. :return: The serialized form of data. """ if obj is None: return None elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] elif isinstance(obj, tuple): return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() if isinstance(obj, dict): obj_dict = obj else: # Convert model obj to dict except # attributes `swagger_types`, `attribute_map` # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) for attr, _ in six.iteritems(obj.swagger_types) if getattr(obj, attr) is not None} return {key: self.sanitize_for_serialization(val) for key, val in six.iteritems(obj_dict)} def deserialize(self, response, response_type): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. :param response_type: class literal for deserialized object, or string of class name. :return: deserialized object. """ # handle file downloading # save response body into a tmp file and return the instance if response_type == "file": return self.__deserialize_file(response) # fetch data from response object try: data = json.loads(response.data) except ValueError: data = response.data return self.__deserialize(data, response_type) def __deserialize(self, data, klass): """Deserializes dict, list, str into an object. :param data: dict, list or str. :param klass: class literal, or string of class name. :return: object. """ if data is None: return None if type(klass) == str: if klass.startswith('list['): sub_kls = re.match(r'list\[(.*)\]', klass).group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('dict('): sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: klass = self.NATIVE_TYPES_MAPPING[klass] else: klass = getattr(sib_api_v3_sdk.models, klass) if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) elif klass == object: return self.__deserialize_object(data) elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: return self.__deserialize_datatime(data) else: return self.__deserialize_model(data, klass) def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request (synchronous) and returns deserialized data. To make an async request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. :param path_params: Path parameters in the url. :param query_params: Query parameters in the url. :param header_params: Header parameters to be placed in the request header. :param body: Request body. :param post_params dict: Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`. :param auth_settings list: Auth Settings names for the request. :param response: Response data type. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param collection_formats: dict of collection formats for path, query, header, and post parameters. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. If parameter async_req is False or missing, then the method will return the response directly. """ if not async_req: return self.__call_api(resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout) else: thread = self.pool.apply_async(self.__call_api, (resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout)) return thread def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request using RESTClient.""" if method == "GET": return self.rest_client.GET(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "HEAD": return self.rest_client.HEAD(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "OPTIONS": return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "PUT": return self.rest_client.PUT(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "PATCH": return self.rest_client.PATCH(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "DELETE": return self.rest_client.DELETE(url, query_params=query_params, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) else: raise ValueError( "http method must be `GET`, `HEAD`, `OPTIONS`," " `POST`, `PATCH`, `PUT` or `DELETE`." ) def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. :param params: Parameters as dict or list of two-tuples :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ new_params = [] if collection_formats is None: collection_formats = {} for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': new_params.extend((k, value) for value in v) else: if collection_format == 'ssv': delimiter = ' ' elif collection_format == 'tsv': delimiter = '\t' elif collection_format == 'pipes': delimiter = '|' else: # csv is the default delimiter = ',' new_params.append( (k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params def prepare_post_parameters(self, post_params=None, files=None): """Builds form parameters. :param post_params: Normal form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] if post_params: params = post_params if files: for k, v in six.iteritems(files): if not v: continue file_names = v if type(v) is list else [v] for n in file_names: with open(n, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() mimetype = (mimetypes.guess_type(filename)[0] or 'application/octet-stream') params.append( tuple([k, tuple([filename, filedata, mimetype])])) return params def select_header_accept(self, accepts): """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: return accepts = [x.lower() for x in accepts] if 'application/json' in accepts: return 'application/json' else: return ', '.join(accepts) def select_header_content_type(self, content_types): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. :return: Content-Type (e.g. application/json). """ if not content_types: return 'application/json' content_types = [x.lower() for x in content_types] if 'application/json' in content_types or '*/*' in content_types: return 'application/json' else: return content_types[0] def update_params_for_auth(self, headers, querys, auth_settings): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param querys: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. """ if not auth_settings: return for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: if not auth_setting['value']: continue elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] elif auth_setting['in'] == 'query': querys.append((auth_setting['key'], auth_setting['value'])) else: raise ValueError( 'Authentication token must be in `query` or `header`' ) def __deserialize_file(self, response): """Deserializes body to file Saves response body into a file in a temporary folder, using the filename from the `Content-Disposition` header if provided. :param response: RESTResponse. :return: file path. """ fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) os.close(fd) os.remove(path) content_disposition = response.getheader("Content-Disposition") if content_disposition: filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: f.write(response.data) return path def __deserialize_primitive(self, data, klass): """Deserializes string to primitive type. :param data: str. :param klass: class literal. :return: int, long, float, str, bool. """ try: return klass(data) except UnicodeEncodeError: return six.text_type(data) except TypeError: return data def __deserialize_object(self, value): """Return a original value. :return: object. """ return value def __deserialize_date(self, string): """Deserializes string to date. :param string: str. :return: date. """ try: from dateutil.parser import parse return parse(string).date() except ImportError: return string except ValueError: raise rest.ApiException( status=0, reason="Failed to parse `{0}` as date object".format(string) ) def __deserialize_datatime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. :param string: str. :return: datetime. """ try: from dateutil.parser import parse return parse(string) except ImportError: return string except ValueError: raise rest.ApiException( status=0, reason=( "Failed to parse `{0}` as datetime object" .format(string) ) ) def __hasattr(self, object, name): return name in object.__class__.__dict__ def __deserialize_model(self, data, klass): """Deserializes list or dict to model. :param data: dict, list. :param klass: class literal. :return: model object. """ if (not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model')): return data kwargs = {} if klass.swagger_types is not None: for attr, attr_type in six.iteritems(klass.swagger_types): if (data is not None and klass.attribute_map[attr] in data and isinstance(data, (list, dict))): value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) instance = klass(**kwargs) if (isinstance(instance, dict) and klass.swagger_types is not None and isinstance(data, dict)): for key, value in data.items(): if key not in klass.swagger_types: instance[key] = value if self.__hasattr(instance, 'get_real_child_model'): klass_name = instance.get_real_child_model(data) if klass_name: instance = self.__deserialize(data, klass_name) return instance
(configuration=None, header_name=None, header_value=None, cookie=None)
58,058
sib_api_v3_sdk.api_client
__call_api
null
def __call_api( self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None): config = self.configuration # header parameters header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) header_params = dict(self.parameters_to_tuples(header_params, collection_formats)) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) path_params = self.parameters_to_tuples(path_params, collection_formats) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( '{%s}' % k, quote(str(v), safe=config.safe_chars_for_path_param) ) # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) query_params = self.parameters_to_tuples(query_params, collection_formats) # post parameters if post_params or files: post_params = self.prepare_post_parameters(post_params, files) post_params = self.sanitize_for_serialization(post_params) post_params = self.parameters_to_tuples(post_params, collection_formats) # auth setting self.update_params_for_auth(header_params, query_params, auth_settings) # body if body: body = self.sanitize_for_serialization(body) # request url url = self.configuration.host + resource_path # perform request and return response response_data = self.request( method, url, query_params=query_params, headers=header_params, post_params=post_params, body=body, _preload_content=_preload_content, _request_timeout=_request_timeout) self.last_response = response_data return_data = response_data if _preload_content: # deserialize response data if response_type: return_data = self.deserialize(response_data, response_type) else: return_data = None if _return_http_data_only: return (return_data) else: return (return_data, response_data.status, response_data.getheaders())
(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None)
58,059
sib_api_v3_sdk.api_client
__deserialize
Deserializes dict, list, str into an object. :param data: dict, list or str. :param klass: class literal, or string of class name. :return: object.
def __deserialize(self, data, klass): """Deserializes dict, list, str into an object. :param data: dict, list or str. :param klass: class literal, or string of class name. :return: object. """ if data is None: return None if type(klass) == str: if klass.startswith('list['): sub_kls = re.match(r'list\[(.*)\]', klass).group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('dict('): sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: klass = self.NATIVE_TYPES_MAPPING[klass] else: klass = getattr(sib_api_v3_sdk.models, klass) if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) elif klass == object: return self.__deserialize_object(data) elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: return self.__deserialize_datatime(data) else: return self.__deserialize_model(data, klass)
(self, data, klass)
58,060
sib_api_v3_sdk.api_client
__deserialize_datatime
Deserializes string to datetime. The string should be in iso8601 datetime format. :param string: str. :return: datetime.
def __deserialize_datatime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. :param string: str. :return: datetime. """ try: from dateutil.parser import parse return parse(string) except ImportError: return string except ValueError: raise rest.ApiException( status=0, reason=( "Failed to parse `{0}` as datetime object" .format(string) ) )
(self, string)
58,061
sib_api_v3_sdk.api_client
__deserialize_date
Deserializes string to date. :param string: str. :return: date.
def __deserialize_date(self, string): """Deserializes string to date. :param string: str. :return: date. """ try: from dateutil.parser import parse return parse(string).date() except ImportError: return string except ValueError: raise rest.ApiException( status=0, reason="Failed to parse `{0}` as date object".format(string) )
(self, string)
58,063
sib_api_v3_sdk.api_client
__deserialize_model
Deserializes list or dict to model. :param data: dict, list. :param klass: class literal. :return: model object.
def __deserialize_model(self, data, klass): """Deserializes list or dict to model. :param data: dict, list. :param klass: class literal. :return: model object. """ if (not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model')): return data kwargs = {} if klass.swagger_types is not None: for attr, attr_type in six.iteritems(klass.swagger_types): if (data is not None and klass.attribute_map[attr] in data and isinstance(data, (list, dict))): value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) instance = klass(**kwargs) if (isinstance(instance, dict) and klass.swagger_types is not None and isinstance(data, dict)): for key, value in data.items(): if key not in klass.swagger_types: instance[key] = value if self.__hasattr(instance, 'get_real_child_model'): klass_name = instance.get_real_child_model(data) if klass_name: instance = self.__deserialize(data, klass_name) return instance
(self, data, klass)
58,064
sib_api_v3_sdk.api_client
__deserialize_object
Return a original value. :return: object.
def __deserialize_object(self, value): """Return a original value. :return: object. """ return value
(self, value)
58,065
sib_api_v3_sdk.api_client
__deserialize_primitive
Deserializes string to primitive type. :param data: str. :param klass: class literal. :return: int, long, float, str, bool.
def __deserialize_primitive(self, data, klass): """Deserializes string to primitive type. :param data: str. :param klass: class literal. :return: int, long, float, str, bool. """ try: return klass(data) except UnicodeEncodeError: return six.text_type(data) except TypeError: return data
(self, data, klass)
58,066
sib_api_v3_sdk.api_client
__hasattr
null
def __hasattr(self, object, name): return name in object.__class__.__dict__
(self, object, name)
58,067
sib_api_v3_sdk.api_client
__del__
null
def __del__(self): if self._pool is not None: self._pool.close() self._pool.join()
(self)
58,068
sib_api_v3_sdk.api_client
__init__
null
def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None): if configuration is None: configuration = Configuration() self.configuration = configuration # Use the pool property to lazily initialize the ThreadPool. self._pool = None self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None and header_name == "User-Agent" and "sendinblue_" in header_value.lower(): self.default_headers[header_name] = header_value elif header_name is not None and header_name != "User-Agent": self.default_headers[header_name] = header_value else: self.user_agent = 'sendinblue_clientAPI/v7.6.0/python' self.cookie = cookie
(self, configuration=None, header_name=None, header_value=None, cookie=None)
58,069
sib_api_v3_sdk.api_client
call_api
Makes the HTTP request (synchronous) and returns deserialized data. To make an async request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. :param path_params: Path parameters in the url. :param query_params: Query parameters in the url. :param header_params: Header parameters to be placed in the request header. :param body: Request body. :param post_params dict: Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`. :param auth_settings list: Auth Settings names for the request. :param response: Response data type. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param collection_formats: dict of collection formats for path, query, header, and post parameters. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. If parameter async_req is False or missing, then the method will return the response directly.
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request (synchronous) and returns deserialized data. To make an async request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. :param path_params: Path parameters in the url. :param query_params: Query parameters in the url. :param header_params: Header parameters to be placed in the request header. :param body: Request body. :param post_params dict: Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`. :param auth_settings list: Auth Settings names for the request. :param response: Response data type. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param collection_formats: dict of collection formats for path, query, header, and post parameters. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. If parameter async_req is False or missing, then the method will return the response directly. """ if not async_req: return self.__call_api(resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout) else: thread = self.pool.apply_async(self.__call_api, (resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout)) return thread
(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_type=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None)
58,071
sib_api_v3_sdk.api_client
parameters_to_tuples
Get parameters as list of tuples, formatting collections. :param params: Parameters as dict or list of two-tuples :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted
def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. :param params: Parameters as dict or list of two-tuples :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ new_params = [] if collection_formats is None: collection_formats = {} for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': new_params.extend((k, value) for value in v) else: if collection_format == 'ssv': delimiter = ' ' elif collection_format == 'tsv': delimiter = '\t' elif collection_format == 'pipes': delimiter = '|' else: # csv is the default delimiter = ',' new_params.append( (k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params
(self, params, collection_formats)
58,072
sib_api_v3_sdk.api_client
prepare_post_parameters
Builds form parameters. :param post_params: Normal form parameters. :param files: File parameters. :return: Form parameters with files.
def prepare_post_parameters(self, post_params=None, files=None): """Builds form parameters. :param post_params: Normal form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] if post_params: params = post_params if files: for k, v in six.iteritems(files): if not v: continue file_names = v if type(v) is list else [v] for n in file_names: with open(n, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() mimetype = (mimetypes.guess_type(filename)[0] or 'application/octet-stream') params.append( tuple([k, tuple([filename, filedata, mimetype])])) return params
(self, post_params=None, files=None)
58,073
sib_api_v3_sdk.api_client
request
Makes the HTTP request using RESTClient.
def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request using RESTClient.""" if method == "GET": return self.rest_client.GET(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "HEAD": return self.rest_client.HEAD(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "OPTIONS": return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "PUT": return self.rest_client.PUT(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "PATCH": return self.rest_client.PATCH(url, query_params=query_params, headers=headers, post_params=post_params, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) elif method == "DELETE": return self.rest_client.DELETE(url, query_params=query_params, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) else: raise ValueError( "http method must be `GET`, `HEAD`, `OPTIONS`," " `POST`, `PATCH`, `PUT` or `DELETE`." )
(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)
58,074
sib_api_v3_sdk.api_client
sanitize_for_serialization
Builds a JSON POST object. If obj is None, return None. If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is swagger model, return the properties dict. :param obj: The data to serialize. :return: The serialized form of data.
def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is swagger model, return the properties dict. :param obj: The data to serialize. :return: The serialized form of data. """ if obj is None: return None elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] elif isinstance(obj, tuple): return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() if isinstance(obj, dict): obj_dict = obj else: # Convert model obj to dict except # attributes `swagger_types`, `attribute_map` # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) for attr, _ in six.iteritems(obj.swagger_types) if getattr(obj, attr) is not None} return {key: self.sanitize_for_serialization(val) for key, val in six.iteritems(obj_dict)}
(self, obj)
58,075
sib_api_v3_sdk.api_client
select_header_accept
Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json).
def select_header_accept(self, accepts): """Returns `Accept` based on an array of accepts provided. :param accepts: List of headers. :return: Accept (e.g. application/json). """ if not accepts: return accepts = [x.lower() for x in accepts] if 'application/json' in accepts: return 'application/json' else: return ', '.join(accepts)
(self, accepts)
58,076
sib_api_v3_sdk.api_client
select_header_content_type
Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. :return: Content-Type (e.g. application/json).
def select_header_content_type(self, content_types): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. :return: Content-Type (e.g. application/json). """ if not content_types: return 'application/json' content_types = [x.lower() for x in content_types] if 'application/json' in content_types or '*/*' in content_types: return 'application/json' else: return content_types[0]
(self, content_types)
58,078
sib_api_v3_sdk.api_client
update_params_for_auth
Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param querys: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list.
def update_params_for_auth(self, headers, querys, auth_settings): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. :param querys: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. """ if not auth_settings: return for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: if not auth_setting['value']: continue elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] elif auth_setting['in'] == 'query': querys.append((auth_setting['key'], auth_setting['value'])) else: raise ValueError( 'Authentication token must be in `query` or `header`' )
(self, headers, querys, auth_settings)
58,079
sib_api_v3_sdk.models.block_domain
BlockDomain
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class BlockDomain(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'domain': 'str' } attribute_map = { 'domain': 'domain' } def __init__(self, domain=None): # noqa: E501 """BlockDomain - a model defined in Swagger""" # noqa: E501 self._domain = None self.discriminator = None self.domain = domain @property def domain(self): """Gets the domain of this BlockDomain. # noqa: E501 name of the domain to be blocked # noqa: E501 :return: The domain of this BlockDomain. # noqa: E501 :rtype: str """ return self._domain @domain.setter def domain(self, domain): """Sets the domain of this BlockDomain. name of the domain to be blocked # noqa: E501 :param domain: The domain of this BlockDomain. # noqa: E501 :type: str """ if domain is None: raise ValueError("Invalid value for `domain`, must not be `None`") # noqa: E501 self._domain = domain def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(BlockDomain, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, BlockDomain): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(domain=None)
58,080
sib_api_v3_sdk.models.block_domain
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, BlockDomain): return False return self.__dict__ == other.__dict__
(self, other)
58,081
sib_api_v3_sdk.models.block_domain
__init__
BlockDomain - a model defined in Swagger
def __init__(self, domain=None): # noqa: E501 """BlockDomain - a model defined in Swagger""" # noqa: E501 self._domain = None self.discriminator = None self.domain = domain
(self, domain=None)
58,084
sib_api_v3_sdk.models.block_domain
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(BlockDomain, dict): for key, value in self.items(): result[key] = value return result
(self)
58,086
sib_api_v3_sdk.models.body
Body
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'name': 'str', 'attributes': 'object', 'country_code': 'int' } attribute_map = { 'name': 'name', 'attributes': 'attributes', 'country_code': 'countryCode' } def __init__(self, name=None, attributes=None, country_code=None): # noqa: E501 """Body - a model defined in Swagger""" # noqa: E501 self._name = None self._attributes = None self._country_code = None self.discriminator = None self.name = name if attributes is not None: self.attributes = attributes if country_code is not None: self.country_code = country_code @property def name(self): """Gets the name of this Body. # noqa: E501 Name of company # noqa: E501 :return: The name of this Body. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Body. Name of company # noqa: E501 :param name: The name of this Body. # noqa: E501 :type: str """ if name is None: raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def attributes(self): """Gets the attributes of this Body. # noqa: E501 Attributes for company creation # noqa: E501 :return: The attributes of this Body. # noqa: E501 :rtype: object """ return self._attributes @attributes.setter def attributes(self, attributes): """Sets the attributes of this Body. Attributes for company creation # noqa: E501 :param attributes: The attributes of this Body. # noqa: E501 :type: object """ self._attributes = attributes @property def country_code(self): """Gets the country_code of this Body. # noqa: E501 Country code if phone_number is passed in attributes. # noqa: E501 :return: The country_code of this Body. # noqa: E501 :rtype: int """ return self._country_code @country_code.setter def country_code(self, country_code): """Sets the country_code of this Body. Country code if phone_number is passed in attributes. # noqa: E501 :param country_code: The country_code of this Body. # noqa: E501 :type: int """ self._country_code = country_code def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(name=None, attributes=None, country_code=None)
58,087
sib_api_v3_sdk.models.body
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body): return False return self.__dict__ == other.__dict__
(self, other)
58,088
sib_api_v3_sdk.models.body
__init__
Body - a model defined in Swagger
def __init__(self, name=None, attributes=None, country_code=None): # noqa: E501 """Body - a model defined in Swagger""" # noqa: E501 self._name = None self._attributes = None self._country_code = None self.discriminator = None self.name = name if attributes is not None: self.attributes = attributes if country_code is not None: self.country_code = country_code
(self, name=None, attributes=None, country_code=None)
58,091
sib_api_v3_sdk.models.body
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body, dict): for key, value in self.items(): result[key] = value return result
(self)
58,093
sib_api_v3_sdk.models.body1
Body1
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body1(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'name': 'str', 'attributes': 'object', 'country_code': 'int' } attribute_map = { 'name': 'name', 'attributes': 'attributes', 'country_code': 'countryCode' } def __init__(self, name=None, attributes=None, country_code=None): # noqa: E501 """Body1 - a model defined in Swagger""" # noqa: E501 self._name = None self._attributes = None self._country_code = None self.discriminator = None if name is not None: self.name = name if attributes is not None: self.attributes = attributes if country_code is not None: self.country_code = country_code @property def name(self): """Gets the name of this Body1. # noqa: E501 Name of company # noqa: E501 :return: The name of this Body1. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Body1. Name of company # noqa: E501 :param name: The name of this Body1. # noqa: E501 :type: str """ self._name = name @property def attributes(self): """Gets the attributes of this Body1. # noqa: E501 Attributes for company update # noqa: E501 :return: The attributes of this Body1. # noqa: E501 :rtype: object """ return self._attributes @attributes.setter def attributes(self, attributes): """Sets the attributes of this Body1. Attributes for company update # noqa: E501 :param attributes: The attributes of this Body1. # noqa: E501 :type: object """ self._attributes = attributes @property def country_code(self): """Gets the country_code of this Body1. # noqa: E501 Country code if phone_number is passed in attributes. # noqa: E501 :return: The country_code of this Body1. # noqa: E501 :rtype: int """ return self._country_code @country_code.setter def country_code(self, country_code): """Sets the country_code of this Body1. Country code if phone_number is passed in attributes. # noqa: E501 :param country_code: The country_code of this Body1. # noqa: E501 :type: int """ self._country_code = country_code def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body1, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body1): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(name=None, attributes=None, country_code=None)
58,094
sib_api_v3_sdk.models.body1
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body1): return False return self.__dict__ == other.__dict__
(self, other)
58,095
sib_api_v3_sdk.models.body1
__init__
Body1 - a model defined in Swagger
def __init__(self, name=None, attributes=None, country_code=None): # noqa: E501 """Body1 - a model defined in Swagger""" # noqa: E501 self._name = None self._attributes = None self._country_code = None self.discriminator = None if name is not None: self.name = name if attributes is not None: self.attributes = attributes if country_code is not None: self.country_code = country_code
(self, name=None, attributes=None, country_code=None)
58,098
sib_api_v3_sdk.models.body1
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body1, dict): for key, value in self.items(): result[key] = value return result
(self)
58,100
sib_api_v3_sdk.models.body10
Body10
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body10(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'visitor_id': 'str', 'text': 'str', 'agent_id': 'str', 'group_id': 'str' } attribute_map = { 'visitor_id': 'visitorId', 'text': 'text', 'agent_id': 'agentId', 'group_id': 'groupId' } def __init__(self, visitor_id=None, text=None, agent_id=None, group_id=None): # noqa: E501 """Body10 - a model defined in Swagger""" # noqa: E501 self._visitor_id = None self._text = None self._agent_id = None self._group_id = None self.discriminator = None self.visitor_id = visitor_id self.text = text if agent_id is not None: self.agent_id = agent_id if group_id is not None: self.group_id = group_id @property def visitor_id(self): """Gets the visitor_id of this Body10. # noqa: E501 visitor’s ID received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> # noqa: E501 :return: The visitor_id of this Body10. # noqa: E501 :rtype: str """ return self._visitor_id @visitor_id.setter def visitor_id(self, visitor_id): """Sets the visitor_id of this Body10. visitor’s ID received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.sendinblue.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a> # noqa: E501 :param visitor_id: The visitor_id of this Body10. # noqa: E501 :type: str """ if visitor_id is None: raise ValueError("Invalid value for `visitor_id`, must not be `None`") # noqa: E501 self._visitor_id = visitor_id @property def text(self): """Gets the text of this Body10. # noqa: E501 message text # noqa: E501 :return: The text of this Body10. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): """Sets the text of this Body10. message text # noqa: E501 :param text: The text of this Body10. # noqa: E501 :type: str """ if text is None: raise ValueError("Invalid value for `text`, must not be `None`") # noqa: E501 self._text = text @property def agent_id(self): """Gets the agent_id of this Body10. # noqa: E501 agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Optional if `groupId` is set. # noqa: E501 :return: The agent_id of this Body10. # noqa: E501 :rtype: str """ return self._agent_id @agent_id.setter def agent_id(self, agent_id): """Sets the agent_id of this Body10. agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Optional if `groupId` is set. # noqa: E501 :param agent_id: The agent_id of this Body10. # noqa: E501 :type: str """ self._agent_id = agent_id @property def group_id(self): """Gets the group_id of this Body10. # noqa: E501 group ID. It can be found on group’s page. Optional if `agentId` is set. # noqa: E501 :return: The group_id of this Body10. # noqa: E501 :rtype: str """ return self._group_id @group_id.setter def group_id(self, group_id): """Sets the group_id of this Body10. group ID. It can be found on group’s page. Optional if `agentId` is set. # noqa: E501 :param group_id: The group_id of this Body10. # noqa: E501 :type: str """ self._group_id = group_id def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body10, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body10): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(visitor_id=None, text=None, agent_id=None, group_id=None)
58,101
sib_api_v3_sdk.models.body10
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body10): return False return self.__dict__ == other.__dict__
(self, other)
58,102
sib_api_v3_sdk.models.body10
__init__
Body10 - a model defined in Swagger
def __init__(self, visitor_id=None, text=None, agent_id=None, group_id=None): # noqa: E501 """Body10 - a model defined in Swagger""" # noqa: E501 self._visitor_id = None self._text = None self._agent_id = None self._group_id = None self.discriminator = None self.visitor_id = visitor_id self.text = text if agent_id is not None: self.agent_id = agent_id if group_id is not None: self.group_id = group_id
(self, visitor_id=None, text=None, agent_id=None, group_id=None)
58,105
sib_api_v3_sdk.models.body10
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body10, dict): for key, value in self.items(): result[key] = value return result
(self)
58,107
sib_api_v3_sdk.models.body11
Body11
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body11(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'text': 'str' } attribute_map = { 'text': 'text' } def __init__(self, text=None): # noqa: E501 """Body11 - a model defined in Swagger""" # noqa: E501 self._text = None self.discriminator = None self.text = text @property def text(self): """Gets the text of this Body11. # noqa: E501 edited message text # noqa: E501 :return: The text of this Body11. # noqa: E501 :rtype: str """ return self._text @text.setter def text(self, text): """Sets the text of this Body11. edited message text # noqa: E501 :param text: The text of this Body11. # noqa: E501 :type: str """ if text is None: raise ValueError("Invalid value for `text`, must not be `None`") # noqa: E501 self._text = text def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body11, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body11): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(text=None)
58,108
sib_api_v3_sdk.models.body11
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body11): return False return self.__dict__ == other.__dict__
(self, other)
58,109
sib_api_v3_sdk.models.body11
__init__
Body11 - a model defined in Swagger
def __init__(self, text=None): # noqa: E501 """Body11 - a model defined in Swagger""" # noqa: E501 self._text = None self.discriminator = None self.text = text
(self, text=None)
58,112
sib_api_v3_sdk.models.body11
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body11, dict): for key, value in self.items(): result[key] = value return result
(self)
58,114
sib_api_v3_sdk.models.body12
Body12
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body12(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'agent_id': 'str', 'received_from': 'str', 'agent_email': 'str', 'agent_name': 'str' } attribute_map = { 'agent_id': 'agentId', 'received_from': 'receivedFrom', 'agent_email': 'agentEmail', 'agent_name': 'agentName' } def __init__(self, agent_id=None, received_from=None, agent_email=None, agent_name=None): # noqa: E501 """Body12 - a model defined in Swagger""" # noqa: E501 self._agent_id = None self._received_from = None self._agent_email = None self._agent_name = None self.discriminator = None if agent_id is not None: self.agent_id = agent_id if received_from is not None: self.received_from = received_from if agent_email is not None: self.agent_email = agent_email if agent_name is not None: self.agent_name = agent_name @property def agent_id(self): """Gets the agent_id of this Body12. # noqa: E501 agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). # noqa: E501 :return: The agent_id of this Body12. # noqa: E501 :rtype: str """ return self._agent_id @agent_id.setter def agent_id(self, agent_id): """Sets the agent_id of this Body12. agent ID. It can be found on agent’s page or received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required). # noqa: E501 :param agent_id: The agent_id of this Body12. # noqa: E501 :type: str """ self._agent_id = agent_id @property def received_from(self): """Gets the received_from of this Body12. # noqa: E501 mark your messages to distinguish messages created by you from the others. # noqa: E501 :return: The received_from of this Body12. # noqa: E501 :rtype: str """ return self._received_from @received_from.setter def received_from(self, received_from): """Sets the received_from of this Body12. mark your messages to distinguish messages created by you from the others. # noqa: E501 :param received_from: The received_from of this Body12. # noqa: E501 :type: str """ self._received_from = received_from @property def agent_email(self): """Gets the agent_email of this Body12. # noqa: E501 agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Sendinblue organization, a dummy agent will be created automatically. # noqa: E501 :return: The agent_email of this Body12. # noqa: E501 :rtype: str """ return self._agent_email @agent_email.setter def agent_email(self, agent_email): """Sets the agent_email of this Body12. agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Sendinblue organization, a dummy agent will be created automatically. # noqa: E501 :param agent_email: The agent_email of this Body12. # noqa: E501 :type: str """ self._agent_email = agent_email @property def agent_name(self): """Gets the agent_name of this Body12. # noqa: E501 agent name. # noqa: E501 :return: The agent_name of this Body12. # noqa: E501 :rtype: str """ return self._agent_name @agent_name.setter def agent_name(self, agent_name): """Sets the agent_name of this Body12. agent name. # noqa: E501 :param agent_name: The agent_name of this Body12. # noqa: E501 :type: str """ self._agent_name = agent_name def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body12, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body12): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(agent_id=None, received_from=None, agent_email=None, agent_name=None)
58,115
sib_api_v3_sdk.models.body12
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body12): return False return self.__dict__ == other.__dict__
(self, other)
58,116
sib_api_v3_sdk.models.body12
__init__
Body12 - a model defined in Swagger
def __init__(self, agent_id=None, received_from=None, agent_email=None, agent_name=None): # noqa: E501 """Body12 - a model defined in Swagger""" # noqa: E501 self._agent_id = None self._received_from = None self._agent_email = None self._agent_name = None self.discriminator = None if agent_id is not None: self.agent_id = agent_id if received_from is not None: self.received_from = received_from if agent_email is not None: self.agent_email = agent_email if agent_name is not None: self.agent_name = agent_name
(self, agent_id=None, received_from=None, agent_email=None, agent_name=None)
58,119
sib_api_v3_sdk.models.body12
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body12, dict): for key, value in self.items(): result[key] = value return result
(self)
58,121
sib_api_v3_sdk.models.body2
Body2
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body2(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'link_contact_ids': 'list[int]', 'unlink_contact_ids': 'list[int]', 'link_deals_ids': 'list[str]', 'unlink_deals_ids': 'list[str]' } attribute_map = { 'link_contact_ids': 'linkContactIds', 'unlink_contact_ids': 'unlinkContactIds', 'link_deals_ids': 'linkDealsIds', 'unlink_deals_ids': 'unlinkDealsIds' } def __init__(self, link_contact_ids=None, unlink_contact_ids=None, link_deals_ids=None, unlink_deals_ids=None): # noqa: E501 """Body2 - a model defined in Swagger""" # noqa: E501 self._link_contact_ids = None self._unlink_contact_ids = None self._link_deals_ids = None self._unlink_deals_ids = None self.discriminator = None if link_contact_ids is not None: self.link_contact_ids = link_contact_ids if unlink_contact_ids is not None: self.unlink_contact_ids = unlink_contact_ids if link_deals_ids is not None: self.link_deals_ids = link_deals_ids if unlink_deals_ids is not None: self.unlink_deals_ids = unlink_deals_ids @property def link_contact_ids(self): """Gets the link_contact_ids of this Body2. # noqa: E501 Contact ids for contacts to be linked with company # noqa: E501 :return: The link_contact_ids of this Body2. # noqa: E501 :rtype: list[int] """ return self._link_contact_ids @link_contact_ids.setter def link_contact_ids(self, link_contact_ids): """Sets the link_contact_ids of this Body2. Contact ids for contacts to be linked with company # noqa: E501 :param link_contact_ids: The link_contact_ids of this Body2. # noqa: E501 :type: list[int] """ self._link_contact_ids = link_contact_ids @property def unlink_contact_ids(self): """Gets the unlink_contact_ids of this Body2. # noqa: E501 Contact ids for contacts to be unlinked from company # noqa: E501 :return: The unlink_contact_ids of this Body2. # noqa: E501 :rtype: list[int] """ return self._unlink_contact_ids @unlink_contact_ids.setter def unlink_contact_ids(self, unlink_contact_ids): """Sets the unlink_contact_ids of this Body2. Contact ids for contacts to be unlinked from company # noqa: E501 :param unlink_contact_ids: The unlink_contact_ids of this Body2. # noqa: E501 :type: list[int] """ self._unlink_contact_ids = unlink_contact_ids @property def link_deals_ids(self): """Gets the link_deals_ids of this Body2. # noqa: E501 Deals ids for deals to be linked with company # noqa: E501 :return: The link_deals_ids of this Body2. # noqa: E501 :rtype: list[str] """ return self._link_deals_ids @link_deals_ids.setter def link_deals_ids(self, link_deals_ids): """Sets the link_deals_ids of this Body2. Deals ids for deals to be linked with company # noqa: E501 :param link_deals_ids: The link_deals_ids of this Body2. # noqa: E501 :type: list[str] """ self._link_deals_ids = link_deals_ids @property def unlink_deals_ids(self): """Gets the unlink_deals_ids of this Body2. # noqa: E501 Deals ids for deals to be unlinked from company # noqa: E501 :return: The unlink_deals_ids of this Body2. # noqa: E501 :rtype: list[str] """ return self._unlink_deals_ids @unlink_deals_ids.setter def unlink_deals_ids(self, unlink_deals_ids): """Sets the unlink_deals_ids of this Body2. Deals ids for deals to be unlinked from company # noqa: E501 :param unlink_deals_ids: The unlink_deals_ids of this Body2. # noqa: E501 :type: list[str] """ self._unlink_deals_ids = unlink_deals_ids def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body2, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body2): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(link_contact_ids=None, unlink_contact_ids=None, link_deals_ids=None, unlink_deals_ids=None)
58,122
sib_api_v3_sdk.models.body2
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body2): return False return self.__dict__ == other.__dict__
(self, other)
58,123
sib_api_v3_sdk.models.body2
__init__
Body2 - a model defined in Swagger
def __init__(self, link_contact_ids=None, unlink_contact_ids=None, link_deals_ids=None, unlink_deals_ids=None): # noqa: E501 """Body2 - a model defined in Swagger""" # noqa: E501 self._link_contact_ids = None self._unlink_contact_ids = None self._link_deals_ids = None self._unlink_deals_ids = None self.discriminator = None if link_contact_ids is not None: self.link_contact_ids = link_contact_ids if unlink_contact_ids is not None: self.unlink_contact_ids = unlink_contact_ids if link_deals_ids is not None: self.link_deals_ids = link_deals_ids if unlink_deals_ids is not None: self.unlink_deals_ids = unlink_deals_ids
(self, link_contact_ids=None, unlink_contact_ids=None, link_deals_ids=None, unlink_deals_ids=None)
58,126
sib_api_v3_sdk.models.body2
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body2, dict): for key, value in self.items(): result[key] = value return result
(self)
58,128
sib_api_v3_sdk.models.body3
Body3
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body3(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'name': 'str', 'attributes': 'object' } attribute_map = { 'name': 'name', 'attributes': 'attributes' } def __init__(self, name=None, attributes=None): # noqa: E501 """Body3 - a model defined in Swagger""" # noqa: E501 self._name = None self._attributes = None self.discriminator = None self.name = name if attributes is not None: self.attributes = attributes @property def name(self): """Gets the name of this Body3. # noqa: E501 Name of deal # noqa: E501 :return: The name of this Body3. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Body3. Name of deal # noqa: E501 :param name: The name of this Body3. # noqa: E501 :type: str """ if name is None: raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def attributes(self): """Gets the attributes of this Body3. # noqa: E501 Attributes fo\\r deal creation # noqa: E501 :return: The attributes of this Body3. # noqa: E501 :rtype: object """ return self._attributes @attributes.setter def attributes(self, attributes): """Sets the attributes of this Body3. Attributes fo\\r deal creation # noqa: E501 :param attributes: The attributes of this Body3. # noqa: E501 :type: object """ self._attributes = attributes def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body3, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body3): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(name=None, attributes=None)
58,129
sib_api_v3_sdk.models.body3
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body3): return False return self.__dict__ == other.__dict__
(self, other)
58,130
sib_api_v3_sdk.models.body3
__init__
Body3 - a model defined in Swagger
def __init__(self, name=None, attributes=None): # noqa: E501 """Body3 - a model defined in Swagger""" # noqa: E501 self._name = None self._attributes = None self.discriminator = None self.name = name if attributes is not None: self.attributes = attributes
(self, name=None, attributes=None)
58,133
sib_api_v3_sdk.models.body3
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body3, dict): for key, value in self.items(): result[key] = value return result
(self)
58,135
sib_api_v3_sdk.models.body4
Body4
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body4(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'name': 'str', 'attributes': 'object' } attribute_map = { 'name': 'name', 'attributes': 'attributes' } def __init__(self, name=None, attributes=None): # noqa: E501 """Body4 - a model defined in Swagger""" # noqa: E501 self._name = None self._attributes = None self.discriminator = None if name is not None: self.name = name if attributes is not None: self.attributes = attributes @property def name(self): """Gets the name of this Body4. # noqa: E501 Name of deal # noqa: E501 :return: The name of this Body4. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Body4. Name of deal # noqa: E501 :param name: The name of this Body4. # noqa: E501 :type: str """ self._name = name @property def attributes(self): """Gets the attributes of this Body4. # noqa: E501 Attributes for deal update # noqa: E501 :return: The attributes of this Body4. # noqa: E501 :rtype: object """ return self._attributes @attributes.setter def attributes(self, attributes): """Sets the attributes of this Body4. Attributes for deal update # noqa: E501 :param attributes: The attributes of this Body4. # noqa: E501 :type: object """ self._attributes = attributes def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body4, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body4): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(name=None, attributes=None)
58,136
sib_api_v3_sdk.models.body4
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body4): return False return self.__dict__ == other.__dict__
(self, other)
58,137
sib_api_v3_sdk.models.body4
__init__
Body4 - a model defined in Swagger
def __init__(self, name=None, attributes=None): # noqa: E501 """Body4 - a model defined in Swagger""" # noqa: E501 self._name = None self._attributes = None self.discriminator = None if name is not None: self.name = name if attributes is not None: self.attributes = attributes
(self, name=None, attributes=None)
58,140
sib_api_v3_sdk.models.body4
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body4, dict): for key, value in self.items(): result[key] = value return result
(self)
58,142
sib_api_v3_sdk.models.body5
Body5
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body5(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'link_contact_ids': 'list[int]', 'unlink_contact_ids': 'list[int]', 'link_company_ids': 'list[str]', 'unlink_company_ids': 'list[str]' } attribute_map = { 'link_contact_ids': 'linkContactIds', 'unlink_contact_ids': 'unlinkContactIds', 'link_company_ids': 'linkCompanyIds', 'unlink_company_ids': 'unlinkCompanyIds' } def __init__(self, link_contact_ids=None, unlink_contact_ids=None, link_company_ids=None, unlink_company_ids=None): # noqa: E501 """Body5 - a model defined in Swagger""" # noqa: E501 self._link_contact_ids = None self._unlink_contact_ids = None self._link_company_ids = None self._unlink_company_ids = None self.discriminator = None if link_contact_ids is not None: self.link_contact_ids = link_contact_ids if unlink_contact_ids is not None: self.unlink_contact_ids = unlink_contact_ids if link_company_ids is not None: self.link_company_ids = link_company_ids if unlink_company_ids is not None: self.unlink_company_ids = unlink_company_ids @property def link_contact_ids(self): """Gets the link_contact_ids of this Body5. # noqa: E501 Contact ids for contacts to be linked with deal # noqa: E501 :return: The link_contact_ids of this Body5. # noqa: E501 :rtype: list[int] """ return self._link_contact_ids @link_contact_ids.setter def link_contact_ids(self, link_contact_ids): """Sets the link_contact_ids of this Body5. Contact ids for contacts to be linked with deal # noqa: E501 :param link_contact_ids: The link_contact_ids of this Body5. # noqa: E501 :type: list[int] """ self._link_contact_ids = link_contact_ids @property def unlink_contact_ids(self): """Gets the unlink_contact_ids of this Body5. # noqa: E501 Contact ids for contacts to be unlinked from deal # noqa: E501 :return: The unlink_contact_ids of this Body5. # noqa: E501 :rtype: list[int] """ return self._unlink_contact_ids @unlink_contact_ids.setter def unlink_contact_ids(self, unlink_contact_ids): """Sets the unlink_contact_ids of this Body5. Contact ids for contacts to be unlinked from deal # noqa: E501 :param unlink_contact_ids: The unlink_contact_ids of this Body5. # noqa: E501 :type: list[int] """ self._unlink_contact_ids = unlink_contact_ids @property def link_company_ids(self): """Gets the link_company_ids of this Body5. # noqa: E501 Company ids to be linked with deal # noqa: E501 :return: The link_company_ids of this Body5. # noqa: E501 :rtype: list[str] """ return self._link_company_ids @link_company_ids.setter def link_company_ids(self, link_company_ids): """Sets the link_company_ids of this Body5. Company ids to be linked with deal # noqa: E501 :param link_company_ids: The link_company_ids of this Body5. # noqa: E501 :type: list[str] """ self._link_company_ids = link_company_ids @property def unlink_company_ids(self): """Gets the unlink_company_ids of this Body5. # noqa: E501 Company ids to be unlinked from deal # noqa: E501 :return: The unlink_company_ids of this Body5. # noqa: E501 :rtype: list[str] """ return self._unlink_company_ids @unlink_company_ids.setter def unlink_company_ids(self, unlink_company_ids): """Sets the unlink_company_ids of this Body5. Company ids to be unlinked from deal # noqa: E501 :param unlink_company_ids: The unlink_company_ids of this Body5. # noqa: E501 :type: list[str] """ self._unlink_company_ids = unlink_company_ids def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body5, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body5): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(link_contact_ids=None, unlink_contact_ids=None, link_company_ids=None, unlink_company_ids=None)
58,143
sib_api_v3_sdk.models.body5
__eq__
Returns true if both objects are equal
def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body5): return False return self.__dict__ == other.__dict__
(self, other)
58,144
sib_api_v3_sdk.models.body5
__init__
Body5 - a model defined in Swagger
def __init__(self, link_contact_ids=None, unlink_contact_ids=None, link_company_ids=None, unlink_company_ids=None): # noqa: E501 """Body5 - a model defined in Swagger""" # noqa: E501 self._link_contact_ids = None self._unlink_contact_ids = None self._link_company_ids = None self._unlink_company_ids = None self.discriminator = None if link_contact_ids is not None: self.link_contact_ids = link_contact_ids if unlink_contact_ids is not None: self.unlink_contact_ids = unlink_contact_ids if link_company_ids is not None: self.link_company_ids = link_company_ids if unlink_company_ids is not None: self.unlink_company_ids = unlink_company_ids
(self, link_contact_ids=None, unlink_contact_ids=None, link_company_ids=None, unlink_company_ids=None)
58,147
sib_api_v3_sdk.models.body5
to_dict
Returns the model properties as a dict
def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body5, dict): for key, value in self.items(): result[key] = value return result
(self)
58,149
sib_api_v3_sdk.models.body6
Body6
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
class Body6(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'name': 'str', 'duration': 'int', 'task_type_id': 'str', '_date': 'datetime', 'notes': 'str', 'done': 'bool', 'assign_to_id': 'str', 'contacts_ids': 'list[int]', 'deals_ids': 'list[str]', 'companies_ids': 'list[str]', 'reminder': 'TaskReminder' } attribute_map = { 'name': 'name', 'duration': 'duration', 'task_type_id': 'taskTypeId', '_date': 'date', 'notes': 'notes', 'done': 'done', 'assign_to_id': 'assignToId', 'contacts_ids': 'contactsIds', 'deals_ids': 'dealsIds', 'companies_ids': 'companiesIds', 'reminder': 'reminder' } def __init__(self, name=None, duration=None, task_type_id=None, _date=None, notes=None, done=None, assign_to_id=None, contacts_ids=None, deals_ids=None, companies_ids=None, reminder=None): # noqa: E501 """Body6 - a model defined in Swagger""" # noqa: E501 self._name = None self._duration = None self._task_type_id = None self.__date = None self._notes = None self._done = None self._assign_to_id = None self._contacts_ids = None self._deals_ids = None self._companies_ids = None self._reminder = None self.discriminator = None self.name = name if duration is not None: self.duration = duration self.task_type_id = task_type_id self._date = _date if notes is not None: self.notes = notes if done is not None: self.done = done if assign_to_id is not None: self.assign_to_id = assign_to_id if contacts_ids is not None: self.contacts_ids = contacts_ids if deals_ids is not None: self.deals_ids = deals_ids if companies_ids is not None: self.companies_ids = companies_ids if reminder is not None: self.reminder = reminder @property def name(self): """Gets the name of this Body6. # noqa: E501 Name of task # noqa: E501 :return: The name of this Body6. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Body6. Name of task # noqa: E501 :param name: The name of this Body6. # noqa: E501 :type: str """ if name is None: raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def duration(self): """Gets the duration of this Body6. # noqa: E501 Duration of task in milliseconds [1 minute = 60000 ms] # noqa: E501 :return: The duration of this Body6. # noqa: E501 :rtype: int """ return self._duration @duration.setter def duration(self, duration): """Sets the duration of this Body6. Duration of task in milliseconds [1 minute = 60000 ms] # noqa: E501 :param duration: The duration of this Body6. # noqa: E501 :type: int """ if duration is not None and duration < 0: # noqa: E501 raise ValueError("Invalid value for `duration`, must be a value greater than or equal to `0`") # noqa: E501 self._duration = duration @property def task_type_id(self): """Gets the task_type_id of this Body6. # noqa: E501 Id for type of task e.g Call / Email / Meeting etc. # noqa: E501 :return: The task_type_id of this Body6. # noqa: E501 :rtype: str """ return self._task_type_id @task_type_id.setter def task_type_id(self, task_type_id): """Sets the task_type_id of this Body6. Id for type of task e.g Call / Email / Meeting etc. # noqa: E501 :param task_type_id: The task_type_id of this Body6. # noqa: E501 :type: str """ if task_type_id is None: raise ValueError("Invalid value for `task_type_id`, must not be `None`") # noqa: E501 self._task_type_id = task_type_id @property def _date(self): """Gets the _date of this Body6. # noqa: E501 Task due date and time # noqa: E501 :return: The _date of this Body6. # noqa: E501 :rtype: datetime """ return self.__date @_date.setter def _date(self, _date): """Sets the _date of this Body6. Task due date and time # noqa: E501 :param _date: The _date of this Body6. # noqa: E501 :type: datetime """ if _date is None: raise ValueError("Invalid value for `_date`, must not be `None`") # noqa: E501 self.__date = _date @property def notes(self): """Gets the notes of this Body6. # noqa: E501 Notes added to a task # noqa: E501 :return: The notes of this Body6. # noqa: E501 :rtype: str """ return self._notes @notes.setter def notes(self, notes): """Sets the notes of this Body6. Notes added to a task # noqa: E501 :param notes: The notes of this Body6. # noqa: E501 :type: str """ self._notes = notes @property def done(self): """Gets the done of this Body6. # noqa: E501 Task marked as done # noqa: E501 :return: The done of this Body6. # noqa: E501 :rtype: bool """ return self._done @done.setter def done(self, done): """Sets the done of this Body6. Task marked as done # noqa: E501 :param done: The done of this Body6. # noqa: E501 :type: bool """ self._done = done @property def assign_to_id(self): """Gets the assign_to_id of this Body6. # noqa: E501 User id to whom task is assigned # noqa: E501 :return: The assign_to_id of this Body6. # noqa: E501 :rtype: str """ return self._assign_to_id @assign_to_id.setter def assign_to_id(self, assign_to_id): """Sets the assign_to_id of this Body6. User id to whom task is assigned # noqa: E501 :param assign_to_id: The assign_to_id of this Body6. # noqa: E501 :type: str """ self._assign_to_id = assign_to_id @property def contacts_ids(self): """Gets the contacts_ids of this Body6. # noqa: E501 Contact ids for contacts linked to this task # noqa: E501 :return: The contacts_ids of this Body6. # noqa: E501 :rtype: list[int] """ return self._contacts_ids @contacts_ids.setter def contacts_ids(self, contacts_ids): """Sets the contacts_ids of this Body6. Contact ids for contacts linked to this task # noqa: E501 :param contacts_ids: The contacts_ids of this Body6. # noqa: E501 :type: list[int] """ self._contacts_ids = contacts_ids @property def deals_ids(self): """Gets the deals_ids of this Body6. # noqa: E501 Deal ids for deals a task is linked to # noqa: E501 :return: The deals_ids of this Body6. # noqa: E501 :rtype: list[str] """ return self._deals_ids @deals_ids.setter def deals_ids(self, deals_ids): """Sets the deals_ids of this Body6. Deal ids for deals a task is linked to # noqa: E501 :param deals_ids: The deals_ids of this Body6. # noqa: E501 :type: list[str] """ self._deals_ids = deals_ids @property def companies_ids(self): """Gets the companies_ids of this Body6. # noqa: E501 Companies ids for companies a task is linked to # noqa: E501 :return: The companies_ids of this Body6. # noqa: E501 :rtype: list[str] """ return self._companies_ids @companies_ids.setter def companies_ids(self, companies_ids): """Sets the companies_ids of this Body6. Companies ids for companies a task is linked to # noqa: E501 :param companies_ids: The companies_ids of this Body6. # noqa: E501 :type: list[str] """ self._companies_ids = companies_ids @property def reminder(self): """Gets the reminder of this Body6. # noqa: E501 :return: The reminder of this Body6. # noqa: E501 :rtype: TaskReminder """ return self._reminder @reminder.setter def reminder(self, reminder): """Sets the reminder of this Body6. :param reminder: The reminder of this Body6. # noqa: E501 :type: TaskReminder """ self._reminder = reminder def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(Body6, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, Body6): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
(name=None, duration=None, task_type_id=None, _date=None, notes=None, done=None, assign_to_id=None, contacts_ids=None, deals_ids=None, companies_ids=None, reminder=None)