| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/clicksend_client/models/ |
Upload File : |
# coding: utf-8
"""
ClickSend v3 API
This is an official SDK for [ClickSend](https://clicksend.com) Below you will find a current list of the available methods for clicksend. *NOTE: You will need to create a free account to use the API. You can register [here](https://dashboard.clicksend.com/#/signup/step1/)..* # noqa: E501
OpenAPI spec version: 3.1
Contact: support@clicksend.com
Generated by: https://github.com/clicksend-api/clicksend-codegen.git
"""
import pprint
import re # noqa: F401
import six
from clicksend_client.configuration import Configuration
class SmsCampaign(object):
"""NOTE: This class is auto generated by the clicksend code generator program.
Do not edit the class manually.
"""
"""
Attributes:
clicksend_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.
"""
clicksend_types = {
'list_id': 'int',
'name': 'str',
'body': 'str',
'_from': 'str',
'schedule': 'int',
'url_to_shorten': 'str'
}
attribute_map = {
'list_id': 'list_id',
'name': 'name',
'body': 'body',
'_from': 'from',
'schedule': 'schedule',
'url_to_shorten': 'url_to_shorten'
}
discriminator_value_class_map = {
}
def __init__(self, list_id=None, name=None, body=None, _from=None, schedule=0, url_to_shorten=None, _configuration=None): # noqa: E501
"""SmsCampaign - a model defined in Swagger""" # noqa: E501
if _configuration is None:
_configuration = Configuration()
self._configuration = _configuration
self._list_id = None
self._name = None
self._body = None
self.__from = None
self._schedule = None
self._url_to_shorten = None
self.discriminator = 'classType'
self.list_id = list_id
self.name = name
self.body = body
if _from is not None:
self._from = _from
if schedule is not None:
self.schedule = schedule
if url_to_shorten is not None:
self.url_to_shorten = url_to_shorten
@property
def list_id(self):
"""Gets the list_id of this SmsCampaign. # noqa: E501
Your list id. # noqa: E501
:return: The list_id of this SmsCampaign. # noqa: E501
:rtype: int
"""
return self._list_id
@list_id.setter
def list_id(self, list_id):
"""Sets the list_id of this SmsCampaign.
Your list id. # noqa: E501
:param list_id: The list_id of this SmsCampaign. # noqa: E501
:type: int
"""
if self._configuration.client_side_validation and list_id is None:
raise ValueError("Invalid value for `list_id`, must not be `None`") # noqa: E501
self._list_id = list_id
@property
def name(self):
"""Gets the name of this SmsCampaign. # noqa: E501
Your campaign name. # noqa: E501
:return: The name of this SmsCampaign. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this SmsCampaign.
Your campaign name. # noqa: E501
:param name: The name of this SmsCampaign. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and name is None:
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = name
@property
def body(self):
"""Gets the body of this SmsCampaign. # noqa: E501
Your campaign message. # noqa: E501
:return: The body of this SmsCampaign. # noqa: E501
:rtype: str
"""
return self._body
@body.setter
def body(self, body):
"""Sets the body of this SmsCampaign.
Your campaign message. # noqa: E501
:param body: The body of this SmsCampaign. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and body is None:
raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501
self._body = body
@property
def _from(self):
"""Gets the _from of this SmsCampaign. # noqa: E501
Your sender id - more info: http://help.clicksend.com/SMS/what-is-a-sender-id-or-sender-number. # noqa: E501
:return: The _from of this SmsCampaign. # noqa: E501
:rtype: str
"""
return self.__from
@_from.setter
def _from(self, _from):
"""Sets the _from of this SmsCampaign.
Your sender id - more info: http://help.clicksend.com/SMS/what-is-a-sender-id-or-sender-number. # noqa: E501
:param _from: The _from of this SmsCampaign. # noqa: E501
:type: str
"""
self.__from = _from
@property
def schedule(self):
"""Gets the schedule of this SmsCampaign. # noqa: E501
Your schedule timestamp. # noqa: E501
:return: The schedule of this SmsCampaign. # noqa: E501
:rtype: int
"""
return self._schedule
@schedule.setter
def schedule(self, schedule):
"""Sets the schedule of this SmsCampaign.
Your schedule timestamp. # noqa: E501
:param schedule: The schedule of this SmsCampaign. # noqa: E501
:type: int
"""
self._schedule = schedule
@property
def url_to_shorten(self):
"""Gets the url_to_shorten of this SmsCampaign. # noqa: E501
url to be shortened add http://smsg.io/xxxxx` to the body as a placeholder. # noqa: E501
:return: The url_to_shorten of this SmsCampaign. # noqa: E501
:rtype: str
"""
return self._url_to_shorten
@url_to_shorten.setter
def url_to_shorten(self, url_to_shorten):
"""Sets the url_to_shorten of this SmsCampaign.
url to be shortened add http://smsg.io/xxxxx` to the body as a placeholder. # noqa: E501
:param url_to_shorten: The url_to_shorten of this SmsCampaign. # noqa: E501
:type: str
"""
self._url_to_shorten = url_to_shorten
def get_real_child_model(self, data):
"""Returns the real base class specified by the discriminator"""
discriminator_value = data[self.discriminator].lower()
return self.discriminator_value_class_map.get(discriminator_value)
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.clicksend_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(SmsCampaign, 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, SmsCampaign):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, SmsCampaign):
return True
return self.to_dict() != other.to_dict()