| 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 VoiceMessage(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 = {
'to': 'str',
'body': 'str',
'voice': 'str',
'custom_string': 'str',
'country': 'str',
'source': 'str',
'list_id': 'int',
'lang': 'str',
'schedule': 'int',
'require_input': 'int',
'machine_detection': 'int'
}
attribute_map = {
'to': 'to',
'body': 'body',
'voice': 'voice',
'custom_string': 'custom_string',
'country': 'country',
'source': 'source',
'list_id': 'list_id',
'lang': 'lang',
'schedule': 'schedule',
'require_input': 'require_input',
'machine_detection': 'machine_detection'
}
discriminator_value_class_map = {
}
def __init__(self, to=None, body=None, voice=None, custom_string=None, country=None, source='sdk', list_id=None, lang=None, schedule=None, require_input=0, machine_detection=0, _configuration=None): # noqa: E501
"""VoiceMessage - a model defined in Swagger""" # noqa: E501
if _configuration is None:
_configuration = Configuration()
self._configuration = _configuration
self._to = None
self._body = None
self._voice = None
self._custom_string = None
self._country = None
self._source = None
self._list_id = None
self._lang = None
self._schedule = None
self._require_input = None
self._machine_detection = None
self.discriminator = 'classType'
if to is not None:
self.to = to
self.body = body
self.voice = voice
self.custom_string = custom_string
self.country = country
if source is not None:
self.source = source
if list_id is not None:
self.list_id = list_id
if lang is not None:
self.lang = lang
if schedule is not None:
self.schedule = schedule
if require_input is not None:
self.require_input = require_input
if machine_detection is not None:
self.machine_detection = machine_detection
@property
def to(self):
"""Gets the to of this VoiceMessage. # noqa: E501
Your phone number in E.164 format. # noqa: E501
:return: The to of this VoiceMessage. # noqa: E501
:rtype: str
"""
return self._to
@to.setter
def to(self, to):
"""Sets the to of this VoiceMessage.
Your phone number in E.164 format. # noqa: E501
:param to: The to of this VoiceMessage. # noqa: E501
:type: str
"""
self._to = to
@property
def body(self):
"""Gets the body of this VoiceMessage. # noqa: E501
Biscuit uv3nlCOjRk croissant chocolate lollipop chocolate muffin. # noqa: E501
:return: The body of this VoiceMessage. # noqa: E501
:rtype: str
"""
return self._body
@body.setter
def body(self, body):
"""Sets the body of this VoiceMessage.
Biscuit uv3nlCOjRk croissant chocolate lollipop chocolate muffin. # noqa: E501
:param body: The body of this VoiceMessage. # 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 voice(self):
"""Gets the voice of this VoiceMessage. # noqa: E501
Either 'female' or 'male'. # noqa: E501
:return: The voice of this VoiceMessage. # noqa: E501
:rtype: str
"""
return self._voice
@voice.setter
def voice(self, voice):
"""Sets the voice of this VoiceMessage.
Either 'female' or 'male'. # noqa: E501
:param voice: The voice of this VoiceMessage. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and voice is None:
raise ValueError("Invalid value for `voice`, must not be `None`") # noqa: E501
self._voice = voice
@property
def custom_string(self):
"""Gets the custom_string of this VoiceMessage. # noqa: E501
Your reference. Will be passed back with all replies and delivery reports. # noqa: E501
:return: The custom_string of this VoiceMessage. # noqa: E501
:rtype: str
"""
return self._custom_string
@custom_string.setter
def custom_string(self, custom_string):
"""Sets the custom_string of this VoiceMessage.
Your reference. Will be passed back with all replies and delivery reports. # noqa: E501
:param custom_string: The custom_string of this VoiceMessage. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and custom_string is None:
raise ValueError("Invalid value for `custom_string`, must not be `None`") # noqa: E501
self._custom_string = custom_string
@property
def country(self):
"""Gets the country of this VoiceMessage. # noqa: E501
The country of the recipient. # noqa: E501
:return: The country of this VoiceMessage. # noqa: E501
:rtype: str
"""
return self._country
@country.setter
def country(self, country):
"""Sets the country of this VoiceMessage.
The country of the recipient. # noqa: E501
:param country: The country of this VoiceMessage. # noqa: E501
:type: str
"""
if self._configuration.client_side_validation and country is None:
raise ValueError("Invalid value for `country`, must not be `None`") # noqa: E501
self._country = country
@property
def source(self):
"""Gets the source of this VoiceMessage. # noqa: E501
Your method of sending e.g. 'wordpress', 'php', 'c#'. # noqa: E501
:return: The source of this VoiceMessage. # noqa: E501
:rtype: str
"""
return self._source
@source.setter
def source(self, source):
"""Sets the source of this VoiceMessage.
Your method of sending e.g. 'wordpress', 'php', 'c#'. # noqa: E501
:param source: The source of this VoiceMessage. # noqa: E501
:type: str
"""
self._source = source
@property
def list_id(self):
"""Gets the list_id of this VoiceMessage. # noqa: E501
Your list ID if sending to a whole list. Can be used instead of 'to'. # noqa: E501
:return: The list_id of this VoiceMessage. # noqa: E501
:rtype: int
"""
return self._list_id
@list_id.setter
def list_id(self, list_id):
"""Sets the list_id of this VoiceMessage.
Your list ID if sending to a whole list. Can be used instead of 'to'. # noqa: E501
:param list_id: The list_id of this VoiceMessage. # noqa: E501
:type: int
"""
self._list_id = list_id
@property
def lang(self):
"""Gets the lang of this VoiceMessage. # noqa: E501
au (string, required) - See section on available languages. # noqa: E501
:return: The lang of this VoiceMessage. # noqa: E501
:rtype: str
"""
return self._lang
@lang.setter
def lang(self, lang):
"""Sets the lang of this VoiceMessage.
au (string, required) - See section on available languages. # noqa: E501
:param lang: The lang of this VoiceMessage. # noqa: E501
:type: str
"""
self._lang = lang
@property
def schedule(self):
"""Gets the schedule of this VoiceMessage. # noqa: E501
Leave blank for immediate delivery. Your schedule time in unix format http://help.clicksend.com/what-is-a-unix-timestamp # noqa: E501
:return: The schedule of this VoiceMessage. # noqa: E501
:rtype: int
"""
return self._schedule
@schedule.setter
def schedule(self, schedule):
"""Sets the schedule of this VoiceMessage.
Leave blank for immediate delivery. Your schedule time in unix format http://help.clicksend.com/what-is-a-unix-timestamp # noqa: E501
:param schedule: The schedule of this VoiceMessage. # noqa: E501
:type: int
"""
self._schedule = schedule
@property
def require_input(self):
"""Gets the require_input of this VoiceMessage. # noqa: E501
Whether you want to receive a keypress from the call recipient # noqa: E501
:return: The require_input of this VoiceMessage. # noqa: E501
:rtype: int
"""
return self._require_input
@require_input.setter
def require_input(self, require_input):
"""Sets the require_input of this VoiceMessage.
Whether you want to receive a keypress from the call recipient # noqa: E501
:param require_input: The require_input of this VoiceMessage. # noqa: E501
:type: int
"""
self._require_input = require_input
@property
def machine_detection(self):
"""Gets the machine_detection of this VoiceMessage. # noqa: E501
Whether to attempt to detect an answering machine or voicemail service and leave a message # noqa: E501
:return: The machine_detection of this VoiceMessage. # noqa: E501
:rtype: int
"""
return self._machine_detection
@machine_detection.setter
def machine_detection(self, machine_detection):
"""Sets the machine_detection of this VoiceMessage.
Whether to attempt to detect an answering machine or voicemail service and leave a message # noqa: E501
:param machine_detection: The machine_detection of this VoiceMessage. # noqa: E501
:type: int
"""
self._machine_detection = machine_detection
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(VoiceMessage, 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, VoiceMessage):
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, VoiceMessage):
return True
return self.to_dict() != other.to_dict()